Finish documention until someone change something
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
/**
|
||||
* @file navigation.cpp
|
||||
* @author Alexander Klein (alex@kleiax.de)
|
||||
* @brief
|
||||
* @brief Contains the implementation of the class Navigation
|
||||
* @version 0.1
|
||||
* @date 2022-01-31
|
||||
*
|
||||
@@ -50,7 +50,7 @@ CourseCorrection Navigation::getCourseCorrection() {
|
||||
|
||||
Point currentPos = this->currentLocation();
|
||||
double targetCourse = Navigation::courseTo(currentPos, this->targetPoint);
|
||||
double distance = Navigation::distanceBetwenn(currentPos, this->targetPoint);
|
||||
double distance = Navigation::distanceBetween(currentPos, this->targetPoint);
|
||||
|
||||
if (targetCourse < 0 || distance < 0 || this->navigationFinished)
|
||||
return courseCorrection;
|
||||
@@ -89,7 +89,7 @@ bool Navigation::addCurrentPosToRoute() {
|
||||
}
|
||||
|
||||
// Ever Point after the first
|
||||
if (MIN_DISTANCE_BETWEEN_POINTS <= this->distanceBetwenn(p, this->lastPoint)) {
|
||||
if (MIN_DISTANCE_BETWEEN_POINTS <= this->distanceBetween(p, this->lastPoint)) {
|
||||
this->route->addPointToRoute(p);
|
||||
this->lastPoint = p;
|
||||
return true;
|
||||
@@ -121,7 +121,7 @@ bool Navigation::setTargetPoint(Point target) {
|
||||
return false;
|
||||
}
|
||||
|
||||
double Navigation::distanceBetwenn(Point p1, Point p2) {
|
||||
double Navigation::distanceBetween(Point p1, Point p2) {
|
||||
if (p1.isValid() && p2.isValid())
|
||||
return TinyGPSPlus::distanceBetween(p1.lat, p1.lon, p2.lat, p2.lon);
|
||||
return -1;
|
||||
|
||||
Reference in New Issue
Block a user