no time for comment
This commit is contained in:
@@ -252,7 +252,18 @@ void Navigation::updateMagneticDeclination() {
|
||||
|
||||
int16_t Navigation::calculateCourseCorrection(Point& point) {
|
||||
int16_t targetCourse = point.courseTo(this->targetPoint);
|
||||
int16_t correctionCourse = targetCourse - this->realAzimuth;
|
||||
int16_t correctionCourse;
|
||||
|
||||
if (this->calcAzimuthState == CalcAzimuthState::Good
|
||||
|| this->calcAzimuthState == CalcAzimuthState::Super)
|
||||
{
|
||||
correctionCourse = targetCourse - this->calcAzimuth;
|
||||
this->lastUsedCalcAzimuth = true;
|
||||
} else {
|
||||
correctionCourse = targetCourse - this->realAzimuth;
|
||||
this->lastUsedCalcAzimuth = false;
|
||||
}
|
||||
|
||||
if (correctionCourse > 180)
|
||||
correctionCourse -= 360;
|
||||
else if (correctionCourse < -180)
|
||||
|
||||
@@ -196,6 +196,7 @@ class Navigation {
|
||||
QMC5883LCompass* getCompass() const { return this->compass; }
|
||||
int16_t getCalcAzimuth() const { return this->calcAzimuth; }
|
||||
CalcAzimuthState getCalcAzimuthState() const { return this->calcAzimuthState; }
|
||||
bool getLastUsedCalcAzimuth() const { return this->lastUsedCalcAzimuth; }
|
||||
|
||||
Point::Accuracy getMinAccuracy() const { return this->minAccuracy; }
|
||||
void setMinAccuracy(Point::Accuracy accuracy) { this->minAccuracy = accuracy; }
|
||||
@@ -239,6 +240,7 @@ class Navigation {
|
||||
bool isNtripInit = false;
|
||||
bool preventNextPoint = false;
|
||||
bool directionChangeMode = false;
|
||||
bool lastUsedCalcAzimuth = false;
|
||||
|
||||
char* host;
|
||||
char* mountPoint;
|
||||
|
||||
Reference in New Issue
Block a user