This adds functionality to decompose into waypoints any SIDs, STARs and Approaches named in the FMS.
The waypoints for procedures are not present in the FMS - just the name, so the NavData database is queried to get them.
Note that
A SID/STAR can have 0, 1 or more entries in each of the runwayTransitions, commonRoutes and enrouteTransitions structures and the commonRoutes entries may be associated with runways too.
If a SID/STAR is specified in the FMS, associated runway and transitions are optional, and should be treated as don't care. If they are omitted, then Avitab should determine a common set of waypoints. This may be the same as a commonRoute from the database, particularly for the USA. But not always.
As a result of the above, code to attempt to linearly trace through waypoints (similar to the iterate method) was perceived as becoming an unreadable, bug-prone mess of multidimensional if/then statements. So the approach (no pun intended) here is to loop through all possible permutations of concatenated segments and check whether the permutation meets the constraints of the (possibly don't care) runway and transition in the FMS. This provides a more complete version of common waypoints and the code has a much cleaner flow.
This adds functionality to decompose into waypoints any SIDs, STARs and Approaches named in the FMS. The waypoints for procedures are not present in the FMS - just the name, so the NavData database is queried to get them.
Note that
As a result of the above, code to attempt to linearly trace through waypoints (similar to the iterate method) was perceived as becoming an unreadable, bug-prone mess of multidimensional if/then statements. So the approach (no pun intended) here is to loop through all possible permutations of concatenated segments and check whether the permutation meets the constraints of the (possibly don't care) runway and transition in the FMS. This provides a more complete version of common waypoints and the code has a much cleaner flow.