- exclude POIs and some other types from the ident match, to avoid
confusing results
- improve how the search vicinity is computed when inserting a leg,
which is the common case for a route with a destination set. Use
the midpoint of the leg ending at the insert position, as the optimal
search vicinity
- move the waypointFromString code into route.cxx, since it is mostly
independent of a FlightPlan instance
- extend the tests to cover the bug which flagged these issues
Ticket-Id: https://sourceforge.net/p/flightgear/codetickets/2372/
Overhaul how transitions are stored in FlightPlan XML, and how
they’re exposed to Nasal. Simplify the Nasal access by making
‘sid_trans’ and ‘star_trans’ writeable.
Extend the unit-tests a lot to cover this, both from C++ and also
from Nasal
As part of this, overhaul the ownership of FlightPlan delegate
factories, to make it safer (use ref-counting of the factories,
and allow the factory to customise delegate clean-up behaviour)
Where the plan does not contain departure / arrival WPs, fire the
corresponding delegate methods after load, to run the selection logic.
Also, add a ‘loaded’ delegate callback, to give delegates a chance to
perform validation and fix-up after all flight-plan loads.
When load a GPX route, run normal departure/arrival airport callbacks
on the delegates. (They are blocked for ‘native’ XML routes to avoid
losing SIDs and STARs)
https://sourceforge.net/p/flightgear/codetickets/2227/
To support FMS which delete ‘past’ waypoints, add some helpers:
- waypoints can be flagged as hidden, this property is exposed to Nasal
- currentWP() accepts an offset parameter, allowing FlightPlan indexing
to treat the current WP as index 0
- a ‘numRemainingWaypoints()’ function on flightPlan in Nasal, again
to range how many waypoints are left, starting from the current WP
Add some basic tests of these new features to the route-manager tests.
Add some tests for the default GPS / route-manager handling of
DISCON in flight-plans. Especially check behaviour when sequencing
a DISCON, and resuming with a Direct-to after one.
This requires a corresponding FGData update to the default GPS Nasal.
Ensure changes from Nasal are picked up by delegates (such as GPS) when
they are made. Add a route-manager test which sets and exits a hold
using Nasal.
As part of this, update the test API to make it easy to run Nasal from
a test.
GPS now lets the delegate handle the sequencing behaviour, by
setting a new config property. The default GPS delegate (in Nasal)
now sets this property.
This requires a corresponding FGData update.