When no SID / approach is available, offer a default.
Offer to synthesise a plausible SID and approach for a given runway. In both cases it's a straight-in/-out path, ignoring local terrain.
This commit is contained in:
parent
30bdd92402
commit
51d4cf56b0
1 changed files with 17 additions and 3 deletions
|
@ -138,12 +138,19 @@ command interface /autopilot/route-manager/input:
|
|||
|
||||
var apt = flightplan().departure;
|
||||
var rwy = flightplan().departure_runway;
|
||||
if (apt == nil or apt.sids(rwy) == nil) {
|
||||
if (apt == nil) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (size(apt.sids(rwy)) == 0) {
|
||||
sids.getNode("value[0]", 1).setValue("DEFAULT");
|
||||
sids.getNode("value[1]", 1).setValue("(none)");
|
||||
gui.dialog_update("route-manager", "sid");
|
||||
return;
|
||||
}
|
||||
|
||||
sids.getNode("value[0]", 1).setValue("(none)");
|
||||
var i=1;
|
||||
sids.getNode("value[0]", 1).setValue("(none)");
|
||||
foreach (var s; apt.sids(rwy)) {
|
||||
var sid = apt.getSid(s);
|
||||
var transVec = sid.transitions;
|
||||
|
@ -199,7 +206,14 @@ command interface /autopilot/route-manager/input:
|
|||
var apt = flightplan().destination;
|
||||
var rwy = flightplan().destination_runway;
|
||||
|
||||
if (apt == nil or apt.getApproachList(rwy) == nil) {
|
||||
if (apt == nil) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (size(apt.getApproachList(rwy)) == 0) {
|
||||
approaches.getNode("value[0]", 1).setValue("DEFAULT");
|
||||
approaches.getNode("value[1]", 1).setValue("(none)");
|
||||
gui.dialog_update("route-manager", "approach");
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue