Radar altimeter, ADR / IR panel hooked up
This commit is contained in:
parent
62c855c56f
commit
b1bfb39c4a
8 changed files with 747 additions and 361 deletions
|
@ -688,6 +688,36 @@
|
|||
<seatbelt-sign type="bool">0</seatbelt-sign>
|
||||
<taxi-light-switch type="float">0</taxi-light-switch>
|
||||
</lighting>
|
||||
<navigation>
|
||||
<adirscp>
|
||||
<switches>
|
||||
<adr-1 type="bool">0</adr-1>
|
||||
<adr-2 type="bool">0</adr-2>
|
||||
<adr-3 type="bool">0</adr-3>
|
||||
<ir-1 type="bool">0</ir-1>
|
||||
<ir-2 type="bool">0</ir-2>
|
||||
<ir-3 type="bool">0</ir-3>
|
||||
<ir-1-mode type="int">0</ir-1-mode>
|
||||
<ir-2-mode type="int">0</ir-2-mode>
|
||||
<ir-3-mode type="int">0</ir-3-mode>
|
||||
</switches>
|
||||
<lights>
|
||||
<adr-1-fault type="bool">0</adr-1-fault>
|
||||
<adr-2-fault type="bool">0</adr-2-fault>
|
||||
<adr-3-fault type="bool">0</adr-3-fault>
|
||||
<adr-1-off type="bool">1</adr-1-off>
|
||||
<adr-2-off type="bool">1</adr-2-off>
|
||||
<adr-3-off type="bool">1</adr-3-off>
|
||||
<ir-1-fault type="bool">0</ir-1-fault>
|
||||
<ir-2-fault type="bool">0</ir-2-fault>
|
||||
<ir-3-fault type="bool">0</ir-3-fault>
|
||||
<ir-1-off type="bool">0</ir-1-off>
|
||||
<ir-2-off type="bool">0</ir-2-off>
|
||||
<ir-3-off type="bool">0</ir-3-off>
|
||||
<on-bat type="bool">0</on-bat>
|
||||
</lights>
|
||||
</adirscp>
|
||||
</navigation>
|
||||
<OH>
|
||||
<protectors>
|
||||
<ditching type="bool">0</ditching>
|
||||
|
@ -939,6 +969,14 @@
|
|||
<static n="2">
|
||||
<serviceable>1</serviceable>
|
||||
</static>
|
||||
|
||||
<navigation>
|
||||
<adr>
|
||||
<operating-1 type="bool">0</operating-1>
|
||||
<operating-2 type="bool">0</operating-2>
|
||||
<operating-3 type="bool">0</operating-3>
|
||||
</adr>
|
||||
</navigation>
|
||||
</systems>
|
||||
|
||||
<options n="0">
|
||||
|
@ -1061,6 +1099,10 @@
|
|||
<range type="double">1.0</range>
|
||||
</groundradar>
|
||||
|
||||
<marker-beacon n="0">
|
||||
<serviceable type="bool">true</serviceable>
|
||||
</marker-beacon>
|
||||
|
||||
<nav n="0">
|
||||
<frequencies>
|
||||
<selected-mhz type="double">111.15</selected-mhz>
|
||||
|
@ -1162,6 +1204,34 @@
|
|||
<file-prefix>Aircraft/A320-family/Sounds/GPWS/</file-prefix>
|
||||
</voice>
|
||||
</mk-viii>
|
||||
|
||||
<radar-altimeter n="0">
|
||||
<antenna>
|
||||
<x-offset-m type="double">-1</x-offset-m>
|
||||
<y-offset-m type="double">0</y-offset-m>
|
||||
<z-offset-m type="double">2.52</z-offset-m>
|
||||
</antenna>
|
||||
<az-step-deg type="int">10</az-step-deg>
|
||||
<az-limit-deg type="int">30</az-limit-deg>
|
||||
<elev-step-deg type="int">10</elev-step-deg>
|
||||
<elev-limit type="int">30</elev-limit>
|
||||
<max-range-m type="int">1219</max-range-m>
|
||||
<serviceable type="bool">true</serviceable>
|
||||
</radar-altimeter>
|
||||
|
||||
<radar-altimeter n="1">
|
||||
<antenna>
|
||||
<x-offset-m type="double">-1</x-offset-m>
|
||||
<y-offset-m type="double">0</y-offset-m>
|
||||
<z-offset-m type="double">2.52</z-offset-m>
|
||||
</antenna>
|
||||
<az-step-deg type="int">10</az-step-deg>
|
||||
<az-limit-deg type="int">30</az-limit-deg>
|
||||
<elev-step-deg type="int">10</elev-step-deg>
|
||||
<elev-limit type="int">30</elev-limit>
|
||||
<max-range-m type="int">1219</max-range-m>
|
||||
<serviceable type="bool">true</serviceable>
|
||||
</radar-altimeter>
|
||||
</instrumentation>
|
||||
|
||||
<modes>
|
||||
|
|
|
@ -61,7 +61,6 @@
|
|||
<object-name>IR2Btn2A</object-name>
|
||||
<object-name>IR3Btn1F</object-name>
|
||||
<object-name>IR3Btn2A</object-name>
|
||||
<object-name>IrsOnBatLightOB</object-name>
|
||||
<object-name>RamAirBtn2O</object-name>
|
||||
<object-name>SEC1Btn1F</object-name>
|
||||
<object-name>SEC1Btn2O</object-name>
|
||||
|
@ -521,11 +520,14 @@
|
|||
<button>3</button>
|
||||
<repeatable>false</repeatable>
|
||||
<binding>
|
||||
<command>property-cycle</command>
|
||||
<property>controls/adirs/ir[0]/knob</property>
|
||||
<value>0</value>
|
||||
<value>1</value>
|
||||
<value>2</value>
|
||||
<command>nasal</command>
|
||||
<script>
|
||||
if (systems.ADIRSnew.Switches.irModeSw[0].getValue() != 2) {
|
||||
systems.ADIRSControlPanel.irModeSw(0, systems.ADIRSnew.Switches.irModeSw[0].getValue() + 1);
|
||||
} else {
|
||||
systems.ADIRSControlPanel.irModeSw(0, 0);
|
||||
}
|
||||
</script>
|
||||
</binding>
|
||||
<binding>
|
||||
<command>nasal</command>
|
||||
|
@ -537,11 +539,14 @@
|
|||
<button>4</button>
|
||||
<repeatable>false</repeatable>
|
||||
<binding>
|
||||
<command>property-cycle</command>
|
||||
<property>controls/adirs/ir[0]/knob</property>
|
||||
<value>2</value>
|
||||
<value>1</value>
|
||||
<value>0</value>
|
||||
<command>nasal</command>
|
||||
<script>
|
||||
if (systems.ADIRSnew.Switches.irModeSw[0].getValue() != 0) {
|
||||
systems.ADIRSControlPanel.irModeSw(0, systems.ADIRSnew.Switches.irModeSw[0].getValue() - 1);
|
||||
} else {
|
||||
systems.ADIRSControlPanel.irModeSw(0, 2);
|
||||
}
|
||||
</script>
|
||||
</binding>
|
||||
<binding>
|
||||
<command>nasal</command>
|
||||
|
@ -553,7 +558,7 @@
|
|||
<animation>
|
||||
<type>rotate</type>
|
||||
<object-name>IR1ModeKnb</object-name>
|
||||
<property>controls/adirs/ir[0]/knob</property>
|
||||
<property>controls/navigation/adirscp/switches/ir-1-mode</property>
|
||||
<interpolation>
|
||||
<entry><ind>0</ind><dep>-35</dep></entry>
|
||||
<entry><ind>1</ind><dep>0</dep></entry>
|
||||
|
@ -575,7 +580,7 @@
|
|||
<condition>
|
||||
<or>
|
||||
<equals>
|
||||
<property>controls/adirs/ir[0]/fault</property>
|
||||
<property>controls/navigation/adirscp/lights/ir-1-fault</property>
|
||||
<value>1</value>
|
||||
</equals>
|
||||
<equals>
|
||||
|
@ -611,11 +616,14 @@
|
|||
<button>3</button>
|
||||
<repeatable>false</repeatable>
|
||||
<binding>
|
||||
<command>property-cycle</command>
|
||||
<property>controls/adirs/ir[1]/knob</property>
|
||||
<value>0</value>
|
||||
<value>1</value>
|
||||
<value>2</value>
|
||||
<command>nasal</command>
|
||||
<script>
|
||||
if (systems.ADIRSnew.Switches.irModeSw[1].getValue() != 2) {
|
||||
systems.ADIRSControlPanel.irModeSw(1, systems.ADIRSnew.Switches.irModeSw[1].getValue() + 1);
|
||||
} else {
|
||||
systems.ADIRSControlPanel.irModeSw(1, 0);
|
||||
}
|
||||
</script>
|
||||
</binding>
|
||||
<binding>
|
||||
<command>nasal</command>
|
||||
|
@ -627,11 +635,14 @@
|
|||
<button>4</button>
|
||||
<repeatable>false</repeatable>
|
||||
<binding>
|
||||
<command>property-cycle</command>
|
||||
<property>controls/adirs/ir[1]/knob</property>
|
||||
<value>2</value>
|
||||
<value>1</value>
|
||||
<value>0</value>
|
||||
<command>nasal</command>
|
||||
<script>
|
||||
if (systems.ADIRSnew.Switches.irModeSw[1].getValue() != 0) {
|
||||
systems.ADIRSControlPanel.irModeSw(1, systems.ADIRSnew.Switches.irModeSw[1].getValue() - 1);
|
||||
} else {
|
||||
systems.ADIRSControlPanel.irModeSw(1, 2);
|
||||
}
|
||||
</script>
|
||||
</binding>
|
||||
<binding>
|
||||
<command>nasal</command>
|
||||
|
@ -643,7 +654,7 @@
|
|||
<animation>
|
||||
<type>rotate</type>
|
||||
<object-name>IR2ModeKnb</object-name>
|
||||
<property>controls/adirs/ir[1]/knob</property>
|
||||
<property>controls/navigation/adirscp/switches/ir-2-mode</property>
|
||||
<interpolation>
|
||||
<entry><ind>0</ind><dep>-35</dep></entry>
|
||||
<entry><ind>1</ind><dep>0</dep></entry>
|
||||
|
@ -665,7 +676,7 @@
|
|||
<condition>
|
||||
<or>
|
||||
<equals>
|
||||
<property>controls/adirs/ir[1]/fault</property>
|
||||
<property>controls/navigation/adirscp/lights/ir-2-fault</property>
|
||||
<value>1</value>
|
||||
</equals>
|
||||
<equals>
|
||||
|
@ -701,11 +712,14 @@
|
|||
<button>3</button>
|
||||
<repeatable>false</repeatable>
|
||||
<binding>
|
||||
<command>property-cycle</command>
|
||||
<property>controls/adirs/ir[2]/knob</property>
|
||||
<value>0</value>
|
||||
<value>1</value>
|
||||
<value>2</value>
|
||||
<command>nasal</command>
|
||||
<script>
|
||||
if (systems.ADIRSnew.Switches.irModeSw[2].getValue() != 2) {
|
||||
systems.ADIRSControlPanel.irModeSw(2, systems.ADIRSnew.Switches.irModeSw[2].getValue() + 1);
|
||||
} else {
|
||||
systems.ADIRSControlPanel.irModeSw(2, 0);
|
||||
}
|
||||
</script>
|
||||
</binding>
|
||||
<binding>
|
||||
<command>nasal</command>
|
||||
|
@ -717,11 +731,14 @@
|
|||
<button>4</button>
|
||||
<repeatable>false</repeatable>
|
||||
<binding>
|
||||
<command>property-cycle</command>
|
||||
<property>controls/adirs/ir[2]/knob</property>
|
||||
<value>2</value>
|
||||
<value>1</value>
|
||||
<value>0</value>
|
||||
<command>nasal</command>
|
||||
<script>
|
||||
if (systems.ADIRSnew.Switches.irModeSw[2].getValue() != 0) {
|
||||
systems.ADIRSControlPanel.irModeSw(2, systems.ADIRSnew.Switches.irModeSw[2].getValue() - 1);
|
||||
} else {
|
||||
systems.ADIRSControlPanel.irModeSw(2, 2);
|
||||
}
|
||||
</script>
|
||||
</binding>
|
||||
<binding>
|
||||
<command>nasal</command>
|
||||
|
@ -733,7 +750,7 @@
|
|||
<animation>
|
||||
<type>rotate</type>
|
||||
<object-name>IR3ModeKnb</object-name>
|
||||
<property>controls/adirs/ir[2]/knob</property>
|
||||
<property>controls/navigation/adirscp/switches/ir-3-mode</property>
|
||||
<interpolation>
|
||||
<entry><ind>0</ind><dep>-35</dep></entry>
|
||||
<entry><ind>1</ind><dep>0</dep></entry>
|
||||
|
@ -755,7 +772,7 @@
|
|||
<condition>
|
||||
<or>
|
||||
<equals>
|
||||
<property>controls/adirs/ir[2]/fault</property>
|
||||
<property>controls/navigation/adirscp/lights/ir-3-fault</property>
|
||||
<value>1</value>
|
||||
</equals>
|
||||
<equals>
|
||||
|
@ -789,7 +806,7 @@
|
|||
<condition>
|
||||
<or>
|
||||
<equals>
|
||||
<property>controls/adirs/onbat</property>
|
||||
<property>controls/navigation/adirscp/lights/on-bat</property>
|
||||
<value>1</value>
|
||||
</equals>
|
||||
<equals>
|
||||
|
@ -818,8 +835,8 @@
|
|||
<value>25</value>
|
||||
</greater-than-equals>
|
||||
</condition>
|
||||
<command>property-toggle</command>
|
||||
<property>controls/adirs/adr[0]/off</property>
|
||||
<command>nasal</command>
|
||||
<script>systems.ADIRSControlPanel.adrSw(0);</script>
|
||||
</binding>
|
||||
<binding>
|
||||
<command>nasal</command>
|
||||
|
@ -834,7 +851,7 @@
|
|||
<condition>
|
||||
<or>
|
||||
<equals>
|
||||
<property>controls/adirs/adr[0]/fault</property>
|
||||
<property>controls/navigation/adirscp/lights/adr-1-fault</property>
|
||||
<value>1</value>
|
||||
</equals>
|
||||
<equals>
|
||||
|
@ -844,13 +861,14 @@
|
|||
</or>
|
||||
</condition>
|
||||
</animation>
|
||||
|
||||
<animation>
|
||||
<type>select</type>
|
||||
<object-name>ADR1Btn2O</object-name>
|
||||
<condition>
|
||||
<or>
|
||||
<equals>
|
||||
<property>controls/adirs/adr[0]/off</property>
|
||||
<property>controls/navigation/adirscp/lights/adr-1-off</property>
|
||||
<value>1</value>
|
||||
</equals>
|
||||
<equals>
|
||||
|
@ -879,8 +897,8 @@
|
|||
<value>25</value>
|
||||
</greater-than-equals>
|
||||
</condition>
|
||||
<command>property-toggle</command>
|
||||
<property>controls/adirs/adr[1]/off</property>
|
||||
<command>nasal</command>
|
||||
<script>systems.ADIRSControlPanel.adrSw(1);</script>
|
||||
</binding>
|
||||
<binding>
|
||||
<command>nasal</command>
|
||||
|
@ -895,7 +913,7 @@
|
|||
<condition>
|
||||
<or>
|
||||
<equals>
|
||||
<property>controls/adirs/adr[1]/fault</property>
|
||||
<property>controls/navigation/adirscp/lights/adr-2-fault</property>
|
||||
<value>1</value>
|
||||
</equals>
|
||||
<equals>
|
||||
|
@ -905,13 +923,14 @@
|
|||
</or>
|
||||
</condition>
|
||||
</animation>
|
||||
|
||||
<animation>
|
||||
<type>select</type>
|
||||
<object-name>ADR2Btn2O</object-name>
|
||||
<condition>
|
||||
<or>
|
||||
<equals>
|
||||
<property>controls/adirs/adr[1]/off</property>
|
||||
<property>controls/navigation/adirscp/lights/adr-2-off</property>
|
||||
<value>1</value>
|
||||
</equals>
|
||||
<equals>
|
||||
|
@ -940,8 +959,8 @@
|
|||
<value>25</value>
|
||||
</greater-than-equals>
|
||||
</condition>
|
||||
<command>property-toggle</command>
|
||||
<property>controls/adirs/adr[2]/off</property>
|
||||
<command>nasal</command>
|
||||
<script>systems.ADIRSControlPanel.adrSw(2);</script>
|
||||
</binding>
|
||||
<binding>
|
||||
<command>nasal</command>
|
||||
|
@ -956,7 +975,7 @@
|
|||
<condition>
|
||||
<or>
|
||||
<equals>
|
||||
<property>controls/adirs/adr[2]/fault</property>
|
||||
<property>controls/navigation/adirscp/lights/adr-3-fault</property>
|
||||
<value>1</value>
|
||||
</equals>
|
||||
<equals>
|
||||
|
@ -966,13 +985,14 @@
|
|||
</or>
|
||||
</condition>
|
||||
</animation>
|
||||
|
||||
<animation>
|
||||
<type>select</type>
|
||||
<object-name>ADR3Btn2O</object-name>
|
||||
<condition>
|
||||
<or>
|
||||
<equals>
|
||||
<property>controls/adirs/adr[2]/off</property>
|
||||
<property>controls/navigation/adirscp/lights/adr-3-off</property>
|
||||
<value>1</value>
|
||||
</equals>
|
||||
<equals>
|
||||
|
|
|
@ -5,50 +5,197 @@
|
|||
|
||||
var _NUMADIRU = 3;
|
||||
|
||||
var _selfTestTime = nil;
|
||||
|
||||
var ADR = {
|
||||
outputDisc: 0, # 0 = disc, 1 = normal
|
||||
# local vars
|
||||
_voltageMain: 0,
|
||||
_voltageBackup: 0,
|
||||
_voltageLimitedTime: 0,
|
||||
_noPowerTime: 0,
|
||||
_timeVar: 0,
|
||||
|
||||
outputOn: 0, # 0 = disc, 1 = normal
|
||||
mode: 0, # 0 = off, 1 = nav, 2 = att
|
||||
energised: 0, # 0 = off, 1 = on
|
||||
operative: 0, # 0 = off,
|
||||
input: [],
|
||||
output: [],
|
||||
|
||||
# methods
|
||||
new: func() {
|
||||
var adr = { parents:[ADR] };
|
||||
return adr;
|
||||
},
|
||||
updateEnergized: func(mode) {
|
||||
me.energized = mode != 0 ? 1 : 0;
|
||||
updateEnergised: func(mode) {
|
||||
me.energised = mode != 0 ? 1 : 0;
|
||||
print("ADR energised status " ~ me.energised);
|
||||
},
|
||||
updatePower: func(elec) {
|
||||
me._voltageMain = elec.getValue() or 0;
|
||||
return me._voltageMain;
|
||||
},
|
||||
updateBackupPower: func(elec, isLimited) {
|
||||
me._voltageBackup = elec.getValue() or 0;
|
||||
me._voltageLimitedTime = isLimited;
|
||||
return me._voltageBackup;
|
||||
},
|
||||
selfTest: func() {
|
||||
ADIRSnew._selfTest = 1;
|
||||
_selfTestTime = pts.Sim.Time.elapsedSec.getValue();
|
||||
|
||||
ADIRSnew.selfTest();
|
||||
},
|
||||
setOperative: func(newOperative) {
|
||||
if (newOperative != me.operative) {
|
||||
me.operative = newOperative;
|
||||
if (newOperative) {
|
||||
me.selfTest();
|
||||
}
|
||||
print("Set operative to " ~ me.operative);
|
||||
}
|
||||
},
|
||||
update: func() {
|
||||
me._timeVar = pts.Sim.Time.elapsedSec.getValue();
|
||||
if (me.energised and !me._voltageMain and me._voltageLimitedTime and me._noPowerTime == 0) {
|
||||
me._noPowerTime = me._timeVar;
|
||||
print("ADR lost power at time " ~ me._noPowerTime);
|
||||
}
|
||||
|
||||
if (me.energised and me.mode) {
|
||||
if (me._voltageMain) {
|
||||
me._noPowerTime = 0;
|
||||
me.setOperative(1);
|
||||
if (!ADIRSnew._selfTest) {
|
||||
ADIRSnew.Lights.onBat.setBoolValue(0);
|
||||
}
|
||||
} elsif (((me._timeVar < me._noPowerTime + 300 and me._voltageLimitedTime) or !me._voltageLimitedTime) and me._voltageBackup) {
|
||||
me.setOperative(1);
|
||||
if (!ADIRSnew._selfTest) {
|
||||
ADIRSnew.Lights.onBat.setBoolValue(1);
|
||||
}
|
||||
} else {
|
||||
me._noPowerTime = 0;
|
||||
me.setOperative(0);
|
||||
if (!ADIRSnew._selfTest) {
|
||||
ADIRSnew.Lights.onBat.setBoolValue(0);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
me._noPowerTime = 0;
|
||||
me.setOperative(0);
|
||||
if (!ADIRSnew._selfTest) {
|
||||
ADIRSnew.Lights.onBat.setBoolValue(0);
|
||||
}
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
var IR = {
|
||||
outputDisc: 0, # 0 = disc, 1 = normal
|
||||
# local vars
|
||||
_voltageMain: 0,
|
||||
_voltageBackup: 0,
|
||||
_voltageLimitedTime: 0,
|
||||
_noPowerTime: 0,
|
||||
_timeVar: 0,
|
||||
|
||||
outputOn: 0, # 0 = disc, 1 = normal
|
||||
mode: 0, # 0 = off, 1 = nav, 2 = att
|
||||
energised: 0, # 0 = off, 1 = on
|
||||
operative: 0, # 0 = off,
|
||||
input: [],
|
||||
output: [],
|
||||
|
||||
# methods
|
||||
new: func() {
|
||||
var ir = { parents:[IR] };
|
||||
return ir;
|
||||
},
|
||||
updateEnergized: func(mode) {
|
||||
me.energized = mode != 0 ? 1 : 0;
|
||||
updateEnergised: func(mode) {
|
||||
me.energised = mode != 0 ? 1 : 0;
|
||||
},
|
||||
updatePower: func(elec) {
|
||||
me._voltageMain = elec.getValue() or 0;
|
||||
return me._voltageMain;
|
||||
},
|
||||
updateBackupPower: func(elec, isLimited) {
|
||||
me._voltageBackup = elec.getValue() or 0;
|
||||
me._voltageLimitedTime = isLimited;
|
||||
return me._voltageBackup;
|
||||
},
|
||||
update: func() {
|
||||
me._timeVar = pts.Sim.Time.elapsedSec.getValue();
|
||||
if (me.energised and !me._voltageMain and me._voltageLimitedTime and me._noPowerTime == 0) {
|
||||
me._noPowerTime = me._timeVar;
|
||||
}
|
||||
|
||||
if (me._voltageMain or me._timeVar < me._noPowerTime + 300) {
|
||||
me.operative = (me.outputOn and me.energised and me.mode) ? 1 : 0;
|
||||
} else {
|
||||
me.operative = 0;
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
var ADIRSControlPanel = {
|
||||
adrSw: func(n) {
|
||||
if (n < 0 or n > _NUMADIRU) { return; }
|
||||
ADIRSnew._adrSwitchState = ADIRSnew.Switches.adrSw[n].getValue();
|
||||
print("Switching adr unit " ~ n ~ " to " ~ !ADIRSnew._adrSwitchState);
|
||||
ADIRSnew.Switches.adrSw[n].setValue(!ADIRSnew._adrSwitchState);
|
||||
if (ADIRSnew.ADRunits[n] != nil) {
|
||||
ADIRSnew.ADRunits[n].outputOn = !ADIRSnew._adrSwitchState;
|
||||
}
|
||||
ADIRSnew.Lights.adrOff[n].setValue(ADIRSnew._adrSwitchState);
|
||||
},
|
||||
irSw: func(n) {
|
||||
if (n < 0 or n > _NUMADIRU) { return; }
|
||||
ADIRSnew._irSwitchState = ADIRSnew.Switches.irSw[n].getValue();
|
||||
print("Switching ir unit " ~ n ~ " to " ~ !ADIRSnew._irSwitchState);
|
||||
ADIRSnew.Switches.irSw[n].setValue(!ADIRSnew._irSwitchState);
|
||||
if (ADIRSnew.IRunits[n] != nil) {
|
||||
ADIRSnew.IRunits[n].outputOn = !ADIRSnew._irSwitchState;
|
||||
}
|
||||
},
|
||||
irModeSw: func(n, mode) {
|
||||
if (n < 0 or n > _NUMADIRU) { return; }
|
||||
if (mode < 0 or mode > 2) { return; }
|
||||
me._irModeSwitchState = ADIRSnew.Switches.irModeSw[n].getValue();
|
||||
print("Switching adirs " ~ n ~ " to mode " ~ mode);
|
||||
if (ADIRSnew.ADRunits[n] != nil) {
|
||||
ADIRSnew.ADRunits[n].mode = mode;
|
||||
ADIRSnew.ADRunits[n].updateEnergised(mode);
|
||||
ADIRSnew.Switches.irModeSw[n].setValue(mode);
|
||||
}
|
||||
if (ADIRSnew.IRunits[n] != nil) {
|
||||
ADIRSnew.IRunits[n].mode = mode;
|
||||
ADIRSnew.IRunits[n].updateEnergised(mode);
|
||||
ADIRSnew.Switches.irModeSw[n].setValue(mode);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
var ADIRSnew = {
|
||||
# local vars
|
||||
_adrSwitchState: 0,
|
||||
_irSwitchState: 0,
|
||||
_irModeSwitchState: 0,
|
||||
_hasPower: 0,
|
||||
_oldOperative: [0, 0, 0],
|
||||
_flapPos: nil,
|
||||
_slatPos: nil,
|
||||
_selfTest: 0,
|
||||
_init: 0,
|
||||
|
||||
# ADIRS Units
|
||||
ADRunits: [nil, nil, nil],
|
||||
IRunits: [nil, nil, nil],
|
||||
|
||||
# Electrical
|
||||
mainSupply: [systems.ELEC.Bus.acEss, systems.ELEC.Bus.ac2, systems.ELEC.Bus.ac1],
|
||||
backupSupply: [[systems.ELEC.Bus.dcHot2, 0], [systems.ELEC.Bus.dcHot2, 1], [systems.ELEC.Bus.dcHot1, 1]],
|
||||
|
||||
# PTS
|
||||
Switches: {
|
||||
adrSw: [props.globals.getNode("/controls/navigation/adirscp/switches/adr-1"), props.globals.getNode("/controls/navigation/adirscp/switches/adr-2"), props.globals.getNode("/controls/navigation/adirscp/switches/adr-3")],
|
||||
irModeSw: [props.globals.getNode("/controls/navigation/adirscp/switches/ir-1-mode"), props.globals.getNode("/controls/navigation/adirscp/switches/ir-2-mode"), props.globals.getNode("/controls/navigation/adirscp/switches/ir-3-mode")],
|
||||
irSw: [props.globals.getNode("/controls/navigation/adirscp/switches/ir-1"), props.globals.getNode("/controls/navigation/adirscp/switches/ir-2"), props.globals.getNode("/controls/navigation/adirscp/switches/ir-3")],
|
||||
},
|
||||
Lights: {
|
||||
adrFault: [props.globals.getNode("/controls/navigation/adirscp/lights/adr-1-fault"), props.globals.getNode("/controls/navigation/adirscp/lights/adr-2-fault"), props.globals.getNode("/controls/navigation/adirscp/lights/adr-3-fault")],
|
||||
adrOff: [props.globals.getNode("/controls/navigation/adirscp/lights/adr-1-off"), props.globals.getNode("/controls/navigation/adirscp/lights/adr-2-off"), props.globals.getNode("/controls/navigation/adirscp/lights/adr-3-off")],
|
||||
|
@ -56,57 +203,26 @@ var ADIRSControlPanel = {
|
|||
irOff: [props.globals.getNode("/controls/navigation/adirscp/lights/ir-1-off"), props.globals.getNode("/controls/navigation/adirscp/lights/ir-2-off"), props.globals.getNode("/controls/navigation/adirscp/lights/ir-3-off")],
|
||||
onBat: props.globals.getNode("/controls/navigation/adirscp/lights/on-bat"),
|
||||
},
|
||||
|
||||
# Methods
|
||||
adrSw: func(n) {
|
||||
if (n < 0 or n > _NUMADIRU) { return; }
|
||||
me._adrSwitchState = me.Switches.adrSw[n].getValue();
|
||||
print("Switching adr unit " ~ n ~ " to " ~ !me._adrSwitchState);
|
||||
me.Switches.adrSw[n].setValue(!me._adrSwitchState);
|
||||
if (me.ADRunits[n] != nil) {
|
||||
me.ADRunits[n].outputDisc = !me._adrSwitchState;
|
||||
}
|
||||
},
|
||||
adrSw: func(n) {
|
||||
if (n < 0 or n > _NUMADIRU) { return; }
|
||||
me._irSwitchState = me.Switches.irSw[n].getValue();
|
||||
print("Switching ir unit " ~ n ~ " to " ~ !me._irSwitchState);
|
||||
me.Switches.irSw[n].setValue(!me._irSwitchState);
|
||||
if (me.IRunits[n] != nil) {
|
||||
me.IRunits[n].outputDisc = !me._irSwitchState;
|
||||
}
|
||||
},
|
||||
irModeSw: func(n, mode) {
|
||||
if (mode < 0 or mode > 2) { return; }
|
||||
me._irModeSwitchState = me.Switches.irModeSw[n].getValue();
|
||||
print("Switching adirs " ~ n ~ " to mode " ~ mode);
|
||||
if (me.ADRunits[n] != nil) {
|
||||
me.ADRunits[n].mode = mode;
|
||||
me.ADRunits[n].updateEnergized(mode);
|
||||
}
|
||||
if (me.IRunits[n] != nil) {
|
||||
me.IRunits[n].mode = mode;
|
||||
me.IRunits[n].updateEnergized(mode);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
var SwitchingPanel = {
|
||||
Switches: {
|
||||
attHdg: props.globals.getNode("/controls/navigation/switching/att-hdg"),
|
||||
airData: props.globals.getNode("/controls/navigation/switching/air-data"),
|
||||
adrSw: [props.globals.getNode("/controls/navigation/adirscp/switches/adr-1"), props.globals.getNode("/controls/navigation/adirscp/switches/adr-2"), props.globals.getNode("/controls/navigation/adirscp/switches/adr-3")],
|
||||
irModeSw: [props.globals.getNode("/controls/navigation/adirscp/switches/ir-1-mode"), props.globals.getNode("/controls/navigation/adirscp/switches/ir-2-mode"), props.globals.getNode("/controls/navigation/adirscp/switches/ir-3-mode")],
|
||||
irSw: [props.globals.getNode("/controls/navigation/adirscp/switches/ir-1"), props.globals.getNode("/controls/navigation/adirscp/switches/ir-2"), props.globals.getNode("/controls/navigation/adirscp/switches/ir-3")],
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
var ADIRSnew = {
|
||||
_flapPos: nil,
|
||||
_slatPos: nil,
|
||||
Operating: {
|
||||
adr: [props.globals.getNode("/systems/navigation/adr/operating-1"), props.globals.getNode("/systems/navigation/adr/operating-2"), props.globals.getNode("/systems/navigation/adr/operating-3")],
|
||||
},
|
||||
|
||||
# Nodes
|
||||
overspeedVFE: props.globals.initNode("/systems/navigation/adr/computation/overspeed-vfe-spd", 0, "INT"),
|
||||
|
||||
# System
|
||||
init: func() {
|
||||
for (i = 0; i < _NUMADIRU; i = i + 1) {
|
||||
print("Creating new ADR unit " ~ i);
|
||||
ADIRSControlPanel.ADRunits[i] = ADR.new();
|
||||
if (!me._init) {
|
||||
for (i = 0; i < _NUMADIRU; i = i + 1) {
|
||||
print("Creating new ADR unit " ~ i);
|
||||
me.ADRunits[i] = ADR.new();
|
||||
me._init = 1;
|
||||
}
|
||||
}
|
||||
},
|
||||
update_items: [
|
||||
|
@ -132,9 +248,47 @@ var ADIRSnew = {
|
|||
),
|
||||
],
|
||||
loop: func() {
|
||||
notification = nil;
|
||||
foreach (var update_item; me.update_items) {
|
||||
update_item.update(notification);
|
||||
if (me._init) {
|
||||
for (i = 0; i < _NUMADIRU; i = i + 1) {
|
||||
# update ADR units power
|
||||
me._hasPower = me.ADRunits[i].updatePower(me.mainSupply[i]);
|
||||
if (me._hasPower == 0) {
|
||||
me.ADRunits[i].updateBackupPower(me.backupSupply[i][0],me.backupSupply[i][1])
|
||||
}
|
||||
|
||||
# Update ADR units
|
||||
me.ADRunits[i].update();
|
||||
|
||||
if (me.ADRunits[i].operative != me._oldOperative[i]) {
|
||||
me._oldOperative[i] = me.ADRunits[i].operative;
|
||||
if (me.ADRunits[i].outputOn) {
|
||||
me.Operating.adr[i].setValue(me.ADRunits[i].operative);
|
||||
} else {
|
||||
me.Operating.adr[i].setValue(0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
# Update VFE
|
||||
notification = nil;
|
||||
foreach (var update_item; me.update_items) {
|
||||
update_item.update(notification);
|
||||
}
|
||||
}
|
||||
},
|
||||
selfTest: func() {
|
||||
print("Doing self test");
|
||||
ADIRSnew.Lights.onBat.setBoolValue(1);
|
||||
selfTestLoop.start();
|
||||
},
|
||||
|
||||
};
|
||||
|
||||
selfTestLoop = maketimer(0.2, func() {
|
||||
if (pts.Sim.Time.elapsedSec.getValue() > _selfTestTime + 5) {
|
||||
print("Self test done");
|
||||
ADIRSnew.Lights.onBat.setBoolValue(0);
|
||||
selfTestLoop.stop();
|
||||
ADIRSnew._selfTest = 0;
|
||||
}
|
||||
});
|
11
Nasal/ADIRS/SwitchingPanel.nas
Normal file
11
Nasal/ADIRS/SwitchingPanel.nas
Normal file
|
@ -0,0 +1,11 @@
|
|||
# A3XX Switching Panel
|
||||
# Jonathan Redpath (legoboyvdlp)
|
||||
|
||||
# Copyright (c) 2019 Jonathan Redpath (legoboyvdlp)
|
||||
|
||||
var SwitchingPanel = {
|
||||
Switches: {
|
||||
attHdg: props.globals.getNode("/controls/navigation/switching/att-hdg"),
|
||||
airData: props.globals.getNode("/controls/navigation/switching/air-data"),
|
||||
},
|
||||
};
|
|
@ -24,6 +24,7 @@ var ELEC = {
|
|||
dc1: props.globals.getNode("/systems/electrical/bus/dc-1"),
|
||||
dc2: props.globals.getNode("/systems/electrical/bus/dc-2"),
|
||||
dcHot1: props.globals.getNode("/systems/electrical/bus/dc-hot-1"),
|
||||
dcHot2: props.globals.getNode("/systems/electrical/bus/dc-hot-2"),
|
||||
},
|
||||
Fail: {
|
||||
acEssBusFault: props.globals.getNode("/systems/failures/electrical/ac-ess-bus"),
|
||||
|
|
|
@ -5,6 +5,49 @@
|
|||
<system name="A320: ADR">
|
||||
|
||||
<channel name="ADR Inputs">
|
||||
|
||||
<fcs_function name="aero/alpha-deg-corrected">
|
||||
<function>
|
||||
<product>
|
||||
<property>aero/alpha-deg</property>
|
||||
<table>
|
||||
<independentVar lookup="row">/velocities/groundspeed-mps</independentVar>
|
||||
<tableData>
|
||||
0 0.0
|
||||
2 0.0
|
||||
3 1.0
|
||||
</tableData>
|
||||
</table>
|
||||
</product>
|
||||
</function>
|
||||
</fcs_function>
|
||||
|
||||
<sensor name="/systems/navigation/probes/aoa-1">
|
||||
<input>aero/alpha-deg-corrected</input>
|
||||
<quantization name="/systems/navigation/adr/output/aoa-1">
|
||||
<bits>12</bits>
|
||||
<min>-180</min>
|
||||
<max>180</max>
|
||||
</quantization>
|
||||
</sensor>
|
||||
|
||||
<sensor name="/systems/navigation/probes/aoa-2">
|
||||
<input>aero/alpha-deg-corrected</input>
|
||||
<quantization name="/systems/navigation/adr/output/aoa-2">
|
||||
<bits>12</bits>
|
||||
<min>-180</min>
|
||||
<max>180</max>
|
||||
</quantization>
|
||||
</sensor>
|
||||
|
||||
<sensor name="/systems/navigation/probes/aoa-3">
|
||||
<input>aero/alpha-deg-corrected</input>
|
||||
<quantization name="/systems/navigation/adr/output/aoa-3">
|
||||
<bits>12</bits>
|
||||
<min>-180</min>
|
||||
<max>180</max>
|
||||
</quantization>
|
||||
</sensor>
|
||||
|
||||
<sensor name="/systems/navigation/probes/pitot-1">
|
||||
<input>/systems/pitot[0]/measured-total-pressure-inhg</input>
|
||||
|
@ -98,33 +141,6 @@
|
|||
</quantization>
|
||||
</sensor>
|
||||
|
||||
<sensor name="/systems/navigation/probes/aoa-1">
|
||||
<input>aero/alpha-deg</input>
|
||||
<quantization name="/systems/navigation/adr/output/aoa-1">
|
||||
<bits>12</bits>
|
||||
<min>-180</min>
|
||||
<max>180</max>
|
||||
</quantization>
|
||||
</sensor>
|
||||
|
||||
<sensor name="/systems/navigation/probes/aoa-2">
|
||||
<input>aero/alpha-deg</input>
|
||||
<quantization name="/systems/navigation/adr/output/aoa-2">
|
||||
<bits>12</bits>
|
||||
<min>-180</min>
|
||||
<max>180</max>
|
||||
</quantization>
|
||||
</sensor>
|
||||
|
||||
<sensor name="/systems/navigation/probes/aoa-3">
|
||||
<input>aero/alpha-deg</input>
|
||||
<quantization name="/systems/navigation/adr/output/aoa-3">
|
||||
<bits>12</bits>
|
||||
<min>-180</min>
|
||||
<max>180</max>
|
||||
</quantization>
|
||||
</sensor>
|
||||
|
||||
</channel>
|
||||
|
||||
<channel name="ADR Computation">
|
||||
|
@ -237,98 +253,129 @@
|
|||
</quantization>
|
||||
</sensor>
|
||||
|
||||
<fcs_function name="/systems/navigation/adr/computation/cas-1-product">
|
||||
<function>
|
||||
<product>
|
||||
<value>5</value>
|
||||
<difference>
|
||||
<pow>
|
||||
<sum>
|
||||
<quotient>
|
||||
<difference>
|
||||
<property>/systems/navigation/probes/pitot-1</property> <!-- impact pressure -->
|
||||
<property>/systems/navigation/probes/static-1</property>
|
||||
</difference>
|
||||
<value>29.9212553</value> <!-- use standard outside pressure -->
|
||||
</quotient>
|
||||
<value>1</value>
|
||||
</sum>
|
||||
<quotient>
|
||||
<value>2</value>
|
||||
<value>7</value>
|
||||
</quotient>
|
||||
</pow>
|
||||
<value>1</value>
|
||||
</difference>
|
||||
</product>
|
||||
</function>
|
||||
<clipto>
|
||||
<min>0</min>
|
||||
<max>9999999999999999</max>
|
||||
</clipto>
|
||||
</fcs_function>
|
||||
|
||||
<fcs_function name="/systems/navigation/adr/computation/cas-1-compute"> <!-- same as mach but with sea level pressure and multiplied by speed of sound at sea level -->
|
||||
<function>
|
||||
<product>
|
||||
<value>661.47</value>
|
||||
<pow>
|
||||
<product>
|
||||
<value>5</value>
|
||||
<difference>
|
||||
<pow>
|
||||
<sum>
|
||||
<quotient>
|
||||
<difference>
|
||||
<property>/systems/navigation/probes/pitot-1</property> <!-- impact pressure -->
|
||||
<property>/systems/navigation/probes/static-1</property>
|
||||
</difference>
|
||||
<value>29.9212553</value> <!-- use standard outside pressure -->
|
||||
</quotient>
|
||||
<value>1</value>
|
||||
</sum>
|
||||
<quotient>
|
||||
<value>2</value>
|
||||
<value>7</value>
|
||||
</quotient>
|
||||
</pow>
|
||||
<value>1</value>
|
||||
</difference>
|
||||
</product>
|
||||
<property>/systems/navigation/adr/computation/cas-1-product</property>
|
||||
<value>0.5</value>
|
||||
</pow>
|
||||
</product>
|
||||
</function>
|
||||
</fcs_function>
|
||||
|
||||
<fcs_function name="/systems/navigation/adr/computation/cas-2-product">
|
||||
<function>
|
||||
<product>
|
||||
<value>5</value>
|
||||
<difference>
|
||||
<pow>
|
||||
<sum>
|
||||
<quotient>
|
||||
<difference>
|
||||
<property>/systems/navigation/probes/pitot-2</property> <!-- impact pressure -->
|
||||
<property>/systems/navigation/probes/static-2</property>
|
||||
</difference>
|
||||
<value>29.9212553</value> <!-- use standard outside pressure -->
|
||||
</quotient>
|
||||
<value>1</value>
|
||||
</sum>
|
||||
<quotient>
|
||||
<value>2</value>
|
||||
<value>7</value>
|
||||
</quotient>
|
||||
</pow>
|
||||
<value>1</value>
|
||||
</difference>
|
||||
</product>
|
||||
</function>
|
||||
<clipto>
|
||||
<min>0</min>
|
||||
<max>9999999999999999</max>
|
||||
</clipto>
|
||||
</fcs_function>
|
||||
|
||||
<fcs_function name="/systems/navigation/adr/computation/cas-2-compute">
|
||||
<function>
|
||||
<product>
|
||||
<value>661.47</value>
|
||||
<pow>
|
||||
<product>
|
||||
<value>5</value>
|
||||
<difference>
|
||||
<pow>
|
||||
<sum>
|
||||
<quotient>
|
||||
<difference>
|
||||
<property>/systems/navigation/probes/pitot-2</property>
|
||||
<property>/systems/navigation/probes/static-2</property>
|
||||
</difference>
|
||||
<value>29.9212553</value>
|
||||
</quotient>
|
||||
<value>1</value>
|
||||
</sum>
|
||||
<quotient>
|
||||
<value>2</value>
|
||||
<value>7</value>
|
||||
</quotient>
|
||||
</pow>
|
||||
<value>1</value>
|
||||
</difference>
|
||||
</product>
|
||||
<property>/systems/navigation/adr/computation/cas-2-product</property>
|
||||
<value>0.5</value>
|
||||
</pow>
|
||||
</product>
|
||||
</function>
|
||||
</fcs_function>
|
||||
|
||||
<fcs_function name="/systems/navigation/adr/computation/cas-3-product">
|
||||
<function>
|
||||
<product>
|
||||
<value>5</value>
|
||||
<difference>
|
||||
<pow>
|
||||
<sum>
|
||||
<quotient>
|
||||
<difference>
|
||||
<property>/systems/navigation/probes/pitot-3</property> <!-- impact pressure -->
|
||||
<property>/systems/navigation/probes/static-3</property>
|
||||
</difference>
|
||||
<value>29.9212553</value> <!-- use standard outside pressure -->
|
||||
</quotient>
|
||||
<value>1</value>
|
||||
</sum>
|
||||
<quotient>
|
||||
<value>2</value>
|
||||
<value>7</value>
|
||||
</quotient>
|
||||
</pow>
|
||||
<value>1</value>
|
||||
</difference>
|
||||
</product>
|
||||
</function>
|
||||
<clipto>
|
||||
<min>0</min>
|
||||
<max>9999999999999999</max>
|
||||
</clipto>
|
||||
</fcs_function>
|
||||
|
||||
<fcs_function name="/systems/navigation/adr/computation/cas-3-compute">
|
||||
<function>
|
||||
<product>
|
||||
<value>661.47</value>
|
||||
<pow>
|
||||
<product>
|
||||
<value>5</value>
|
||||
<difference>
|
||||
<pow>
|
||||
<sum>
|
||||
<quotient>
|
||||
<difference>
|
||||
<property>/systems/navigation/probes/pitot-3</property> <!-- impact pressure -->
|
||||
<property>/systems/navigation/probes/static-3</property>
|
||||
</difference>
|
||||
<value>29.9212553</value> <!-- use standard outside pressure -->
|
||||
</quotient>
|
||||
<value>1</value>
|
||||
</sum>
|
||||
<quotient>
|
||||
<value>2</value>
|
||||
<value>7</value>
|
||||
</quotient>
|
||||
</pow>
|
||||
<value>1</value>
|
||||
</difference>
|
||||
</product>
|
||||
<property>/systems/navigation/adr/computation/cas-3-product</property>
|
||||
<value>0.5</value>
|
||||
</pow>
|
||||
</product>
|
||||
|
@ -680,151 +727,7 @@
|
|||
</function>
|
||||
</fcs_function>
|
||||
|
||||
</channel>
|
||||
|
||||
<channel name="ADR Output"> <!-- todo - need lowpass? -->
|
||||
|
||||
<pure_gain name="/systems/navigation/adr/output/aoa-1">
|
||||
<input>/systems/navigation/probes/aoa-1</input>
|
||||
<gain>1</gain>
|
||||
</pure_gain>
|
||||
|
||||
<pure_gain name="/systems/navigation/adr/output/aoa-2">
|
||||
<input>/systems/navigation/probes/aoa-2</input>
|
||||
<gain>1</gain>
|
||||
</pure_gain>
|
||||
|
||||
<pure_gain name="/systems/navigation/adr/output/aoa-3">
|
||||
<input>/systems/navigation/probes/aoa-3</input>
|
||||
<gain>1</gain>
|
||||
</pure_gain>
|
||||
|
||||
<pure_gain name="/systems/navigation/adr/output/baro-alt-1-capt">
|
||||
<input>/systems/navigation/adr/computation/baro-alt-1-capt</input>
|
||||
<gain>1</gain>
|
||||
</pure_gain>
|
||||
|
||||
<pure_gain name="/systems/navigation/adr/output/baro-alt-2-capt">
|
||||
<input>/systems/navigation/adr/computation/baro-alt-2-capt</input>
|
||||
<gain>1</gain>
|
||||
</pure_gain>
|
||||
|
||||
<pure_gain name="/systems/navigation/adr/output/baro-alt-3-capt">
|
||||
<input>/systems/navigation/adr/computation/baro-alt-3-capt</input>
|
||||
<gain>1</gain>
|
||||
</pure_gain>
|
||||
|
||||
<pure_gain name="/systems/navigation/adr/output/baro-alt-1-fo">
|
||||
<input>/systems/navigation/adr/computation/baro-alt-1-fo</input>
|
||||
<gain>1</gain>
|
||||
</pure_gain>
|
||||
|
||||
<pure_gain name="/systems/navigation/adr/output/baro-alt-2-capt">
|
||||
<input>/systems/navigation/adr/computation/baro-alt-2-fo</input>
|
||||
<gain>1</gain>
|
||||
</pure_gain>
|
||||
|
||||
<pure_gain name="/systems/navigation/adr/output/baro-alt-3-fo">
|
||||
<input>/systems/navigation/adr/computation/baro-alt-3-fo</input>
|
||||
<gain>1</gain>
|
||||
</pure_gain>
|
||||
|
||||
<pure_gain name="/systems/navigation/adr/output/baro-alt-corrected-1-capt">
|
||||
<input>/systems/navigation/adr/computation/baro-alt-corrected-1-capt</input>
|
||||
<gain>1</gain>
|
||||
</pure_gain>
|
||||
|
||||
<pure_gain name="/systems/navigation/adr/output/baro-alt-corrected-2-capt">
|
||||
<input>/systems/navigation/adr/computation/baro-alt-corrected-2-capt</input>
|
||||
<gain>1</gain>
|
||||
</pure_gain>
|
||||
|
||||
<pure_gain name="/systems/navigation/adr/output/baro-alt-corrected-3-capt">
|
||||
<input>/systems/navigation/adr/computation/baro-alt-corrected-3-capt</input>
|
||||
<gain>1</gain>
|
||||
</pure_gain>
|
||||
|
||||
<pure_gain name="/systems/navigation/adr/output/baro-alt-corrected-1-fo">
|
||||
<input>/systems/navigation/adr/computation/baro-alt-corrected-1-fo</input>
|
||||
<gain>1</gain>
|
||||
</pure_gain>
|
||||
|
||||
<pure_gain name="/systems/navigation/adr/output/baro-alt-corrected-2-capt">
|
||||
<input>/systems/navigation/adr/computation/baro-alt-corrected-2-fo</input>
|
||||
<gain>1</gain>
|
||||
</pure_gain>
|
||||
|
||||
<pure_gain name="/systems/navigation/adr/output/baro-alt-corrected-3-fo">
|
||||
<input>/systems/navigation/adr/computation/baro-alt-corrected-3-fo</input>
|
||||
<gain>1</gain>
|
||||
</pure_gain>
|
||||
|
||||
<pure_gain name="/systems/navigation/adr/output/cas-1">
|
||||
<input>/systems/navigation/adr/computation/cas-1</input>
|
||||
<gain>1</gain>
|
||||
</pure_gain>
|
||||
|
||||
<pure_gain name="/systems/navigation/adr/output/cas-2">
|
||||
<input>/systems/navigation/adr/computation/cas-2</input>
|
||||
<gain>1</gain>
|
||||
</pure_gain>
|
||||
|
||||
<pure_gain name="/systems/navigation/adr/output/cas-3">
|
||||
<input>/systems/navigation/adr/computation/cas-3</input>
|
||||
<gain>1</gain>
|
||||
</pure_gain>
|
||||
|
||||
<pure_gain name="/systems/navigation/adr/output/mach-1">
|
||||
<input>/systems/navigation/adr/computation/mach-1</input>
|
||||
<gain>1</gain>
|
||||
</pure_gain>
|
||||
|
||||
<pure_gain name="/systems/navigation/adr/output/mach-2">
|
||||
<input>/systems/navigation/adr/computation/mach-2</input>
|
||||
<gain>1</gain>
|
||||
</pure_gain>
|
||||
|
||||
<pure_gain name="/systems/navigation/adr/output/mach-3">
|
||||
<input>/systems/navigation/adr/computation/mach-3</input>
|
||||
<gain>1</gain>
|
||||
</pure_gain>
|
||||
|
||||
<pure_gain name="/systems/navigation/adr/output/sat-1">
|
||||
<input>/systems/navigation/adr/computation/sat-1</input>
|
||||
<gain>1</gain>
|
||||
</pure_gain>
|
||||
|
||||
<pure_gain name="/systems/navigation/adr/output/sat-2">
|
||||
<input>/systems/navigation/adr/computation/sat-2</input>
|
||||
<gain>1</gain>
|
||||
</pure_gain>
|
||||
|
||||
<pure_gain name="/systems/navigation/adr/output/tas-1">
|
||||
<input>/systems/navigation/adr/computation/tas-1</input>
|
||||
<gain>1</gain>
|
||||
</pure_gain>
|
||||
|
||||
<pure_gain name="/systems/navigation/adr/output/tas-2">
|
||||
<input>/systems/navigation/adr/computation/tas-2</input>
|
||||
<gain>1</gain>
|
||||
</pure_gain>
|
||||
|
||||
<pure_gain name="/systems/navigation/adr/output/tas-3">
|
||||
<input>/systems/navigation/adr/computation/tas-3</input>
|
||||
<gain>1</gain>
|
||||
</pure_gain>
|
||||
|
||||
<pure_gain name="/systems/navigation/adr/output/tat-1">
|
||||
<input>/systems/navigation/probes/tat-1/tat</input>
|
||||
<gain>1</gain>
|
||||
</pure_gain>
|
||||
|
||||
<pure_gain name="/systems/navigation/adr/output/tat-2">
|
||||
<input>/systems/navigation/probes/tat-2/tat</input>
|
||||
<gain>1</gain>
|
||||
</pure_gain>
|
||||
|
||||
<fcs_function name="/systems/navigation/adr/output/overspeed">
|
||||
<fcs_function name="/systems/navigation/adr/computation/overspeed">
|
||||
<function>
|
||||
<max>
|
||||
<property>/systems/navigation/adr/computation/overspeed-vmo</property>
|
||||
|
@ -834,6 +737,183 @@
|
|||
</max>
|
||||
</function>
|
||||
</fcs_function>
|
||||
|
||||
</channel>
|
||||
|
||||
<channel name="ADR Output"> <!-- todo - need lowpass? -->
|
||||
|
||||
<pure_gain name="/systems/navigation/adr/output/aoa-1">
|
||||
<input>/systems/navigation/probes/aoa-1</input>
|
||||
<gain>/systems/navigation/adr/operating-1</gain>
|
||||
</pure_gain>
|
||||
|
||||
<pure_gain name="/systems/navigation/adr/output/aoa-2">
|
||||
<input>/systems/navigation/probes/aoa-2</input>
|
||||
<gain>/systems/navigation/adr/operating-2</gain>
|
||||
</pure_gain>
|
||||
|
||||
<pure_gain name="/systems/navigation/adr/output/aoa-3">
|
||||
<input>/systems/navigation/probes/aoa-3</input>
|
||||
<gain>/systems/navigation/adr/operating-3</gain>
|
||||
</pure_gain>
|
||||
|
||||
<pure_gain name="/systems/navigation/adr/output/baro-alt-1-capt">
|
||||
<input>/systems/navigation/adr/computation/baro-alt-1-capt</input>
|
||||
<gain>/systems/navigation/adr/operating-1</gain>
|
||||
</pure_gain>
|
||||
|
||||
<pure_gain name="/systems/navigation/adr/output/baro-alt-2-capt">
|
||||
<input>/systems/navigation/adr/computation/baro-alt-2-capt</input>
|
||||
<gain>/systems/navigation/adr/operating-2</gain>
|
||||
</pure_gain>
|
||||
|
||||
<pure_gain name="/systems/navigation/adr/output/baro-alt-3-capt">
|
||||
<input>/systems/navigation/adr/computation/baro-alt-3-capt</input>
|
||||
<gain>/systems/navigation/adr/operating-3</gain>
|
||||
</pure_gain>
|
||||
|
||||
<pure_gain name="/systems/navigation/adr/output/baro-alt-1-fo">
|
||||
<input>/systems/navigation/adr/computation/baro-alt-1-fo</input>
|
||||
<gain>/systems/navigation/adr/operating-1</gain>
|
||||
</pure_gain>
|
||||
|
||||
<pure_gain name="/systems/navigation/adr/output/baro-alt-2-capt">
|
||||
<input>/systems/navigation/adr/computation/baro-alt-2-fo</input>
|
||||
<gain>/systems/navigation/adr/operating-2</gain>
|
||||
</pure_gain>
|
||||
|
||||
<pure_gain name="/systems/navigation/adr/output/baro-alt-3-fo">
|
||||
<input>/systems/navigation/adr/computation/baro-alt-3-fo</input>
|
||||
<gain>/systems/navigation/adr/operating-3</gain>
|
||||
</pure_gain>
|
||||
|
||||
<pure_gain name="/systems/navigation/adr/output/baro-alt-corrected-1-capt">
|
||||
<input>/systems/navigation/adr/computation/baro-alt-corrected-1-capt</input>
|
||||
<gain>/systems/navigation/adr/operating-1</gain>
|
||||
</pure_gain>
|
||||
|
||||
<pure_gain name="/systems/navigation/adr/output/baro-alt-corrected-2-capt">
|
||||
<input>/systems/navigation/adr/computation/baro-alt-corrected-2-capt</input>
|
||||
<gain>/systems/navigation/adr/operating-2</gain>
|
||||
</pure_gain>
|
||||
|
||||
<pure_gain name="/systems/navigation/adr/output/baro-alt-corrected-3-capt">
|
||||
<input>/systems/navigation/adr/computation/baro-alt-corrected-3-capt</input>
|
||||
<gain>/systems/navigation/adr/operating-3</gain>
|
||||
</pure_gain>
|
||||
|
||||
<pure_gain name="/systems/navigation/adr/output/baro-alt-corrected-1-fo">
|
||||
<input>/systems/navigation/adr/computation/baro-alt-corrected-1-fo</input>
|
||||
<gain>/systems/navigation/adr/operating-1</gain>
|
||||
</pure_gain>
|
||||
|
||||
<pure_gain name="/systems/navigation/adr/output/baro-alt-corrected-2-capt">
|
||||
<input>/systems/navigation/adr/computation/baro-alt-corrected-2-fo</input>
|
||||
<gain>/systems/navigation/adr/operating-2</gain>
|
||||
</pure_gain>
|
||||
|
||||
<pure_gain name="/systems/navigation/adr/output/baro-alt-corrected-3-fo">
|
||||
<input>/systems/navigation/adr/computation/baro-alt-corrected-3-fo</input>
|
||||
<gain>/systems/navigation/adr/operating-3</gain>
|
||||
</pure_gain>
|
||||
|
||||
<pure_gain name="/systems/navigation/adr/output/cas-1">
|
||||
<input>/systems/navigation/adr/computation/cas-1</input>
|
||||
<gain>/systems/navigation/adr/operating-1</gain>
|
||||
</pure_gain>
|
||||
|
||||
<pure_gain name="/systems/navigation/adr/output/cas-2">
|
||||
<input>/systems/navigation/adr/computation/cas-2</input>
|
||||
<gain>/systems/navigation/adr/operating-2</gain>
|
||||
</pure_gain>
|
||||
|
||||
<pure_gain name="/systems/navigation/adr/output/cas-3">
|
||||
<input>/systems/navigation/adr/computation/cas-3</input>
|
||||
<gain>/systems/navigation/adr/operating-3</gain>
|
||||
</pure_gain>
|
||||
|
||||
<pure_gain name="/systems/navigation/adr/output/mach-1">
|
||||
<input>/systems/navigation/adr/computation/mach-1</input>
|
||||
<gain>/systems/navigation/adr/operating-1</gain>
|
||||
</pure_gain>
|
||||
|
||||
<pure_gain name="/systems/navigation/adr/output/mach-2">
|
||||
<input>/systems/navigation/adr/computation/mach-2</input>
|
||||
<gain>/systems/navigation/adr/operating-2</gain>
|
||||
</pure_gain>
|
||||
|
||||
<pure_gain name="/systems/navigation/adr/output/mach-3">
|
||||
<input>/systems/navigation/adr/computation/mach-3</input>
|
||||
<gain>/systems/navigation/adr/operating-3</gain>
|
||||
</pure_gain>
|
||||
|
||||
<pure_gain name="/systems/navigation/adr/output/sat-1">
|
||||
<input>/systems/navigation/adr/computation/sat-1</input>
|
||||
<gain>/systems/navigation/adr/operating-1</gain>
|
||||
</pure_gain>
|
||||
|
||||
<pure_gain name="/systems/navigation/adr/output/sat-2">
|
||||
<input>/systems/navigation/adr/computation/sat-2</input>
|
||||
<gain>/systems/navigation/adr/operating-2</gain>
|
||||
</pure_gain>
|
||||
|
||||
<pure_gain name="/systems/navigation/adr/output/tas-1">
|
||||
<input>/systems/navigation/adr/computation/tas-1</input>
|
||||
<gain>/systems/navigation/adr/operating-1</gain>
|
||||
</pure_gain>
|
||||
|
||||
<pure_gain name="/systems/navigation/adr/output/tas-2">
|
||||
<input>/systems/navigation/adr/computation/tas-2</input>
|
||||
<gain>/systems/navigation/adr/operating-2</gain>
|
||||
</pure_gain>
|
||||
|
||||
<pure_gain name="/systems/navigation/adr/output/tas-3">
|
||||
<input>/systems/navigation/adr/computation/tas-3</input>
|
||||
<gain>/systems/navigation/adr/operating-3</gain>
|
||||
</pure_gain>
|
||||
|
||||
<pure_gain name="/systems/navigation/adr/output/tat-1">
|
||||
<input>/systems/navigation/probes/tat-1/tat</input>
|
||||
<gain>/systems/navigation/adr/operating-1</gain>
|
||||
</pure_gain>
|
||||
|
||||
<pure_gain name="/systems/navigation/adr/output/tat-2">
|
||||
<input>/systems/navigation/probes/tat-2/tat</input>
|
||||
<gain>/systems/navigation/adr/operating-2</gain>
|
||||
</pure_gain>
|
||||
|
||||
<fcs_function name="/systems/navigation/adr/any-adr-on">
|
||||
<function>
|
||||
<max>
|
||||
<property>/systems/navigation/adr/operating-1</property>
|
||||
<property>/systems/navigation/adr/operating-2</property>
|
||||
<property>/systems/navigation/adr/operating-3</property>
|
||||
</max>
|
||||
</function>
|
||||
</fcs_function>
|
||||
|
||||
<pure_gain name="/systems/navigation/adr/output/overspeed">
|
||||
<input>/systems/navigation/adr/computation/overspeed</input>
|
||||
<gain>/systems/navigation/adr/any-adr-on</gain>
|
||||
</pure_gain>
|
||||
|
||||
<pure_gain name="/instrumentation/radar-altimeter[0]/radar-altitude-ft-corrected">
|
||||
<input>/instrumentation/radar-altimeter[0]/radar-altitude-ft</input>
|
||||
<gain>1</gain>
|
||||
<clipto>
|
||||
<min>0</min>
|
||||
<max>5000</max>
|
||||
</clipto>
|
||||
</pure_gain>
|
||||
|
||||
<pure_gain name="/instrumentation/radar-altimeter[1]/radar-altitude-ft">
|
||||
<input>/instrumentation/radar-altimeter[1]/radar-altitude-ft</input>
|
||||
<gain>1</gain>
|
||||
<clipto>
|
||||
<min>0</min>
|
||||
<max>5000</max>
|
||||
</clipto>
|
||||
</pure_gain>
|
||||
</channel>
|
||||
|
||||
</system>
|
||||
|
|
|
@ -1348,8 +1348,8 @@
|
|||
<test value="/systems/electrical/bus/dc-2">
|
||||
/systems/electrical/bus/dc-2 ge 25
|
||||
</test>
|
||||
<output>/systems/electrical/outputs/adf</output>
|
||||
<output>/systems/electrical/outputs/dme</output>
|
||||
<!--<output>/systems/electrical/outputs/adf</output>
|
||||
<output>/systems/electrical/outputs/dme</output>-->
|
||||
<output>/systems/electrical/outputs/efis</output>
|
||||
<output>/systems/electrical/outputs/fcp-power</output>
|
||||
<output>/systems/electrical/outputs/fuel-pump[0]</output>
|
||||
|
@ -1357,10 +1357,10 @@
|
|||
<output>/systems/electrical/outputs/fuel-pump[2]</output>
|
||||
<output>/systems/electrical/outputs/gps</output>
|
||||
<output>/systems/electrical/outputs/mk-viii</output>
|
||||
<output>/systems/electrical/outputs/nav[0]</output>
|
||||
<!--<output>/systems/electrical/outputs/nav[0]</output>
|
||||
<output>/systems/electrical/outputs/nav[1]</output>
|
||||
<output>/systems/electrical/outputs/nav[2]</output>
|
||||
<output>/systems/electrical/outputs/nav[3]</output>
|
||||
<output>/systems/electrical/outputs/nav[3]</output>-->
|
||||
<output>/systems/electrical/outputs/tacan</output>
|
||||
<output>/systems/electrical/outputs/turn-coordinator</output>
|
||||
</switch>
|
||||
|
@ -1368,9 +1368,7 @@
|
|||
|
||||
<!-- Notes -->
|
||||
<!-- Priority: eng, ext, apu but EXT ON lt stays on even when not feeding a/c -->
|
||||
<!-- Ground service bus connected directly to input-volt -->
|
||||
<!-- TR 2 fail leads to loss of gnd FLT bus -->
|
||||
<!-- TODO: Galley: During single generator is off, if GALY AND CAB pb is off (TODO: Do we have this?) is off -->
|
||||
|
||||
<channel name="Overhead Lights" execrate="8">
|
||||
|
||||
|
|
|
@ -9,18 +9,22 @@
|
|||
<adf>
|
||||
<name>adf</name>
|
||||
<number>0</number>
|
||||
<power-supply>/systems/electrical/bus/ac-ess-shed</power-supply>
|
||||
<minimum-supply-volts>109.9</minimum-supply-volts>
|
||||
</adf>
|
||||
|
||||
<adf>
|
||||
<name>adf</name>
|
||||
<number>1</number>
|
||||
<power-supply>/systems/electrical/bus/ac-2</power-supply>
|
||||
<minimum-supply-volts>109.9</minimum-supply-volts>
|
||||
</adf>
|
||||
|
||||
<airspeed-indicator>
|
||||
<name>airspeed-indicator</name>
|
||||
<name>airspeed-indicator</name> <!-- standby, measure directly, not via ADR -->
|
||||
<number>0</number>
|
||||
<total-pressure>/systems/pitot/total-pressure-inhg</total-pressure>
|
||||
<static-pressure>/systems/static/pressure-inhg</static-pressure>
|
||||
<total-pressure>/systems/pitot[2]/measured-total-pressure-inhg</total-pressure>
|
||||
<static-pressure>/systems/static[2]/pressure-inhg</static-pressure>
|
||||
</airspeed-indicator>
|
||||
|
||||
<altimeter>
|
||||
|
@ -83,6 +87,13 @@
|
|||
<encode-mode-s>1</encode-mode-s>
|
||||
</altimeter>
|
||||
|
||||
<altimeter>
|
||||
<name>altimeter</name> <!-- standby, measure directly, not via ADR -->
|
||||
<number>6</number>
|
||||
<static-pressure>/systems/static[2]/pressure-inhg</static-pressure>
|
||||
<tau>0.1</tau>
|
||||
</altimeter>
|
||||
|
||||
<attitude-indicator>
|
||||
<name>attitude-indicator</name>
|
||||
<number>0</number>
|
||||
|
@ -115,21 +126,29 @@
|
|||
<dme>
|
||||
<name>dme</name>
|
||||
<number>0</number>
|
||||
<power-supply>/systems/electrical/bus/ac-ess-shed</power-supply>
|
||||
<minimum-supply-volts>109.9</minimum-supply-volts>
|
||||
</dme>
|
||||
|
||||
<dme>
|
||||
<name>dme</name>
|
||||
<number>1</number>
|
||||
<power-supply>/systems/electrical/bus/ac-2</power-supply>
|
||||
<minimum-supply-volts>109.9</minimum-supply-volts>
|
||||
</dme>
|
||||
|
||||
<dme>
|
||||
<dme> <!-- fake extra dme units for the ILS -->
|
||||
<name>dme</name>
|
||||
<number>2</number>
|
||||
<power-supply>/systems/electrical/bus/ac-ess-shed</power-supply>
|
||||
<minimum-supply-volts>109.9</minimum-supply-volts>
|
||||
</dme>
|
||||
|
||||
<dme>
|
||||
<name>dme</name>
|
||||
<number>3</number>
|
||||
<power-supply>/systems/electrical/bus/ac-2</power-supply>
|
||||
<minimum-supply-volts>109.9</minimum-supply-volts>
|
||||
</dme>
|
||||
|
||||
<altimeter>
|
||||
|
@ -161,24 +180,39 @@
|
|||
<number>0</number>
|
||||
</magnetic-compass>
|
||||
|
||||
<nav-radio>
|
||||
<marker-beacon> <!-- part of VOR1 unit -->
|
||||
<name>marker-beacon</name>
|
||||
<number>0</number>
|
||||
<power-supply>/systems/electrical/bus/ac-ess-shed</power-supply>
|
||||
<minimum-supply-volts>109.9</minimum-supply-volts>
|
||||
</marker-beacon>
|
||||
|
||||
<nav-radio> <!-- VOR unit -->
|
||||
<name>nav</name>
|
||||
<number>0</number>
|
||||
<power-supply>/systems/electrical/bus/ac-ess-shed</power-supply>
|
||||
<minimum-supply-volts>109.9</minimum-supply-volts>
|
||||
</nav-radio>
|
||||
|
||||
<nav-radio>
|
||||
<name>nav</name>
|
||||
<number>1</number>
|
||||
<power-supply>/systems/electrical/bus/ac-2</power-supply>
|
||||
<minimum-supply-volts>109.9</minimum-supply-volts>
|
||||
</nav-radio>
|
||||
|
||||
<nav-radio>
|
||||
<nav-radio> <!-- ILS unit -->
|
||||
<name>nav</name>
|
||||
<number>2</number>
|
||||
<power-supply>/systems/electrical/bus/ac-ess-shed</power-supply>
|
||||
<minimum-supply-volts>109.9</minimum-supply-volts>
|
||||
</nav-radio>
|
||||
|
||||
<nav-radio>
|
||||
<name>nav</name>
|
||||
<number>3</number>
|
||||
<power-supply>/systems/electrical/bus/ac-2</power-supply>
|
||||
<minimum-supply-volts>109.9</minimum-supply-volts>
|
||||
</nav-radio>
|
||||
|
||||
<slip-skid-ball>
|
||||
|
@ -218,6 +252,8 @@
|
|||
<intruder-use-own-alt>1</intruder-use-own-alt>
|
||||
<intruder-inhibit-alt-ft>380</intruder-inhibit-alt-ft>
|
||||
<intruder-minimum-own-alt-ft>1700</intruder-minimum-own-alt-ft> uncomment for 2019.3 -->
|
||||
<power-supply>/systems/electrical/bus/ac-1</power-supply>
|
||||
<minimum-supply-volts>109.9</minimum-supply-volts>
|
||||
</tcas>
|
||||
|
||||
<radar>
|
||||
|
@ -225,6 +261,22 @@
|
|||
<number>0</number>
|
||||
</radar>
|
||||
|
||||
<radar-altimeter>
|
||||
<name>radar-altimeter</name>
|
||||
<number>0</number>
|
||||
<update-interval-sec>0.0666</update-interval-sec>
|
||||
<power-supply>/systems/electrical/bus/ac-1</power-supply>
|
||||
<minimum-supply-volts>109.9</minimum-supply-volts>
|
||||
</radar-altimeter>
|
||||
|
||||
<radar-altimeter>
|
||||
<name>radar-altimeter</name>
|
||||
<number>1</number>
|
||||
<update-interval-sec>0.0666</update-interval-sec>
|
||||
<power-supply>/systems/electrical/bus/ac-2</power-supply>
|
||||
<minimum-supply-volts>109.9</minimum-supply-volts>
|
||||
</radar-altimeter>
|
||||
|
||||
<tacan>
|
||||
<name>tacan</name>
|
||||
<number>0</number>
|
||||
|
|
Loading…
Reference in a new issue