580
edits
No edit summary |
mNo edit summary |
||
Line 3: | Line 3: | ||
The major change in the route manager is that waypoints are no longer popped when they are sequenced. Instead, the current waypoint index is incremented. This change is necessary to allow the route manager to function as the flight plan backend of real-world GPS and navigation devices, which, for example, show previous waypoints and route on a moving map display. | The major change in the route manager is that waypoints are no longer popped when they are sequenced. Instead, the current waypoint index is incremented. This change is necessary to allow the route manager to function as the flight plan backend of real-world GPS and navigation devices, which, for example, show previous waypoints and route on a moving map display. | ||
Since most real navigation systems deal in ''legs'', not waypoints, the active leg is defined as that between <tt>waypoints[currentWpt - 1]</tt> and <tt>waypoints[currentWpt]</tt | Since most real navigation systems deal in ''legs'', not waypoints, the active leg is defined as that between <tt>waypoints[currentWpt - 1]</tt> and <tt>waypoints[currentWpt]</tt>. This is why current waypoint property is initialised to '1' on activating a route, and why activating a route adds the current location (usually the departure runway) as waypoint 0 - taken together, the user and GPS see the expected first leg from the runway to the first waypoint they entered. | ||
=== Compatibility === | === Compatibility === | ||
To keep older aircraft and instruments work, the properties <tt>wp[0]</tt>, <tt>wp[1]</tt> and <tt>wp-last</tt> are maintained, implicitly updated to refer to the current waypoint, the next waypoint and the final waypoint. | To keep older aircraft and instruments work, the properties <tt>wp[0]</tt>, <tt>wp[1]</tt> and <tt>wp-last</tt> are maintained, implicitly updated to refer to the current waypoint, the next waypoint and the final waypoint. |
edits