- remove NtripReconnect from Autopilot and CaptureRoute
- shiftet moveControl States in the class namespace - added auto reconeect to NtripClient - a lot of refactor
This commit is contained in:
@@ -29,7 +29,7 @@
|
||||
* around the half accuracy of the positioning system
|
||||
*
|
||||
*/
|
||||
#define MIN_DISTANCE_BETWEEN_POINTS 0.1
|
||||
#define MIN_DISTANCE_BETWEEN_POINTS 0.3
|
||||
#define MIN_DISTANCE_TO_REACH_POINT 0.5
|
||||
#define AZIMUTH_UPDATE_DELAY 20
|
||||
|
||||
@@ -55,6 +55,14 @@ struct CourseCorrection {
|
||||
*/
|
||||
class Navigation {
|
||||
public:
|
||||
enum Status {
|
||||
InsufficientAccuracy,
|
||||
Unchanged,
|
||||
Updated,
|
||||
Complete
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @brief Construct a new Navigation object and using I2C
|
||||
*
|
||||
@@ -123,7 +131,7 @@ class Navigation {
|
||||
* @return true if new correction data provided
|
||||
* @return false if route is finished
|
||||
*/
|
||||
bool getCourseCorrection(CourseCorrection& correction);
|
||||
Status getCourseCorrection(CourseCorrection& correction);
|
||||
|
||||
/**
|
||||
* @brief Tries to add the current Position to the route
|
||||
@@ -133,7 +141,7 @@ class Navigation {
|
||||
* @return true successful added point
|
||||
* @return false no point added to route
|
||||
*/
|
||||
bool addCurrentPosToRoute();
|
||||
Status addCurrentPosToRoute();
|
||||
|
||||
// TODO: can be deleted?
|
||||
// bool setPointBeforeTurn();
|
||||
@@ -189,6 +197,7 @@ class Navigation {
|
||||
|
||||
private:
|
||||
void updateCurrentLocation();
|
||||
int16_t calculateCourseCorrection();
|
||||
|
||||
/**
|
||||
* @brief Set the next point as target
|
||||
@@ -215,10 +224,11 @@ class Navigation {
|
||||
NTRIPClient* ntripClient = nullptr;
|
||||
QMC5883LCompass* compass;
|
||||
|
||||
Point lastPoint;
|
||||
Point lastPointRouteInsert;
|
||||
Point lastPointCalcCorrection;
|
||||
Point targetPoint;
|
||||
Point currentPosition;
|
||||
Point beforeTurnPoint;
|
||||
Point::Accuracy minAccuracy = Point::Accuracy::twoDigOfCM;
|
||||
|
||||
|
||||
bool navigationStarted = false;
|
||||
|
||||
Reference in New Issue
Block a user