]> git.mxchange.org Git - flightgear.git/commitdiff
Proposed fix for #251: Waypoint handling
authorThorstenB <brehmt@gmail.com>
Thu, 27 Jan 2011 23:06:23 +0000 (00:06 +0100)
committerThorstenB <brehmt@gmail.com>
Sun, 30 Jan 2011 17:05:53 +0000 (18:05 +0100)
Do not consider destination/runway waypoints as done, when these
are far away - even if the course is off by > 90 degrees.

src/Instrumentation/rnav_waypt_controller.cxx

index 09ac2b81274c908c1557e76dc18d594fca4aee0b..278484d0a99e87fddd0092b0aad4269e5ef7f05e 100644 (file)
@@ -221,7 +221,7 @@ private:
 
 /**
  * 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.
  */
 class RunwayCtl : public WayptController
@@ -252,7 +252,7 @@ public:
     double _courseDev = brg - _targetTrack;
     SG_NORMALIZE_RANGE(_courseDev, -180.0, 180.0);
     
-    if (fabs(_courseDev) > 90.0) {
+    if ((fabs(_courseDev) > 90.0) && (_distanceM < _rnav->overflightArmDistanceM())) {
       setDone();
     }
   }