Discontinuities: revert to HDG mode. Various TODO still.
This commit is contained in:
parent
c87ab00335
commit
5dc44bbff3
4 changed files with 23 additions and 7 deletions
|
@ -263,7 +263,10 @@ var FCUController = {
|
||||||
HDGPush: func() {
|
HDGPush: func() {
|
||||||
if (me.FCUworking) {
|
if (me.FCUworking) {
|
||||||
if (fmgc.Output.fd1.getBoolValue() or fmgc.Output.fd2.getBoolValue() or fmgc.Output.ap1.getBoolValue() or fmgc.Output.ap2.getBoolValue()) {
|
if (fmgc.Output.fd1.getBoolValue() or fmgc.Output.fd2.getBoolValue() or fmgc.Output.ap1.getBoolValue() or fmgc.Output.ap2.getBoolValue()) {
|
||||||
fmgc.Input.lat.setValue(1);
|
var wp = fmgc.flightPlanController.flightplans[2].getWP(fmgc.flightPlanController.currentToWptIndex.getValue() + 1);
|
||||||
|
if (wp != nil and wp.wp_type != "discontinuity") {
|
||||||
|
fmgc.Input.lat.setValue(1);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
@ -429,6 +429,10 @@ var ITAF = {
|
||||||
# This is removed because sequencing is done by the flightplan controller
|
# This is removed because sequencing is done by the flightplan controller
|
||||||
# Internal.lnavAdvanceNm.setValue(FPLN.turnDist);
|
# Internal.lnavAdvanceNm.setValue(FPLN.turnDist);
|
||||||
|
|
||||||
|
# TODO - if the waypoint is the DEST waypoint, crosstrack error must be less than 0.5nm and course error less than 30 deg
|
||||||
|
# TODO - if in HDG mode, if no distance, then crosstrack error must be less than 5nm
|
||||||
|
# TODO - if in nav, no distance condition applies, but DEST course error must be less than 30 (CONFIRM)
|
||||||
|
|
||||||
if (FPLN.wp0Dist.getValue() <= FPLN.turnDist and !Gear.wow1.getBoolValue() and fmgc.flightPlanController.flightplans[2].getWP(FPLN.currentWPTemp).fly_type == "flyBy") {
|
if (FPLN.wp0Dist.getValue() <= FPLN.turnDist and !Gear.wow1.getBoolValue() and fmgc.flightPlanController.flightplans[2].getWP(FPLN.currentWPTemp).fly_type == "flyBy") {
|
||||||
flightPlanController.autoSequencing();
|
flightPlanController.autoSequencing();
|
||||||
} elsif (FPLN.wp0Dist.getValue() <= 0.15) {
|
} elsif (FPLN.wp0Dist.getValue() <= 0.15) {
|
||||||
|
|
|
@ -126,6 +126,8 @@ var A320GPSDeleagte = {
|
||||||
|
|
||||||
sequence: func
|
sequence: func
|
||||||
{
|
{
|
||||||
|
return;
|
||||||
|
|
||||||
if (!me.flightplan.active)
|
if (!me.flightplan.active)
|
||||||
return;
|
return;
|
||||||
#flightPlanController.autoSequencing();
|
#flightPlanController.autoSequencing();
|
||||||
|
|
|
@ -209,12 +209,19 @@ var flightPlanController = {
|
||||||
|
|
||||||
# Advancing logic
|
# Advancing logic
|
||||||
me.currentToWptIndexTemp = me.currentToWptIndex.getValue();
|
me.currentToWptIndexTemp = me.currentToWptIndex.getValue();
|
||||||
me.currentToWptIndex.setValue(me.currentToWptIndexTemp + 1);
|
# TODO - after sequencing discontinuity, FPLN should show PPOS then DISCONTINUITY
|
||||||
|
# Clearing that discontinuity is not allowed, you must exit using DIRTO, or else using NAV ARM and overfly
|
||||||
|
# TODO - triple click - confirm, is it only with DES disengage, or also with the NAV loss?
|
||||||
|
|
||||||
if (me.num[2].getValue() > 2 and me.currentToWptIndexTemp >= 1) {
|
if (me.flightplans[2].getWP(me.currentToWptIndexTemp + 1).wp_type == "discontinuity") {
|
||||||
for (var i = 0; i <= 2; i += 1) {
|
fmgc.Input.lat.setValue(3);
|
||||||
if (i == 2 or me.temporaryFlag[i]) {
|
} else {
|
||||||
me.flightplans[i].getWP(me.currentToWptIndexTemp - 1).hidden = 1;
|
me.currentToWptIndex.setValue(me.currentToWptIndexTemp + 1);
|
||||||
|
if (me.num[2].getValue() > 2 and me.currentToWptIndexTemp >= 1) {
|
||||||
|
for (var i = 0; i <= 2; i += 1) {
|
||||||
|
if (i == 2 or me.temporaryFlag[i]) {
|
||||||
|
me.flightplans[i].getWP(me.currentToWptIndexTemp - 1).hidden = 1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -823,7 +830,7 @@ var flightPlanController = {
|
||||||
var errs = [];
|
var errs = [];
|
||||||
call(func {
|
call(func {
|
||||||
me.currentToWptIndex.setValue(1);
|
me.currentToWptIndex.setValue(1);
|
||||||
}, nil, nil, nil,errs);
|
}, nil, nil, nil, errs);
|
||||||
if (size(errs) != 0) { debug.printerror(errs); }
|
if (size(errs) != 0) { debug.printerror(errs); }
|
||||||
}
|
}
|
||||||
me.active.setValue(1);
|
me.active.setValue(1);
|
||||||
|
|
Loading…
Reference in a new issue