added max distance between points
spelling
This commit is contained in:
@@ -174,7 +174,9 @@ Navigation::Status Navigation::addCurrentPosToRoute() {
|
||||
}
|
||||
|
||||
// Every Point after the first
|
||||
if (MIN_DISTANCE_BETWEEN_POINTS <= this->currentPosition.distanceTo(this->lastPointRouteInsert)) {
|
||||
double distance = this->currentPosition.distanceTo(this->lastPointRouteInsert);
|
||||
if (MIN_DISTANCE_BETWEEN_POINTS <= distance
|
||||
&& MAX_DISTANCE_BETWEEN_POINTS >= distance){
|
||||
this->route->addPointToRoute(this->currentPosition);
|
||||
this->lastPointRouteInsert = this->currentPosition;
|
||||
return Status::Updated;
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
*
|
||||
*/
|
||||
#define MIN_DISTANCE_BETWEEN_POINTS 0.3
|
||||
#define MAX_DISTANCE_BETWEEN_POINTS 10
|
||||
#define MIN_DISTANCE_TO_REACH_POINT 0.5
|
||||
#define AZIMUTH_UPDATE_DELAY 20
|
||||
|
||||
|
||||
Reference in New Issue
Block a user