Proposed fix for #251: Waypoint handling
Do not consider destination/runway waypoints as done, when these are far away - even if the course is off by > 90 degrees.
This commit is contained in:
parent
91d001ff4e
commit
f68f300bb3
1 changed files with 2 additions and 2 deletions
|
@ -221,7 +221,7 @@ private:
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Special controller for runways. For runways, we want very narrow deviation
|
* Special controller for runways. For runways, we want very narrow deviation
|
||||||
* contraints, and to understand that any point along the paved area is
|
* constraints, and to understand that any point along the paved area is
|
||||||
* equivalent to being 'at' the runway.
|
* equivalent to being 'at' the runway.
|
||||||
*/
|
*/
|
||||||
class RunwayCtl : public WayptController
|
class RunwayCtl : public WayptController
|
||||||
|
@ -252,7 +252,7 @@ public:
|
||||||
double _courseDev = brg - _targetTrack;
|
double _courseDev = brg - _targetTrack;
|
||||||
SG_NORMALIZE_RANGE(_courseDev, -180.0, 180.0);
|
SG_NORMALIZE_RANGE(_courseDev, -180.0, 180.0);
|
||||||
|
|
||||||
if (fabs(_courseDev) > 90.0) {
|
if ((fabs(_courseDev) > 90.0) && (_distanceM < _rnav->overflightArmDistanceM())) {
|
||||||
setDone();
|
setDone();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue