1
0
Fork 0

Fix direct-to course -deviation sign

This commit is contained in:
James Turner 2019-09-18 23:12:58 +01:00
parent a2e9374c54
commit 2fe91430a3

View file

@ -699,8 +699,7 @@ void DirectToController::update(double)
_courseAircraftToTarget = SGGeodesy::courseDeg(_rnav->position(),_waypt->position());
_distanceAircraftTargetMeter = SGGeodesy::distanceM(_rnav->position(),_waypt->position());
_courseDev = -(courseOriginToAircraft - _targetTrack);
_courseDev = _courseAircraftToTarget - _targetTrack;
SG_NORMALIZE_RANGE(_courseDev, -180.0, 180.0);
bool isMinimumOverFlightDistanceReached = _distanceAircraftTargetMeter < _rnav->overflightDistanceM();