GPS PRIMARY
This commit is contained in:
parent
5eaad7d98f
commit
36b78c3102
4 changed files with 40 additions and 6 deletions
|
@ -218,6 +218,7 @@ var canvas_ND_1 = {
|
|||
# here we make the ND:
|
||||
me.NDCpt = ND.new("/instrumentation/efis", myCockpit_switches, "Airbus");
|
||||
me.NDCpt.attitude_heading_setting = -1;
|
||||
me.NDCpt.number = 0;
|
||||
me.NDCpt.adirs_property = props.globals.getNode("/instrumentation/efis[0]/nd/ir-1",1);
|
||||
me.NDCpt.newMFD(canvas_group);
|
||||
me.NDCpt.change_phase = 0;
|
||||
|
@ -243,6 +244,7 @@ var canvas_ND_2 = {
|
|||
myCockpit_switches["ADIRS"]= {path: "/nd/ir-2", value: 0, type: "BOOL"};
|
||||
me.NDFo = ND.new("/instrumentation/efis[1]", myCockpit_switches, "Airbus");
|
||||
me.NDFo.attitude_heading_setting = 1;
|
||||
me.NDFo.number = 1;
|
||||
me.NDFo.adirs_property = props.globals.getNode("/instrumentation/efis[1]/nd/ir-2",1);
|
||||
me.NDFo.newMFD(canvas_group);
|
||||
me.NDFo.change_phase = 0;
|
||||
|
|
|
@ -708,9 +708,19 @@ canvas.NDStyles["Airbus"] = {
|
|||
impl: {
|
||||
init: func(nd, symbol),
|
||||
predicate: func(nd) {
|
||||
!systems.ADIRS.Operating.aligned[0].getBoolValue() and !systems.ADIRS.Operating.aligned[1].getBoolValue() and !systems.ADIRS.Operating.aligned[2].getBoolValue()
|
||||
(!systems.ADIRS.Operating.aligned[0].getBoolValue() and !systems.ADIRS.Operating.aligned[1].getBoolValue() and !systems.ADIRS.Operating.aligned[2].getBoolValue())
|
||||
or (mcdu_scratchpad.scratchpads[nd.number].showTypeIIMsg and mcdu_scratchpad.scratchpads[nd.number].scratchpad == "GPS PRIMARY")
|
||||
},
|
||||
is_true: func(nd) {
|
||||
nd.symbols.nd_warn_memo.show();
|
||||
if (mcdu_scratchpad.scratchpads[nd.number].showTypeIIMsg and mcdu_scratchpad.scratchpads[nd.number].scratchpad == "GPS PRIMARY") {
|
||||
nd.symbols.nd_warn_memo.setText("GPS PRIMARY");
|
||||
nd.symbols.nd_warn_memo.setColor(0.8078,0.8039,0.8078);
|
||||
} else {
|
||||
nd.symbols.nd_warn_memo.setText("GPS PRIMARY LOST");
|
||||
nd.symbols.nd_warn_memo.setColor(0.7333,0.3803,0);
|
||||
}
|
||||
},
|
||||
is_true: func(nd) nd.symbols.nd_warn_memo.show(),
|
||||
is_false: func(nd) nd.symbols.nd_warn_memo.hide(),
|
||||
},
|
||||
},
|
||||
|
@ -719,7 +729,8 @@ canvas.NDStyles["Airbus"] = {
|
|||
impl: {
|
||||
init: func(nd, symbol),
|
||||
predicate: func(nd) {
|
||||
!systems.ADIRS.Operating.aligned[0].getBoolValue() and !systems.ADIRS.Operating.aligned[1].getBoolValue() and !systems.ADIRS.Operating.aligned[2].getBoolValue()
|
||||
(!systems.ADIRS.Operating.aligned[0].getBoolValue() and !systems.ADIRS.Operating.aligned[1].getBoolValue() and !systems.ADIRS.Operating.aligned[2].getBoolValue())
|
||||
or (mcdu_scratchpad.scratchpads[nd.number].showTypeIIMsg and mcdu_scratchpad.scratchpads[nd.number].scratchpad == "GPS PRIMARY")
|
||||
},
|
||||
is_true: func(nd) nd.symbols.nd_warn_msgbox.show(),
|
||||
is_false: func(nd) nd.symbols.nd_warn_msgbox.hide(),
|
||||
|
|
|
@ -47,6 +47,13 @@ var MessageQueueController = {
|
|||
me.messages.pop(index);
|
||||
}
|
||||
},
|
||||
deleteWithText: func(text) {
|
||||
foreach (var message; me.messages.vector) {
|
||||
if (message.msgText == text) {
|
||||
me.messages.remove(message);
|
||||
}
|
||||
}
|
||||
},
|
||||
clearQueue: func() {
|
||||
me.messages.clear();
|
||||
},
|
||||
|
|
|
@ -153,7 +153,6 @@ var ADIRU = {
|
|||
if (me._gs > 5 or abs(me._pitch) > 5 or abs(me._roll) > 10) {
|
||||
me.stopAlignNoAlign();
|
||||
me._excessMotion = 1;
|
||||
print("Excessive motion, restarting");
|
||||
me.update(); # update operative
|
||||
me.align(calcAlignTime(pts.Position.latitude.getValue()));
|
||||
} elsif (me.operative == 0) {
|
||||
|
@ -324,6 +323,7 @@ var ADIRS = {
|
|||
),
|
||||
],
|
||||
_hasGPSPrimLost: 0,
|
||||
_hasGPSPrim: 0,
|
||||
loop: func(notification) {
|
||||
if (me._init) {
|
||||
for (i = 0; i < _NUMADIRU; i = i + 1) {
|
||||
|
@ -350,10 +350,24 @@ var ADIRS = {
|
|||
if (!me._hasGPSPrimLost) {
|
||||
mcdu_scratchpad.messageQueues[0].addNewMsg(mcdu_scratchpad.MessageController.getTypeIIMsgByText("GPS PRIMARY LOST"));
|
||||
mcdu_scratchpad.messageQueues[1].addNewMsg(mcdu_scratchpad.MessageController.getTypeIIMsgByText("GPS PRIMARY LOST"));
|
||||
me._hasGPSPrimLost = 1;
|
||||
}
|
||||
me._hasGPSPrimLost = 1;
|
||||
} else {
|
||||
me._hasGPSPrimLost = 0;
|
||||
if (me._hasGPSPrimLost) {
|
||||
mcdu_scratchpad.messageQueues[0].deleteWithText("GPS PRIMARY LOST");
|
||||
mcdu_scratchpad.messageQueues[1].deleteWithText("GPS PRIMARY LOST");
|
||||
me._hasGPSPrimLost = 0;
|
||||
}
|
||||
}
|
||||
|
||||
if (me.Operating.aligned[0].getBoolValue() or me.Operating.aligned[1].getBoolValue() or me.Operating.aligned[2].getBoolValue()) {
|
||||
if (!me._hasGPSPrim) {
|
||||
mcdu_scratchpad.messageQueues[0].addNewMsg(mcdu_scratchpad.MessageController.getTypeIIMsgByText("GPS PRIMARY"));
|
||||
mcdu_scratchpad.messageQueues[1].addNewMsg(mcdu_scratchpad.MessageController.getTypeIIMsgByText("GPS PRIMARY"));
|
||||
me._hasGPSPrim = 1;
|
||||
}
|
||||
} else {
|
||||
me._hasGPSPrim = 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue