diff --git a/A320-100-CFM.xml b/A320-100-CFM.xml
index 68189533..99876d47 100644
--- a/A320-100-CFM.xml
+++ b/A320-100-CFM.xml
@@ -169,6 +169,8 @@ xsi:noNamespaceSchemaLocation="http://jsbsim.sourceforge.net/JSBSim.xsd">
+
+
diff --git a/A320-200-CFM.xml b/A320-200-CFM.xml
index 7aa13e60..0840352d 100644
--- a/A320-200-CFM.xml
+++ b/A320-200-CFM.xml
@@ -161,6 +161,7 @@ xsi:noNamespaceSchemaLocation="http://jsbsim.sourceforge.net/JSBSim.xsd">
+
@@ -168,6 +169,8 @@ xsi:noNamespaceSchemaLocation="http://jsbsim.sourceforge.net/JSBSim.xsd">
+
+
diff --git a/A320-200-IAE.xml b/A320-200-IAE.xml
index dfcbc9f4..fd7dac96 100644
--- a/A320-200-IAE.xml
+++ b/A320-200-IAE.xml
@@ -168,6 +168,8 @@ xsi:noNamespaceSchemaLocation="http://jsbsim.sourceforge.net/JSBSim.xsd">
+
+
diff --git a/A320-main.xml b/A320-main.xml
index 3fbefe1c..5202ae90 100644
--- a/A320-main.xml
+++ b/A320-main.xml
@@ -142,6 +142,7 @@
Aircraft/A320-family/Systems/ecam-proprules.xml
+ Aircraft/A320-family/Systems/pitot-static.xml
@@ -505,13 +506,19 @@
0
+ 0
0
- 33
+ 33
0
+ 0
0
0
+ 0
+
+ 350
+
@@ -520,6 +527,7 @@
+ 0
0
@@ -639,6 +647,26 @@
0
+
+
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+
+
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+
+
0
0
@@ -730,6 +758,40 @@
0
0
+
+
+
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+
+
+ 0
+ 0
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+
+
+
+ 0
+ 0
+
+
0
@@ -902,6 +964,15 @@
0
0
+
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+
0
0
@@ -931,6 +1002,11 @@
0
+ 0
+ 0
+ 0
+ 0
+ 0
0
0
@@ -980,6 +1056,30 @@
0
0
+
+
+ 1
+
+
+
+ 1
+
+
+
+ 1
+
+
+
+ 1
+
+
+
+
+ 0
+ 0
+ 0
+
+
@@ -994,6 +1094,26 @@
+
+ true
+
+
+
+ true
+
+
+
+ true
+
+
+
+ true
+
+
+
+ true
+
+
0
0
@@ -1082,6 +1202,10 @@
1.0
+
+ true
+
+
@@ -1663,7 +1820,9 @@
Aircraft/A320-family/Nasal/Systems/hydraulics.nas
Aircraft/A320-family/Nasal/Systems/fuel.nas
Aircraft/A320-family/Nasal/Systems/FADEC/engines-common.nas
- Aircraft/A320-family/Nasal/Systems/ADIRS.nas
+ Aircraft/A320-family/Nasal/Systems/ADIRS/ADIRS.nas
+ Aircraft/A320-family/Nasal/Systems/ADIRS/ADR.nas
+ Aircraft/A320-family/Nasal/Systems/ADIRS/SwitchingPanel.nas
Aircraft/A320-family/Nasal/Systems/fire.nas
Aircraft/A320-family/Nasal/Systems/brakes.nas
Aircraft/A320-family/Nasal/Systems/ground_services.nas
@@ -1741,6 +1900,9 @@
Aircraft/A320-family/Nasal/Panels/atc.nas
+
+ Aircraft/A320-family/Nasal/Systems/DMC.nas
+
Aircraft/A320-family/gui/dialogs/refuel.nas
diff --git a/A320neo-CFM.xml b/A320neo-CFM.xml
index 618a4d46..67cb63e2 100644
--- a/A320neo-CFM.xml
+++ b/A320neo-CFM.xml
@@ -168,6 +168,8 @@ xsi:noNamespaceSchemaLocation="http://jsbsim.sourceforge.net/JSBSim.xsd">
+
+
diff --git a/A320neo-PW.xml b/A320neo-PW.xml
index 2cde3fd4..78827afc 100644
--- a/A320neo-PW.xml
+++ b/A320neo-PW.xml
@@ -168,6 +168,8 @@ xsi:noNamespaceSchemaLocation="http://jsbsim.sourceforge.net/JSBSim.xsd">
+
+
diff --git a/AircraftConfig/acconfig.nas b/AircraftConfig/acconfig.nas
index 195ebf9a..baeb6a24 100644
--- a/AircraftConfig/acconfig.nas
+++ b/AircraftConfig/acconfig.nas
@@ -270,6 +270,9 @@ var colddark = func {
setprop("/controls/switches/landing-lights-l", 0.0);
setprop("/controls/switches/landing-lights-r", 0.0);
setprop("/controls/atc/mode-knob", 0);
+ setprop("/controls/lighting/fcu-panel-knb", 0);
+ setprop("/controls/lighting/main-panel-knb", 0);
+ setprop("/controls/lighting/overhead-panel-knb", 0);
atc.transponderPanel.modeSwitch(1);
libraries.systemsInit();
failResetOld();
@@ -348,6 +351,9 @@ var beforestart_b = func {
systems.FUEL.Switches.pumpCenter2.setValue(1);
systems.FUEL.Switches.pumpRight1.setValue(1);
systems.FUEL.Switches.pumpRight2.setValue(1);
+ setprop("/controls/lighting/fcu-panel-knb", 1);
+ setprop("/controls/lighting/main-panel-knb", 1);
+ setprop("/controls/lighting/overhead-panel-knb", 1);
setprop("/controls/electrical/switches/apu", 1);
setprop("/controls/electrical/switches/galley", 1);
setprop("/controls/electrical/switches/gen-1", 1);
@@ -360,6 +366,12 @@ var beforestart_b = func {
setprop("/controls/adirs/ir[0]/knob","1");
setprop("/controls/adirs/ir[1]/knob","1");
setprop("/controls/adirs/ir[2]/knob","1");
+ systems.ADIRSControlPanel.adrSw(0);
+ systems.ADIRSControlPanel.adrSw(1);
+ systems.ADIRSControlPanel.adrSw(2);
+ systems.ADIRSControlPanel.irModeSw(0, 1);
+ systems.ADIRSControlPanel.irModeSw(1, 1);
+ systems.ADIRSControlPanel.irModeSw(2, 1);
systems.ADIRS.skip(0);
systems.ADIRS.skip(1);
systems.ADIRS.skip(2);
@@ -430,6 +442,9 @@ var taxi_b = func {
systems.FUEL.Switches.pumpCenter2.setValue(1);
systems.FUEL.Switches.pumpRight1.setValue(1);
systems.FUEL.Switches.pumpRight2.setValue(1);
+ setprop("/controls/lighting/fcu-panel-knb", 1);
+ setprop("/controls/lighting/main-panel-knb", 1);
+ setprop("/controls/lighting/overhead-panel-knb", 1);
setprop("/controls/electrical/switches/apu", 1);
setprop("/controls/electrical/switches/galley", 1);
setprop("/controls/electrical/switches/gen-1", 1);
@@ -442,6 +457,12 @@ var taxi_b = func {
setprop("/controls/adirs/ir[0]/knob","1");
setprop("/controls/adirs/ir[1]/knob","1");
setprop("/controls/adirs/ir[2]/knob","1");
+ systems.ADIRSControlPanel.adrSw(0);
+ systems.ADIRSControlPanel.adrSw(1);
+ systems.ADIRSControlPanel.adrSw(2);
+ systems.ADIRSControlPanel.irModeSw(0, 1);
+ systems.ADIRSControlPanel.irModeSw(1, 1);
+ systems.ADIRSControlPanel.irModeSw(2, 1);
systems.ADIRS.skip(0);
systems.ADIRS.skip(1);
systems.ADIRS.skip(2);
diff --git a/AircraftConfig/fail.xml b/AircraftConfig/fail.xml
index a773c8ff..40269955 100644
--- a/AircraftConfig/fail.xml
+++ b/AircraftConfig/fail.xml
@@ -57,7 +57,7 @@
left
- /systems/failures/elac1
+ /systems/failures/fctl/elac1
dialog-apply
@@ -67,7 +67,7 @@
left
- /systems/failures/elac2
+ /systems/failures/fctl/elac2
dialog-apply
@@ -77,7 +77,7 @@
left
- /systems/failures/sec1
+ /systems/failures/fctl/sec1
dialog-apply
@@ -87,7 +87,7 @@
left
- /systems/failures/sec2
+ /systems/failures/fctl/sec2
dialog-apply
@@ -97,17 +97,7 @@
left
- /systems/failures/sec3
-
- dialog-apply
-
- true
-
-
-
-
- left
- /systems/failures/fac2
+ /systems/failures/fctl/sec3
dialog-apply
@@ -117,7 +107,17 @@
left
- /systems/failures/fac1
+ /systems/failures/fctl/fac1
+
+ dialog-apply
+
+ true
+
+
+
+
+ left
+ /systems/failures/fctl/fac2
dialog-apply
diff --git a/Models/FlightDeck/a320.flightdeck.xml b/Models/FlightDeck/a320.flightdeck.xml
index b5095bd1..2056f527 100644
--- a/Models/FlightDeck/a320.flightdeck.xml
+++ b/Models/FlightDeck/a320.flightdeck.xml
@@ -6087,7 +6087,66 @@
-
+
+
+ rotate
+ ecam_air_data
+ ecam_air_data.mark
+ 30
+ /controls/navigation/switching/air-data
+
+ -0.428673
+ -0.022557
+ -0.051784
+ -0.430086
+ -0.022557
+ -0.060321
+
+
+
+
+ pick
+ ecam_air_data
+
+
+
+ true
+
+ nasal
+
+
+
+ nasal
+
+
+
+
+
+
+ true
+
+ nasal
+
+
+
+ nasal
+
+
+
+
+
material
diff --git a/Models/Instruments/Lower-ECAM/Lower-ECAM.nas b/Models/Instruments/Lower-ECAM/Lower-ECAM.nas
index e88c778f..3d5105e6 100644
--- a/Models/Instruments/Lower-ECAM/Lower-ECAM.nas
+++ b/Models/Instruments/Lower-ECAM/Lower-ECAM.nas
@@ -544,8 +544,22 @@ var canvas_lowerECAM_base = {
}
},
updateBottomStatus: func() {
- me["TAT"].setText(sprintf("%2.0f", temperature_degc.getValue()));
- me["SAT"].setText(sprintf("%2.0f", temperature_degc.getValue()));
+ if (dmc.DMController.DMCs[1].outputs[4] != nil) {
+ me["SAT"].setText(sprintf("%2.0f", dmc.DMController.DMCs[0].outputs[4].getValue()));
+ me["SAT"].setColor(0.0509,0.7529,0.2941);
+ } else {
+ me["SAT"].setText(sprintf("%s", "XX"));
+ me["SAT"].setColor(0.7333,0.3803,0);
+ }
+
+ if (dmc.DMController.DMCs[1].outputs[5] != nil) {
+ me["TAT"].setText(sprintf("%2.0f", dmc.DMController.DMCs[0].outputs[5].getValue()));
+ me["TAT"].setColor(0.0509,0.7529,0.2941);
+ } else {
+ me["TAT"].setText(sprintf("%s", "XX"));
+ me["TAT"].setColor(0.7333,0.3803,0);
+ }
+
me["GW"].setText(sprintf("%s", math.round(gw.getValue())));
me["UTCh"].setText(sprintf("%02d", hour.getValue()));
me["UTCm"].setText(sprintf("%02d", minute.getValue()));
diff --git a/Models/Instruments/OHpanel/OHpanel.xml b/Models/Instruments/OHpanel/OHpanel.xml
index 59ac5dd0..cad8a698 100644
--- a/Models/Instruments/OHpanel/OHpanel.xml
+++ b/Models/Instruments/OHpanel/OHpanel.xml
@@ -61,7 +61,6 @@
IR2Btn2A
IR3Btn1F
IR3Btn2A
- IrsOnBatLightOB
RamAirBtn2O
SEC1Btn1F
SEC1Btn2O
@@ -521,11 +520,14 @@
false
- property-cycle
- controls/adirs/ir[0]/knob
- 0
- 1
- 2
+ nasal
+
nasal
@@ -537,11 +539,14 @@
false
- property-cycle
- controls/adirs/ir[0]/knob
- 2
- 1
- 0
+ nasal
+
nasal
@@ -553,7 +558,7 @@
rotate
IR1ModeKnb
- controls/adirs/ir[0]/knob
+ controls/navigation/adirscp/switches/ir-1-mode
0-35
10
@@ -575,7 +580,7 @@
- controls/adirs/ir[0]/fault
+ controls/navigation/adirscp/lights/ir-1-fault
1
@@ -591,7 +596,7 @@
- controls/adirs/ir[0]/align
+ controls/navigation/adirscp/lights/ir-1-off
1
@@ -611,11 +616,14 @@
false
- property-cycle
- controls/adirs/ir[1]/knob
- 0
- 1
- 2
+ nasal
+
nasal
@@ -627,11 +635,14 @@
false
- property-cycle
- controls/adirs/ir[1]/knob
- 2
- 1
- 0
+ nasal
+
nasal
@@ -643,7 +654,7 @@
rotate
IR2ModeKnb
- controls/adirs/ir[1]/knob
+ controls/navigation/adirscp/switches/ir-2-mode
0-35
10
@@ -665,7 +676,7 @@
- controls/adirs/ir[1]/fault
+ controls/navigation/adirscp/lights/ir-2-fault
1
@@ -681,7 +692,7 @@
- controls/adirs/ir[1]/align
+ controls/navigation/adirscp/lights/ir-2-off
1
@@ -701,11 +712,14 @@
false
- property-cycle
- controls/adirs/ir[2]/knob
- 0
- 1
- 2
+ nasal
+
nasal
@@ -717,11 +731,14 @@
false
- property-cycle
- controls/adirs/ir[2]/knob
- 2
- 1
- 0
+ nasal
+
nasal
@@ -733,7 +750,7 @@
rotate
IR3ModeKnb
- controls/adirs/ir[2]/knob
+ controls/navigation/adirscp/switches/ir-3-mode
0-35
10
@@ -755,7 +772,7 @@
- controls/adirs/ir[2]/fault
+ controls/navigation/adirscp/lights/ir-3-fault
1
@@ -771,7 +788,7 @@
- controls/adirs/ir[2]/align
+ controls/navigation/adirscp/lights/ir-3-off
1
@@ -789,7 +806,7 @@
- controls/adirs/onbat
+ controls/navigation/adirscp/lights/on-bat
1
@@ -818,8 +835,8 @@
25
- property-toggle
- controls/adirs/adr[0]/off
+ nasal
+
nasal
@@ -834,7 +851,7 @@
- controls/adirs/adr[0]/fault
+ controls/navigation/adirscp/lights/adr-1-fault
1
@@ -844,13 +861,14 @@
+
select
ADR1Btn2O
- controls/adirs/adr[0]/off
+ controls/navigation/adirscp/lights/adr-1-off
1
@@ -879,8 +897,8 @@
25
- property-toggle
- controls/adirs/adr[1]/off
+ nasal
+
nasal
@@ -895,7 +913,7 @@
- controls/adirs/adr[1]/fault
+ controls/navigation/adirscp/lights/adr-2-fault
1
@@ -905,13 +923,14 @@
+
select
ADR2Btn2O
- controls/adirs/adr[1]/off
+ controls/navigation/adirscp/lights/adr-2-off
1
@@ -940,8 +959,8 @@
25
- property-toggle
- controls/adirs/adr[2]/off
+ nasal
+
nasal
@@ -956,7 +975,7 @@
- controls/adirs/adr[2]/fault
+ controls/navigation/adirscp/lights/adr-3-fault
1
@@ -966,13 +985,14 @@
+
select
ADR3Btn2O
- controls/adirs/adr[2]/off
+ controls/navigation/adirscp/lights/adr-3-off
1
@@ -1174,7 +1194,7 @@
property-toggle
- controls/fctl/elac1
+ controls/fctl/switches/elac1
nasal
@@ -1208,7 +1228,7 @@
- controls/fctl/elac1
+ controls/fctl/switches/elac1
0
@@ -1237,7 +1257,7 @@
property-toggle
- controls/fctl/sec1
+ controls/fctl/switches/sec1
nasal
@@ -1257,7 +1277,7 @@
1
- controls/fctl/sec1
+ controls/fctl/switches/sec1
1
@@ -1275,7 +1295,7 @@
- controls/fctl/sec1
+ controls/fctl/switches/sec1
0
@@ -1304,7 +1324,7 @@
property-toggle
- controls/fctl/fac1
+ controls/fctl/switches/fac1
nasal
@@ -1324,7 +1344,7 @@
1
- controls/fctl/fac1
+ controls/fctl/switches/fac1
1
@@ -1342,7 +1362,7 @@
- controls/fctl/fac1
+ controls/fctl/switches/fac1
0
@@ -1371,7 +1391,7 @@
property-toggle
- controls/fctl/elac2
+ controls/fctl/switches/elac2
nasal
@@ -1391,7 +1411,7 @@
1
- controls/fctl/elac2
+ controls/fctl/switches/elac2
1
@@ -1409,7 +1429,7 @@
- controls/fctl/elac2
+ controls/fctl/switches/elac2
0
@@ -1438,7 +1458,7 @@
property-toggle
- controls/fctl/sec2
+ controls/fctl/switches/sec2
nasal
@@ -1458,7 +1478,7 @@
1
- controls/fctl/sec2
+ controls/fctl/switches/sec2
1
@@ -1476,7 +1496,7 @@
- controls/fctl/sec2
+ controls/fctl/switches/sec2
0
@@ -1505,7 +1525,7 @@
property-toggle
- controls/fctl/sec3
+ controls/fctl/switches/sec3
nasal
@@ -1525,7 +1545,7 @@
1
- controls/fctl/sec3
+ controls/fctl/switches/sec3
1
@@ -1543,7 +1563,7 @@
- controls/fctl/sec3
+ controls/fctl/switches/sec3
0
@@ -1572,7 +1592,7 @@
property-toggle
- controls/fctl/fac2
+ controls/fctl/switches/fac2
nasal
@@ -1592,7 +1612,7 @@
1
- controls/fctl/fac2
+ controls/fctl/switches/fac2
1
@@ -1610,7 +1630,7 @@
- controls/fctl/fac2
+ controls/fctl/switches/fac2
0
diff --git a/Models/Instruments/PFD/PFD.nas b/Models/Instruments/PFD/PFD.nas
index 35bdd075..c3e91595 100644
--- a/Models/Instruments/PFD/PFD.nas
+++ b/Models/Instruments/PFD/PFD.nas
@@ -13,11 +13,6 @@ var PFD2_display = nil;
var updateL = 0;
var updateR = 0;
var elapsedtime = 0;
-var ASI = 0;
-var ASItrgt = 0;
-var ASItrgtdiff = 0;
-var ASImax = 0;
-var ASItrend = 0;
var altTens = 0;
var altPolarity = "";
@@ -133,7 +128,9 @@ var hdg_diff = props.globals.initNode("/instrumentation/pfd/hdg-diff", 0.0, "DOU
var hdg_scale = props.globals.initNode("/instrumentation/pfd/heading-scale", 0.0, "DOUBLE");
var track = props.globals.initNode("/instrumentation/pfd/track-deg", 0.0, "DOUBLE");
var track_diff = props.globals.initNode("/instrumentation/pfd/track-hdg-diff", 0.0, "DOUBLE");
-var speed_pred = props.globals.initNode("/instrumentation/pfd/speed-lookahead", 0.0, "DOUBLE");
+var speed_pred_1 = props.globals.initNode("/instrumentation/pfd/speed-lookahead-1", 0.0, "DOUBLE");
+var speed_pred_2 = props.globals.initNode("/instrumentation/pfd/speed-lookahead-2", 0.0, "DOUBLE");
+var speed_pred_3 = props.globals.initNode("/instrumentation/pfd/speed-lookahead-3", 0.0, "DOUBLE");
var du1_test = props.globals.initNode("/instrumentation/du/du1-test", 0, "BOOL");
var du1_test_time = props.globals.initNode("/instrumentation/du/du1-test-time", 0.0, "DOUBLE");
var du1_test_amount = props.globals.initNode("/instrumentation/du/du1-test-amount", 0.0, "DOUBLE");
@@ -197,7 +194,7 @@ var canvas_PFD_base = {
"AI_bank_lim","AI_bank_lim_X","AI_pitch_lim","AI_pitch_lim_X","AI_slipskid","AI_horizon","AI_horizon_ground","AI_horizon_sky","AI_stick","AI_stick_pos","AI_heading","AI_agl_g","AI_agl","AI_error","AI_group","FD_roll","FD_pitch","ALT_scale","ALT_target",
"ALT_target_digit","ALT_one","ALT_two","ALT_three","ALT_four","ALT_five","ALT_digits","ALT_tens","ALT_digit_UP","ALT_digit_DN","ALT_error","ALT_group","ALT_group2","ALT_frame","VS_pointer","VS_box","VS_digit","VS_error","VS_group","QNH","QNH_setting",
"QNH_std","QNH_box","LOC_pointer","LOC_scale","GS_scale","GS_pointer","CRS_pointer","HDG_target","HDG_scale","HDG_one","HDG_two","HDG_three","HDG_four","HDG_five","HDG_six","HDG_seven","HDG_digit_L","HDG_digit_R","HDG_error","HDG_group","HDG_frame",
- "TRK_pointer"];
+ "TRK_pointer","machError"];
},
update: func() {
elapsedtime_act = elapsedtime.getValue();
@@ -609,119 +606,6 @@ var canvas_PFD_base = {
}
},
updateCommonFast: func() {
- # Airspeed
- ind_spd = ind_spd_kt.getValue();
- # Subtract 30, since the scale starts at 30, but don"t allow less than 0, or more than 420 situations
- if (ind_spd <= 30) {
- ASI = 0;
- } else if (ind_spd >= 420) {
- ASI = 390;
- } else {
- ASI = ind_spd - 30;
- }
-
- FMGC_max = FMGC_max_spd.getValue();
- if (FMGC_max <= 30) {
- ASImax = 0 - ASI;
- } else if (FMGC_max >= 420) {
- ASImax = 390 - ASI;
- } else {
- ASImax = FMGC_max - 30 - ASI;
- }
-
- me["ASI_scale"].setTranslation(0, ASI * 6.6);
- me["ASI_max"].setTranslation(0, ASImax * -6.6);
-
- ind_mach = ind_spd_mach.getValue();
- if (ind_mach >= 0.5) {
- me["ASI_mach_decimal"].show();
- me["ASI_mach"].show();
- } else {
- me["ASI_mach_decimal"].hide();
- me["ASI_mach"].hide();
- }
-
- if (ind_mach >= 0.999) {
- me["ASI_mach"].setText("999");
- } else {
- me["ASI_mach"].setText(sprintf("%3.0f", ind_mach * 1000));
- }
-
- if (managed_spd.getValue() == 1) {
- me["ASI_target"].setColor(0.6901,0.3333,0.7450);
- me["ASI_digit_UP"].setColor(0.6901,0.3333,0.7450);
- me["ASI_decimal_UP"].setColor(0.6901,0.3333,0.7450);
- me["ASI_digit_DN"].setColor(0.6901,0.3333,0.7450);
- me["ASI_decimal_DN"].setColor(0.6901,0.3333,0.7450);
- } else {
- me["ASI_target"].setColor(0.0901,0.6039,0.7176);
- me["ASI_digit_UP"].setColor(0.0901,0.6039,0.7176);
- me["ASI_decimal_UP"].setColor(0.0901,0.6039,0.7176);
- me["ASI_digit_DN"].setColor(0.0901,0.6039,0.7176);
- me["ASI_decimal_DN"].setColor(0.0901,0.6039,0.7176);
- }
-
- tgt_ias = at_tgt_ias.getValue();
- if (tgt_ias <= 30) {
- ASItrgt = 0 - ASI;
- } else if (tgt_ias >= 420) {
- ASItrgt = 390 - ASI;
- } else {
- ASItrgt = tgt_ias - 30 - ASI;
- }
-
- ASItrgtdiff = tgt_ias - ind_spd;
-
- if (ASItrgtdiff >= -42 and ASItrgtdiff <= 42) {
- me["ASI_target"].setTranslation(0, ASItrgt * -6.6);
- me["ASI_digit_UP"].hide();
- me["ASI_decimal_UP"].hide();
- me["ASI_digit_DN"].hide();
- me["ASI_decimal_DN"].hide();
- me["ASI_target"].show();
- } else if (ASItrgtdiff < -42) {
- if (at_mach_mode.getValue() == 1) {
- me["ASI_digit_DN"].setText(sprintf("%3.0f", at_input_spd_mach.getValue() * 1000));
- me["ASI_decimal_UP"].hide();
- me["ASI_decimal_DN"].show();
- } else {
- me["ASI_digit_DN"].setText(sprintf("%3.0f", at_input_spd_kts.getValue()));
- me["ASI_decimal_UP"].hide();
- me["ASI_decimal_DN"].hide();
- }
- me["ASI_digit_DN"].show();
- me["ASI_digit_UP"].hide();
- me["ASI_target"].hide();
- } else if (ASItrgtdiff > 42) {
- if (at_mach_mode.getValue() == 1) {
- me["ASI_digit_UP"].setText(sprintf("%3.0f", at_input_spd_mach.getValue() * 1000));
- me["ASI_decimal_UP"].show();
- me["ASI_decimal_DN"].hide();
- } else {
- me["ASI_digit_UP"].setText(sprintf("%3.0f", at_input_spd_kts.getValue()));
- me["ASI_decimal_UP"].hide();
- me["ASI_decimal_DN"].hide();
- }
- me["ASI_digit_UP"].show();
- me["ASI_digit_DN"].hide();
- me["ASI_target"].hide();
- }
-
- ASItrend = speed_pred.getValue() - ASI;
- me["ASI_trend_up"].setTranslation(0, math.clamp(ASItrend, 0, 50) * -6.6);
- me["ASI_trend_down"].setTranslation(0, math.clamp(ASItrend, -50, 0) * -6.6);
-
- if (ASItrend >= 2) {
- me["ASI_trend_up"].show();
- me["ASI_trend_down"].hide();
- } else if (ASItrend <= -2) {
- me["ASI_trend_down"].show();
- me["ASI_trend_up"].hide();
- } else {
- me["ASI_trend_up"].hide();
- me["ASI_trend_down"].hide();
- }
-
# Attitude Indicator
pitch_cur = pitch.getValue();
roll_cur = roll.getValue();
@@ -789,69 +673,6 @@ var canvas_PFD_base = {
me["AI_stick_pos"].setTranslation(aileron_input.getValue() * 196.8, elevator_input.getValue() * 151.5);
- # Altitude
- me.altitude = altitude.getValue();
- me.altOffset = me.altitude / 500 - int(me.altitude / 500);
- me.middleAltText = roundaboutAlt(me.altitude / 100);
- me.middleAltOffset = nil;
- if (me.altOffset > 0.5) {
- me.middleAltOffset = -(me.altOffset - 1) * 243.3424;
- } else {
- me.middleAltOffset = -me.altOffset * 243.3424;
- }
- me["ALT_scale"].setTranslation(0, -me.middleAltOffset);
- me["ALT_scale"].update();
- me["ALT_five"].setText(sprintf("%03d", abs(me.middleAltText+10)));
- me["ALT_four"].setText(sprintf("%03d", abs(me.middleAltText+5)));
- me["ALT_three"].setText(sprintf("%03d", abs(me.middleAltText)));
- me["ALT_two"].setText(sprintf("%03d", abs(me.middleAltText-5)));
- me["ALT_one"].setText(sprintf("%03d", abs(me.middleAltText-10)));
-
- if (altitude.getValue() < 0) {
- altPolarity = "-";
- } else {
- altPolarity = "";
- }
- me["ALT_digits"].setText(sprintf("%s%d", altPolarity, altitude_pfd.getValue()));
- altTens = num(right(sprintf("%02d", altitude.getValue()), 2));
- me["ALT_tens"].setTranslation(0, altTens * 1.392);
-
- ap_alt_cur = ap_alt.getValue();
- alt_diff_cur = alt_diff.getValue();
- if (alt_diff_cur >= -565 and alt_diff_cur <= 565) {
- me["ALT_target"].setTranslation(0, (alt_diff_cur / 100) * -48.66856);
- me["ALT_target_digit"].setText(sprintf("%03d", math.round(ap_alt_cur / 100)));
- me["ALT_digit_UP"].hide();
- me["ALT_digit_DN"].hide();
- me["ALT_target"].show();
- } else if (alt_diff_cur < -565) {
- if (alt_std_mode.getValue() == 1) {
- if (ap_alt_cur < 10000) {
- me["ALT_digit_DN"].setText(sprintf("%s", "FL " ~ ap_alt_cur / 100));
- } else {
- me["ALT_digit_DN"].setText(sprintf("%s", "FL " ~ ap_alt_cur / 100));
- }
- } else {
- me["ALT_digit_DN"].setText(sprintf("%5.0f", ap_alt_cur));
- }
- me["ALT_digit_DN"].show();
- me["ALT_digit_UP"].hide();
- me["ALT_target"].hide();
- } else if (alt_diff_cur > 565) {
- if (alt_std_mode.getValue() == 1) {
- if (ap_alt_cur < 10000) {
- me["ALT_digit_UP"].setText(sprintf("%s", "FL " ~ ap_alt_cur / 100));
- } else {
- me["ALT_digit_UP"].setText(sprintf("%s", "FL " ~ ap_alt_cur / 100));
- }
- } else {
- me["ALT_digit_UP"].setText(sprintf("%5.0f", ap_alt_cur));
- }
- me["ALT_digit_UP"].show();
- me["ALT_digit_DN"].hide();
- me["ALT_target"].hide();
- }
-
# Vertical Speed
me["VS_pointer"].setRotation(vs_needle.getValue() * D2R);
@@ -947,6 +768,12 @@ var canvas_PFD_base = {
};
var canvas_PFD_1 = {
+ ASI: 0,
+ ASImax: 0,
+ ASItrend: 0,
+ ASItrgt: 0,
+ ASItrgtdiff: 0,
+ FMGC_max: 0,
new: func(canvas_group, file) {
var m = {parents: [canvas_PFD_1, canvas_PFD_base]};
m.init(canvas_group, file);
@@ -964,26 +791,10 @@ var canvas_PFD_1 = {
# Errors
if ((adirs0_active.getValue() == 1) or (air_switch.getValue() == -1 and adirs2_active.getValue() == 1)) {
- me["ASI_group"].show();
- me["ALT_group"].show();
- me["ALT_group2"].show();
- me["ALT_scale"].show();
me["VS_group"].show();
- me["ASI_error"].hide();
- me["ASI_frame"].setColor(1,1,1);
- me["ALT_error"].hide();
- me["ALT_frame"].setColor(1,1,1);
me["VS_error"].hide();
} else {
- me["ASI_error"].show();
- me["ASI_frame"].setColor(1,0,0);
- me["ALT_error"].show();
- me["ALT_frame"].setColor(1,0,0);
me["VS_error"].show();
- me["ASI_group"].hide();
- me["ALT_group"].hide();
- me["ALT_group2"].hide();
- me["ALT_scale"].hide();
me["VS_group"].hide();
}
@@ -1037,11 +848,225 @@ var canvas_PFD_1 = {
me.updateCommon();
},
updateFast: func() {
+ # Airspeed
+ # ind_spd = ind_spd_kt.getValue();
+ # Subtract 30, since the scale starts at 30, but don"t allow less than 0, or more than 420 situations
+
+ if (dmc.DMController.DMCs[0].outputs[0] != nil) {
+ ind_spd = dmc.DMController.DMCs[0].outputs[0].getValue();
+ me["ASI_error"].hide();
+ me["ASI_frame"].setColor(1,1,1);
+ me["ASI_group"].show();
+
+ if (ind_spd <= 30) {
+ me.ASI = 0;
+ } else if (ind_spd >= 420) {
+ me.ASI = 390;
+ } else {
+ me.ASI = ind_spd - 30;
+ }
+
+ me.FMGC_max = FMGC_max_spd.getValue();
+ if (me.FMGC_max <= 30) {
+ me.ASImax = 0 - me.ASI;
+ } else if (me.FMGC_max >= 420) {
+ me.ASImax = 390 - me.ASI;
+ } else {
+ me.ASImax = me.FMGC_max - 30 - me.ASI;
+ }
+
+ me["ASI_scale"].setTranslation(0, me.ASI * 6.6);
+ me["ASI_max"].setTranslation(0, me.ASImax * -6.6);
+
+ if (managed_spd.getValue() == 1) {
+ me["ASI_target"].setColor(0.6901,0.3333,0.7450);
+ me["ASI_digit_UP"].setColor(0.6901,0.3333,0.7450);
+ me["ASI_decimal_UP"].setColor(0.6901,0.3333,0.7450);
+ me["ASI_digit_DN"].setColor(0.6901,0.3333,0.7450);
+ me["ASI_decimal_DN"].setColor(0.6901,0.3333,0.7450);
+ } else {
+ me["ASI_target"].setColor(0.0901,0.6039,0.7176);
+ me["ASI_digit_UP"].setColor(0.0901,0.6039,0.7176);
+ me["ASI_decimal_UP"].setColor(0.0901,0.6039,0.7176);
+ me["ASI_digit_DN"].setColor(0.0901,0.6039,0.7176);
+ me["ASI_decimal_DN"].setColor(0.0901,0.6039,0.7176);
+ }
+
+ tgt_ias = at_tgt_ias.getValue();
+ if (tgt_ias <= 30) {
+ me.ASItrgt = 0 - me.ASI;
+ } else if (tgt_ias >= 420) {
+ me.ASItrgt = 390 - me.ASI;
+ } else {
+ me.ASItrgt = tgt_ias - 30 - me.ASI;
+ }
+
+ me.ASItrgtdiff = tgt_ias - ind_spd;
+
+ if (me.ASItrgtdiff >= -42 and me.ASItrgtdiff <= 42) {
+ me["ASI_target"].setTranslation(0, me.ASItrgt * -6.6);
+ me["ASI_digit_UP"].hide();
+ me["ASI_decimal_UP"].hide();
+ me["ASI_digit_DN"].hide();
+ me["ASI_decimal_DN"].hide();
+ me["ASI_target"].show();
+ } else if (me.ASItrgtdiff < -42) {
+ if (at_mach_mode.getValue() == 1) {
+ me["ASI_digit_DN"].setText(sprintf("%3.0f", at_input_spd_mach.getValue() * 1000));
+ me["ASI_decimal_UP"].hide();
+ me["ASI_decimal_DN"].show();
+ } else {
+ me["ASI_digit_DN"].setText(sprintf("%3.0f", at_input_spd_kts.getValue()));
+ me["ASI_decimal_UP"].hide();
+ me["ASI_decimal_DN"].hide();
+ }
+ me["ASI_digit_DN"].show();
+ me["ASI_digit_UP"].hide();
+ me["ASI_target"].hide();
+ } else if (me.ASItrgtdiff > 42) {
+ if (at_mach_mode.getValue() == 1) {
+ me["ASI_digit_UP"].setText(sprintf("%3.0f", at_input_spd_mach.getValue() * 1000));
+ me["ASI_decimal_UP"].show();
+ me["ASI_decimal_DN"].hide();
+ } else {
+ me["ASI_digit_UP"].setText(sprintf("%3.0f", at_input_spd_kts.getValue()));
+ me["ASI_decimal_UP"].hide();
+ me["ASI_decimal_DN"].hide();
+ }
+ me["ASI_digit_UP"].show();
+ me["ASI_digit_DN"].hide();
+ me["ASI_target"].hide();
+ }
+
+ me.ASItrend = speed_pred_1.getValue() - me.ASI;
+ me["ASI_trend_up"].setTranslation(0, math.clamp(me.ASItrend, 0, 50) * -6.6);
+ me["ASI_trend_down"].setTranslation(0, math.clamp(me.ASItrend, -50, 0) * -6.6);
+
+ if (me.ASItrend >= 2) {
+ me["ASI_trend_up"].show();
+ me["ASI_trend_down"].hide();
+ } else if (me.ASItrend <= -2) {
+ me["ASI_trend_down"].show();
+ me["ASI_trend_up"].hide();
+ } else {
+ me["ASI_trend_up"].hide();
+ me["ASI_trend_down"].hide();
+ }
+ } else {
+ me["ASI_group"].hide();
+ me["ASI_error"].show();
+ me["ASI_frame"].setColor(1,0,0);
+ }
+
+ if (dmc.DMController.DMCs[0].outputs[2] != nil) {
+ ind_mach = dmc.DMController.DMCs[0].outputs[2].getValue();
+ me["machError"].hide();
+ if (ind_mach >= 0.5) {
+ me["ASI_mach_decimal"].show();
+ me["ASI_mach"].show();
+ } else {
+ me["ASI_mach_decimal"].hide();
+ me["ASI_mach"].hide();
+ }
+
+ if (ind_mach >= 0.999) {
+ me["ASI_mach"].setText("999");
+ } else {
+ me["ASI_mach"].setText(sprintf("%3.0f", ind_mach * 1000));
+ }
+ } else {
+ me["machError"].show();
+ }
+
+ # Altitude
+ if (dmc.DMController.DMCs[0].outputs[1] != nil) {
+ me["ALT_error"].hide();
+ me["ALT_frame"].setColor(1,1,1);
+ me["ALT_group"].show();
+ me["ALT_group2"].show();
+ me["ALT_scale"].show();
+
+ me.altitude = dmc.DMController.DMCs[0].outputs[1].getValue();
+ me.altOffset = me.altitude / 500 - int(me.altitude / 500);
+ me.middleAltText = roundaboutAlt(me.altitude / 100);
+ me.middleAltOffset = nil;
+ if (me.altOffset > 0.5) {
+ me.middleAltOffset = -(me.altOffset - 1) * 243.3424;
+ } else {
+ me.middleAltOffset = -me.altOffset * 243.3424;
+ }
+ me["ALT_scale"].setTranslation(0, -me.middleAltOffset);
+ me["ALT_scale"].update();
+ me["ALT_five"].setText(sprintf("%03d", abs(me.middleAltText+10)));
+ me["ALT_four"].setText(sprintf("%03d", abs(me.middleAltText+5)));
+ me["ALT_three"].setText(sprintf("%03d", abs(me.middleAltText)));
+ me["ALT_two"].setText(sprintf("%03d", abs(me.middleAltText-5)));
+ me["ALT_one"].setText(sprintf("%03d", abs(me.middleAltText-10)));
+
+ if (altitude.getValue() < 0) {
+ altPolarity = "-";
+ } else {
+ altPolarity = "";
+ }
+
+ me["ALT_digits"].setText(sprintf("%s%d", altPolarity, dmc.DMController.DMCs[0].outputs[3].getValue()));
+ altTens = num(right(sprintf("%02d", me.altitude), 2));
+ me["ALT_tens"].setTranslation(0, altTens * 1.392);
+
+ ap_alt_cur = ap_alt.getValue();
+ alt_diff_cur = alt_diff.getValue();
+ if (alt_diff_cur >= -565 and alt_diff_cur <= 565) {
+ me["ALT_target"].setTranslation(0, (alt_diff_cur / 100) * -48.66856);
+ me["ALT_target_digit"].setText(sprintf("%03d", math.round(ap_alt_cur / 100)));
+ me["ALT_digit_UP"].hide();
+ me["ALT_digit_DN"].hide();
+ me["ALT_target"].show();
+ } else if (alt_diff_cur < -565) {
+ if (alt_std_mode.getValue() == 1) {
+ if (ap_alt_cur < 10000) {
+ me["ALT_digit_DN"].setText(sprintf("%s", "FL " ~ ap_alt_cur / 100));
+ } else {
+ me["ALT_digit_DN"].setText(sprintf("%s", "FL " ~ ap_alt_cur / 100));
+ }
+ } else {
+ me["ALT_digit_DN"].setText(sprintf("%5.0f", ap_alt_cur));
+ }
+ me["ALT_digit_DN"].show();
+ me["ALT_digit_UP"].hide();
+ me["ALT_target"].hide();
+ } else if (alt_diff_cur > 565) {
+ if (alt_std_mode.getValue() == 1) {
+ if (ap_alt_cur < 10000) {
+ me["ALT_digit_UP"].setText(sprintf("%s", "FL " ~ ap_alt_cur / 100));
+ } else {
+ me["ALT_digit_UP"].setText(sprintf("%s", "FL " ~ ap_alt_cur / 100));
+ }
+ } else {
+ me["ALT_digit_UP"].setText(sprintf("%5.0f", ap_alt_cur));
+ }
+ me["ALT_digit_UP"].show();
+ me["ALT_digit_DN"].hide();
+ me["ALT_target"].hide();
+ }
+ } else {
+ me["ALT_error"].show();
+ me["ALT_frame"].setColor(1,0,0);
+ me["ALT_group"].hide();
+ me["ALT_group2"].hide();
+ me["ALT_scale"].hide();
+ }
+
me.updateCommonFast();
},
};
var canvas_PFD_2 = {
+ ASI: 0,
+ ASImax: 0,
+ ASItrend: 0,
+ ASItrgt: 0,
+ ASItrgtdiff: 0,
+ FMGC_max: 0,
new: func(canvas_group, file) {
var m = {parents: [canvas_PFD_2, canvas_PFD_base]};
m.init(canvas_group, file);
@@ -1059,19 +1084,14 @@ var canvas_PFD_2 = {
# Errors
if ((adirs1_active.getValue() == 1) or (air_switch.getValue() == 1 and adirs2_active.getValue() == 1)) {
- me["ASI_group"].show();
me["ALT_group"].show();
me["ALT_group2"].show();
me["ALT_scale"].show();
me["VS_group"].show();
- me["ASI_error"].hide();
- me["ASI_frame"].setColor(1,1,1);
me["ALT_error"].hide();
me["ALT_frame"].setColor(1,1,1);
me["VS_error"].hide();
} else {
- me["ASI_error"].show();
- me["ASI_frame"].setColor(1,0,0);
me["ALT_error"].show();
me["ALT_frame"].setColor(1,0,0);
me["VS_error"].show();
@@ -1132,6 +1152,213 @@ var canvas_PFD_2 = {
me.updateCommon();
},
updateFast: func() {
+ # Airspeed
+ # ind_spd = ind_spd_kt.getValue();
+ # Subtract 30, since the scale starts at 30, but don"t allow less than 0, or more than 420 situations
+
+ if (dmc.DMController.DMCs[1].outputs[0] != nil) {
+ ind_spd = dmc.DMController.DMCs[1].outputs[0].getValue();
+ me["ASI_error"].hide();
+ me["ASI_frame"].setColor(1,1,1);
+ me["ASI_group"].show();
+
+ if (ind_spd <= 30) {
+ me.ASI = 0;
+ } else if (ind_spd >= 420) {
+ me.ASI = 390;
+ } else {
+ me.ASI = ind_spd - 30;
+ }
+
+ me.FMGC_max = FMGC_max_spd.getValue();
+ if (me.FMGC_max <= 30) {
+ me.ASImax = 0 - me.ASI;
+ } else if (me.FMGC_max >= 420) {
+ me.ASImax = 390 - me.ASI;
+ } else {
+ me.ASImax = me.FMGC_max - 30 - me.ASI;
+ }
+
+ me["ASI_scale"].setTranslation(0, me.ASI * 6.6);
+ me["ASI_max"].setTranslation(0, me.ASImax * -6.6);
+
+ if (managed_spd.getValue() == 1) {
+ me["ASI_target"].setColor(0.6901,0.3333,0.7450);
+ me["ASI_digit_UP"].setColor(0.6901,0.3333,0.7450);
+ me["ASI_decimal_UP"].setColor(0.6901,0.3333,0.7450);
+ me["ASI_digit_DN"].setColor(0.6901,0.3333,0.7450);
+ me["ASI_decimal_DN"].setColor(0.6901,0.3333,0.7450);
+ } else {
+ me["ASI_target"].setColor(0.0901,0.6039,0.7176);
+ me["ASI_digit_UP"].setColor(0.0901,0.6039,0.7176);
+ me["ASI_decimal_UP"].setColor(0.0901,0.6039,0.7176);
+ me["ASI_digit_DN"].setColor(0.0901,0.6039,0.7176);
+ me["ASI_decimal_DN"].setColor(0.0901,0.6039,0.7176);
+ }
+
+ tgt_ias = at_tgt_ias.getValue();
+ if (tgt_ias <= 30) {
+ me.ASItrgt = 0 - me.ASI;
+ } else if (tgt_ias >= 420) {
+ me.ASItrgt = 390 - me.ASI;
+ } else {
+ me.ASItrgt = tgt_ias - 30 - me.ASI;
+ }
+
+ me.ASItrgtdiff = tgt_ias - ind_spd;
+
+ if (me.ASItrgtdiff >= -42 and me.ASItrgtdiff <= 42) {
+ me["ASI_target"].setTranslation(0, me.ASItrgt * -6.6);
+ me["ASI_digit_UP"].hide();
+ me["ASI_decimal_UP"].hide();
+ me["ASI_digit_DN"].hide();
+ me["ASI_decimal_DN"].hide();
+ me["ASI_target"].show();
+ } else if (me.ASItrgtdiff < -42) {
+ if (at_mach_mode.getValue() == 1) {
+ me["ASI_digit_DN"].setText(sprintf("%3.0f", at_input_spd_mach.getValue() * 1000));
+ me["ASI_decimal_UP"].hide();
+ me["ASI_decimal_DN"].show();
+ } else {
+ me["ASI_digit_DN"].setText(sprintf("%3.0f", at_input_spd_kts.getValue()));
+ me["ASI_decimal_UP"].hide();
+ me["ASI_decimal_DN"].hide();
+ }
+ me["ASI_digit_DN"].show();
+ me["ASI_digit_UP"].hide();
+ me["ASI_target"].hide();
+ } else if (me.ASItrgtdiff > 42) {
+ if (at_mach_mode.getValue() == 1) {
+ me["ASI_digit_UP"].setText(sprintf("%3.0f", at_input_spd_mach.getValue() * 1000));
+ me["ASI_decimal_UP"].show();
+ me["ASI_decimal_DN"].hide();
+ } else {
+ me["ASI_digit_UP"].setText(sprintf("%3.0f", at_input_spd_kts.getValue()));
+ me["ASI_decimal_UP"].hide();
+ me["ASI_decimal_DN"].hide();
+ }
+ me["ASI_digit_UP"].show();
+ me["ASI_digit_DN"].hide();
+ me["ASI_target"].hide();
+ }
+
+ me.ASItrend = speed_pred_2.getValue() - me.ASI;
+ me["ASI_trend_up"].setTranslation(0, math.clamp(me.ASItrend, 0, 50) * -6.6);
+ me["ASI_trend_down"].setTranslation(0, math.clamp(me.ASItrend, -50, 0) * -6.6);
+
+ if (me.ASItrend >= 2) {
+ me["ASI_trend_up"].show();
+ me["ASI_trend_down"].hide();
+ } else if (me.ASItrend <= -2) {
+ me["ASI_trend_down"].show();
+ me["ASI_trend_up"].hide();
+ } else {
+ me["ASI_trend_up"].hide();
+ me["ASI_trend_down"].hide();
+ }
+ } else {
+ me["ASI_error"].show();
+ me["ASI_frame"].setColor(1,0,0);
+ me["ASI_group"].hide();
+ }
+
+ if (dmc.DMController.DMCs[1].outputs[2] != nil) {
+ ind_mach = dmc.DMController.DMCs[1].outputs[2].getValue();
+ me["machError"].hide();
+ if (ind_mach >= 0.5) {
+ me["ASI_mach_decimal"].show();
+ me["ASI_mach"].show();
+ } else {
+ me["ASI_mach_decimal"].hide();
+ me["ASI_mach"].hide();
+ }
+
+ if (ind_mach >= 0.999) {
+ me["ASI_mach"].setText("999");
+ } else {
+ me["ASI_mach"].setText(sprintf("%3.0f", ind_mach * 1000));
+ }
+ } else {
+ me["machError"].show();
+ }
+
+ if (dmc.DMController.DMCs[1].outputs[1] != nil) {
+ me["ALT_error"].hide();
+ me["ALT_frame"].setColor(1,1,1);
+ me["ALT_group"].show();
+ me["ALT_group2"].show();
+ me["ALT_scale"].show();
+
+ me.altitude = dmc.DMController.DMCs[1].outputs[1].getValue();
+ me.altOffset = me.altitude / 500 - int(me.altitude / 500);
+ me.middleAltText = roundaboutAlt(me.altitude / 100);
+ me.middleAltOffset = nil;
+ if (me.altOffset > 0.5) {
+ me.middleAltOffset = -(me.altOffset - 1) * 243.3424;
+ } else {
+ me.middleAltOffset = -me.altOffset * 243.3424;
+ }
+ me["ALT_scale"].setTranslation(0, -me.middleAltOffset);
+ me["ALT_scale"].update();
+ me["ALT_five"].setText(sprintf("%03d", abs(me.middleAltText+10)));
+ me["ALT_four"].setText(sprintf("%03d", abs(me.middleAltText+5)));
+ me["ALT_three"].setText(sprintf("%03d", abs(me.middleAltText)));
+ me["ALT_two"].setText(sprintf("%03d", abs(me.middleAltText-5)));
+ me["ALT_one"].setText(sprintf("%03d", abs(me.middleAltText-10)));
+
+ if (altitude.getValue() < 0) {
+ altPolarity = "-";
+ } else {
+ altPolarity = "";
+ }
+
+ me["ALT_digits"].setText(sprintf("%s%d", altPolarity, dmc.DMController.DMCs[1].outputs[3].getValue()));
+ altTens = num(right(sprintf("%02d", me.altitude), 2));
+ me["ALT_tens"].setTranslation(0, altTens * 1.392);
+
+ ap_alt_cur = ap_alt.getValue();
+ alt_diff_cur = alt_diff.getValue();
+ if (alt_diff_cur >= -565 and alt_diff_cur <= 565) {
+ me["ALT_target"].setTranslation(0, (alt_diff_cur / 100) * -48.66856);
+ me["ALT_target_digit"].setText(sprintf("%03d", math.round(ap_alt_cur / 100)));
+ me["ALT_digit_UP"].hide();
+ me["ALT_digit_DN"].hide();
+ me["ALT_target"].show();
+ } else if (alt_diff_cur < -565) {
+ if (alt_std_mode.getValue() == 1) {
+ if (ap_alt_cur < 10000) {
+ me["ALT_digit_DN"].setText(sprintf("%s", "FL " ~ ap_alt_cur / 100));
+ } else {
+ me["ALT_digit_DN"].setText(sprintf("%s", "FL " ~ ap_alt_cur / 100));
+ }
+ } else {
+ me["ALT_digit_DN"].setText(sprintf("%5.0f", ap_alt_cur));
+ }
+ me["ALT_digit_DN"].show();
+ me["ALT_digit_UP"].hide();
+ me["ALT_target"].hide();
+ } else if (alt_diff_cur > 565) {
+ if (alt_std_mode.getValue() == 1) {
+ if (ap_alt_cur < 10000) {
+ me["ALT_digit_UP"].setText(sprintf("%s", "FL " ~ ap_alt_cur / 100));
+ } else {
+ me["ALT_digit_UP"].setText(sprintf("%s", "FL " ~ ap_alt_cur / 100));
+ }
+ } else {
+ me["ALT_digit_UP"].setText(sprintf("%5.0f", ap_alt_cur));
+ }
+ me["ALT_digit_UP"].show();
+ me["ALT_digit_DN"].hide();
+ me["ALT_target"].hide();
+ }
+ } else {
+ me["ALT_error"].show();
+ me["ALT_frame"].setColor(1,0,0);
+ me["ALT_group"].hide();
+ me["ALT_group2"].hide();
+ me["ALT_scale"].hide();
+ }
+
me.updateCommonFast();
},
};
diff --git a/Models/Instruments/PFD/res/pfd.svg b/Models/Instruments/PFD/res/pfd.svg
index df26ecef..b334de65 100644
--- a/Models/Instruments/PFD/res/pfd.svg
+++ b/Models/Instruments/PFD/res/pfd.svg
@@ -12,7 +12,7 @@
viewBox="0 0 1024 1024"
version="1.1"
id="svg2"
- inkscape:version="0.91 r13725"
+ inkscape:version="0.92.4 (5da689c313, 2019-01-14)"
sodipodi:docname="pfd.svg">
@@ -37,14 +37,14 @@
guidetolerance="10"
inkscape:pageopacity="1"
inkscape:pageshadow="2"
- inkscape:window-width="1920"
- inkscape:window-height="1027"
+ inkscape:window-width="1366"
+ inkscape:window-height="705"
id="namedview371"
showgrid="false"
- inkscape:zoom="0.70710678"
- inkscape:cx="1179.7256"
- inkscape:cy="481.71975"
- inkscape:window-x="1592"
+ inkscape:zoom="2.0149341"
+ inkscape:cx="51.385843"
+ inkscape:cy="279.39354"
+ inkscape:window-x="-8"
inkscape:window-y="-8"
inkscape:window-maximized="1"
inkscape:current-layer="svg2"
@@ -577,7 +577,7 @@
inkscape:label="#g4699">
10
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:32px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:end;text-anchor:end;fill:#ffffff;fill-opacity:1;stroke-width:0.75">10
20
20
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:32px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:end;text-anchor:end;fill:#ffffff;fill-opacity:1;stroke-width:0.75">20
30
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:32px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:end;text-anchor:end;fill:#ffffff;fill-opacity:1;stroke-width:0.75">30
40
40
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:32px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:end;text-anchor:end;fill:#ffffff;fill-opacity:1;stroke-width:0.75">40
50
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:32px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:end;text-anchor:end;fill:#ffffff;fill-opacity:1;stroke-width:0.75">50
60
60
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:32px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:end;text-anchor:end;fill:#ffffff;fill-opacity:1;stroke-width:0.75">60
70
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:32px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:end;text-anchor:end;fill:#ffffff;fill-opacity:1;stroke-width:0.75">70
80
80
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:32px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:end;text-anchor:end;fill:#ffffff;fill-opacity:1;stroke-width:0.75">80
90
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:32px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:end;text-anchor:end;fill:#ffffff;fill-opacity:1;stroke-width:0.75">90
10
10
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:32px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:end;text-anchor:end;fill:#ffffff;fill-opacity:1;stroke-width:0.75">10
20
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:32px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:end;text-anchor:end;fill:#ffffff;fill-opacity:1;stroke-width:0.75">20
30
30
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:32px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:end;text-anchor:end;fill:#ffffff;fill-opacity:1;stroke-width:0.75">30
40
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:32px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:end;text-anchor:end;fill:#ffffff;fill-opacity:1;stroke-width:0.75">40
50
50
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:32px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:end;text-anchor:end;fill:#ffffff;fill-opacity:1;stroke-width:0.75">50
60
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:32px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:end;text-anchor:end;fill:#ffffff;fill-opacity:1;stroke-width:0.75">60
70
70
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:32px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:end;text-anchor:end;fill:#ffffff;fill-opacity:1;stroke-width:0.75">70
80
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:32px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:end;text-anchor:end;fill:#ffffff;fill-opacity:1;stroke-width:0.75">80
90
90
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:32px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:end;text-anchor:end;fill:#ffffff;fill-opacity:1;stroke-width:0.75">90
@@ -1124,12 +1124,11 @@
transform="translate(0,97.08285)">
X
X
X
X
1
2
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:29.77171135px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';fill:#cecdce;fill-opacity:1;stroke-width:0.65757734">2
6
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:31.75603485px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';fill:#cecdce;fill-opacity:1;stroke-width:0.65757734">6
2
1
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:31.75603485px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';fill:#cecdce;fill-opacity:1;stroke-width:0.65757734">1
000
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:42px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:center;text-anchor:middle;fill:#ffffff;fill-opacity:1;stroke-width:0.75">000
000
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:42px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:center;text-anchor:middle;fill:#ffffff;fill-opacity:1;stroke-width:0.75">000
000
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:42px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:center;text-anchor:middle;fill:#ffffff;fill-opacity:1;stroke-width:0.75">000
TOGA
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:35.99948883px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:center;text-anchor:middle;fill:#ffffff;fill-opacity:1;stroke-width:0.65757734">TOGA
ALT
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:35.99948883px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:center;text-anchor:middle;fill:#0dc04b;fill-opacity:1;stroke-width:0.65757734">ALT
CLB
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:35.99948883px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:center;text-anchor:middle;fill:#179ab7;fill-opacity:1;stroke-width:0.65757734">CLB
FL 000
FL 000
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:42px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:start;text-anchor:start;fill:#179ab7;fill-opacity:1;stroke-width:0.75">FL 000
1013
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:38.39944839px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:center;text-anchor:middle;fill:#179ab7;fill-opacity:1;stroke-width:0.75">1013
 40200080604020008060
AP 1+2
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:35.99948502px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:center;text-anchor:middle;fill:#cecdce;fill-opacity:1;stroke-width:0.65757734">AP 1+2
A/THR
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:35.99948502px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:center;text-anchor:middle;fill:#cecdce;fill-opacity:1;stroke-width:0.65757734">A/THR
DUAL
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:35.99948502px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:center;text-anchor:middle;fill:#cecdce;fill-opacity:1;stroke-width:0.65757734">DUAL
FLARE
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:35.99948502px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:center;text-anchor:middle;fill:#0dc04b;fill-opacity:1;stroke-width:0.65757734">FLARE
DH
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:35.99948502px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:center;text-anchor:middle;fill:#cecdce;fill-opacity:1;stroke-width:0.65757734">DH
LVR CLB
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:35.99948502px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:center;text-anchor:middle;fill:#ffffff;fill-opacity:1;stroke-width:0.65757734">LVR CLB
@@ -3150,7 +3143,7 @@
style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:3.19995403;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke" />
00
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:42px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:center;text-anchor:middle;fill:#ffffff;fill-opacity:1;stroke-width:0.75">00
00
00
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:42px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:center;text-anchor:middle;fill:#ffffff;fill-opacity:1;stroke-width:0.75">00
00
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:42px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:center;text-anchor:middle;fill:#ffffff;fill-opacity:1;stroke-width:0.75">00
00
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:42px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:center;text-anchor:middle;fill:#ffffff;fill-opacity:1;stroke-width:0.75">00
000
000
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:42px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:end;text-anchor:end;fill:#179ab7;fill-opacity:1;stroke-width:0.75">000
140
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:42px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:end;text-anchor:end;fill:#ffffff;fill-opacity:1;stroke-width:0.75">140
120
100
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:42px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:end;text-anchor:end;fill:#ffffff;fill-opacity:1;stroke-width:0.75">100
080
060
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:42px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:end;text-anchor:end;fill:#ffffff;fill-opacity:1;stroke-width:0.75">060
040
180
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:42px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:end;text-anchor:end;fill:#ffffff;fill-opacity:1;stroke-width:0.75">180
200
220
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:42px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:end;text-anchor:end;fill:#ffffff;fill-opacity:1;stroke-width:0.75">220
240
260
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:42px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:end;text-anchor:end;fill:#ffffff;fill-opacity:1;stroke-width:0.75">260
280
300
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:42px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:end;text-anchor:end;fill:#ffffff;fill-opacity:1;stroke-width:0.75">300
320
340
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:42px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:end;text-anchor:end;fill:#ffffff;fill-opacity:1;stroke-width:0.75">340
360
380
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:42px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:end;text-anchor:end;fill:#ffffff;fill-opacity:1;stroke-width:0.75">380
400
420
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:42px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:end;text-anchor:end;fill:#ffffff;fill-opacity:1;stroke-width:0.75">420
000
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:48.83483124px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:start;text-anchor:start;fill:#0dc04b;fill-opacity:1;stroke-width:0.75">000
.
000
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:42px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:start;text-anchor:start;fill:#179ab7;fill-opacity:1;stroke-width:0.75">000
.
.
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:42px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:start;text-anchor:start;fill:#179ab7;fill-opacity:1;stroke-width:0.75">.
ALT
VV/S
HDG
+ MACH
diff --git a/Models/Instruments/Pedestal_up/Pedestal_up.xml b/Models/Instruments/Pedestal_up/Pedestal_up.xml
index 683c0310..4c2133d5 100644
--- a/Models/Instruments/Pedestal_up/Pedestal_up.xml
+++ b/Models/Instruments/Pedestal_up/Pedestal_up.xml
@@ -484,4 +484,5 @@
+
diff --git a/Nasal/ECAM/ECAM-controller.nas b/Nasal/ECAM/ECAM-controller.nas
index 11079f37..3b9c2ca4 100644
--- a/Nasal/ECAM/ECAM-controller.nas
+++ b/Nasal/ECAM/ECAM-controller.nas
@@ -15,7 +15,7 @@ var overflow = props.globals.initNode("/ECAM/warnings/overflow", 0, "BOOL");
var dc_ess = props.globals.getNode("/systems/electrical/bus/dc-ess", 1);
var lights = [props.globals.initNode("/ECAM/warnings/master-warning-light", 0, "BOOL"), props.globals.initNode("/ECAM/warnings/master-caution-light", 0, "BOOL")];
-var aural = [props.globals.initNode("/sim/sound/warnings/crc", 0, "BOOL"), props.globals.initNode("/sim/sound/warnings/chime", 0, "BOOL")];
+var aural = [props.globals.initNode("/sim/sound/warnings/crc", 0, "BOOL"), props.globals.initNode("/sim/sound/warnings/chime", 0, "BOOL"), props.globals.initNode("/sim/sound/warnings/cricket", 0, "BOOL")];
var warningFlash = props.globals.initNode("/ECAM/warnings/master-warning-flash", 0, "BOOL");
var lineIndex = 0;
@@ -43,11 +43,13 @@ var warning = {
t.sdPage = sdPage;
t.isMemo = isMemo;
t.hasCalled = 0;
+ t.wasActive = 0;
return t
},
write: func() {
if (me.active == 0) { return; }
+ me.wasActive = 1;
lineIndex = 0;
while (lineIndex < 7 and lines[lineIndex].getValue() != "") {
lineIndex = lineIndex + 1; # go to next line until empty line
@@ -65,16 +67,30 @@ var warning = {
}
},
warnlight: func() {
- if (me.light > 1 or me.noRepeat == 1 or me.active == 0) {return;}
+ if (me.light > 1) { return; }
+ if (me.active == 0 and me.wasActive == 1) {
+ lights[me.light].setBoolValue(0);
+ me.wasActive = 0;
+ }
+
+ if (me.noRepeat == 1 or me.active == 0) { return; }
+
lights[me.light].setBoolValue(1);
me.noRepeat = 1;
},
sound: func() {
- if (me.aural > 1 or me.noRepeat2 == 1 or me.active == 0) {return;}
+ if (me.aural > 2) { return; }
+ if (me.active == 0 and me.wasActive == 1) {
+ aural[me.aural].setBoolValue(0);
+ me.wasActive = 0;
+ }
+
+ if (me.noRepeat2 == 1 or me.active == 0) { return; }
+
if (me.aural != 0) {
aural[me.aural].setBoolValue(0);
}
- me.noRepeat2 = 1;
+ me.noRepeat2 = 1;
settimer(func() {
aural[me.aural].setBoolValue(1);
}, 0.15);
@@ -144,6 +160,7 @@ var status = {
var ECAM_controller = {
_recallCounter: 0,
+ _noneActive: 0,
init: func() {
ECAMloopTimer.start();
me.reset();
@@ -190,6 +207,9 @@ var ECAM_controller = {
w.warnlight();
w.sound();
counter += 1;
+ } elsif (w.wasActive == 1) {
+ w.warnlight();
+ w.sound();
}
}
}
@@ -295,6 +315,7 @@ var ECAM_controller = {
}
},
recall: func() {
+ me._noneActive = 1;
me._recallCounter = 0;
foreach (var w; warnings.vector) {
if (w.clearFlag == 1) {
@@ -302,9 +323,13 @@ var ECAM_controller = {
w.clearFlag = 0;
me._recallCounter += 1;
}
+
+ if (w.active == 1) {
+ me._noneActive = 0;
+ }
}
- if (me._recallCounter == 0) {
+ if (me._recallCounter == 0 and me._noneActive) {
FWC.Btn.recallStsNormal.setValue(1);
settimer(func() {
if (FWC.Btn.recallStsNormal.getValue() == 1) { # catch unexpected error, trying something new here
@@ -319,6 +344,9 @@ var ECAM_controller = {
warning.active = 0;
warning.noRepeat = 0;
warning.noRepeat2 = 0;
+ if (warning.aural == 2) {
+ aural[2].setValue(0);
+ }
},
};
diff --git a/Nasal/ECAM/ECAM-logic.nas b/Nasal/ECAM/ECAM-logic.nas
index 97d697fe..0c27deff 100644
--- a/Nasal/ECAM/ECAM-logic.nas
+++ b/Nasal/ECAM/ECAM-logic.nas
@@ -10,7 +10,7 @@ var apWarn = props.globals.getNode("/it-autoflight/output/ap-warning", 1);
var athrWarn = props.globals.getNode("/it-autoflight/output/athr-warning", 1);
var emerGen = props.globals.getNode("/controls/electrical/switches/emer-gen", 1);
-var fac1Node = props.globals.getNode("/controls/fctl/fac1", 1);
+var fac1Node = props.globals.getNode("/controls/fctl/switches/fac1", 1);
var state1Node = props.globals.getNode("/engines/engine[0]/state", 1);
var state2Node = props.globals.getNode("/engines/engine[1]/state", 1);
var wowNode = props.globals.getNode("/fdm/jsbsim/position/wow", 1);
@@ -21,6 +21,7 @@ var apu_bleedSw = props.globals.getNode("/controls/pneumatic/switches/bleedapu
var gear = props.globals.getNode("/gear/gear-pos-norm", 1);
var cutoff1 = props.globals.getNode("/controls/engines/engine[0]/cutoff-switch", 1);
var cutoff2 = props.globals.getNode("/controls/engines/engine[1]/cutoff-switch", 1);
+var stallVoice = props.globals.initNode("/sim/sound/warnings/stall-voice", 0, "BOOL");
var engOpt = props.globals.getNode("/options/eng", 1);
# local variables
@@ -28,11 +29,53 @@ var phaseVar = nil;
var dualFailFACActive = 1;
var emerConfigFACActive = 1;
var gear_agl_cur = nil;
-
var messages_priority_3 = func {
phaseVar = phaseNode.getValue();
- # FCTL
+ # Stall
+ # todo - altn law and emer cancel flipflops page 2440
+ if (phaseVar >= 5 and phaseVar <= 7 and (getprop("/fdm/jsbsim/fcs/slat-pos-deg") <= 15 and (getprop("/systems/navigation/adr/output/aoa-1") > 15 or getprop("/systems/navigation/adr/output/aoa-2") > 15 or getprop("/systems/navigation/adr/output/aoa-3") > 15)) or (getprop("/fdm/jsbsim/fcs/slat-pos-deg") > 15 and (getprop("/systems/navigation/adr/output/aoa-1") > 23 or getprop("/systems/navigation/adr/output/aoa-2") > 23 or getprop("/systems/navigation/adr/output/aoa-3") > 23))) {
+ stall.active = 1;
+ } else {
+ ECAM_controller.warningReset(stall);
+ }
+
+ if (stall.active) {
+ stallVoice.setValue(1);
+ } else {
+ stallVoice.setValue(0);
+ }
+
+ if ((phaseVar == 1 or (phaseVar >= 5 and phaseVar <= 7)) and getprop("/systems/navigation/adr/output/overspeed")) {
+ overspeed.active = 1;
+ if (getprop("/systems/navigation/adr/computation/overspeed-vmo") or getprop("/systems/navigation/adr/computation/overspeed-mmo")) {
+ overspeedVMO.active = 1;
+ } else {
+ ECAM_controller.warningReset(overspeedVMO);
+ }
+
+ if (getprop("/systems/navigation/adr/computation/overspeed-vle")) {
+ overspeedGear.active = 1;
+ } else {
+ ECAM_controller.warningReset(overspeedGear);
+ }
+
+ if (getprop("/systems/navigation/adr/computation/overspeed-vfe")) {
+ overspeedFlap.active = 1;
+ overspeedFlap.msg = "-VFE................" ~ (systems.ADIRSnew.overspeedVFE.getValue() - 4);
+ } else {
+ ECAM_controller.warningReset(overspeedFlap);
+ overspeedFlap.msg = "-VFE................XXX";
+ }
+ } else {
+ ECAM_controller.warningReset(overspeed);
+ ECAM_controller.warningReset(overspeedVMO);
+ ECAM_controller.warningReset(overspeedGear);
+ ECAM_controller.warningReset(overspeedFlap);
+ overspeedFlap.msg = "-VFE................XXX";
+ }
+
+ # FCTL FLAPS NOT ZERO
if ((flap_not_zero.clearFlag == 0) and phaseVar == 6 and getprop("/controls/flight/flap-lever") != 0 and getprop("/instrumentation/altimeter/indicated-altitude-ft") > 22000) {
flap_not_zero.active = 1;
} else {
@@ -929,7 +972,7 @@ var messages_priority_3 = func {
var messages_priority_2 = func {
phaseVar = phaseNode.getValue();
# DC EMER CONFIG
- if (!getprop("/systems/electrical/some-electric-thingie/emer-elec-config") and systems.ELEC.Bus.dcEss.getValue() < 25 and systems.ELEC.Bus.dc1.getValue() < 25 and systems.ELEC.Bus.dc2.getValue() < 25 and phaseVar != 4 and phaseVar != 8) {
+ if (!getprop("/systems/electrical/some-electric-thingie/emer-elec-config") and systems.ELEC.Bus.dcEss.getValue() < 25 and systems.ELEC.Bus.dc1.getValue() < 25 and systems.ELEC.Bus.dc2.getValue() < 25 and phaseVar != 4 and phaseVar != 8 and dcEmerconfig.clearFlag == 0) {
dcEmerconfig.active = 1;
dcEmerconfigManOn.active = 1;
} else {
@@ -937,7 +980,7 @@ var messages_priority_2 = func {
ECAM_controller.warningReset(dcEmerconfigManOn);
}
- if (!getprop("/systems/electrical/some-electric-thingie/emer-elec-config") and !dcEmerconfig.active and systems.ELEC.Bus.dc1.getValue() < 25 and systems.ELEC.Bus.dc2.getValue() < 25 and phaseVar != 4 and phaseVar != 8) {
+ if (!getprop("/systems/electrical/some-electric-thingie/emer-elec-config") and !dcEmerconfig.active and systems.ELEC.Bus.dc1.getValue() < 25 and systems.ELEC.Bus.dc2.getValue() < 25 and phaseVar != 4 and phaseVar != 8 and dcBus12Fault.clearFlag == 0) {
dcBus12Fault.active = 1;
dcBus12FaultBlower.active = 1;
dcBus12FaultExtract.active = 1;
@@ -953,7 +996,7 @@ var messages_priority_2 = func {
ECAM_controller.warningReset(dcBus12FaultBrking);
}
- if (!getprop("/systems/electrical/some-electric-thingie/emer-elec-config") and systems.ELEC.Bus.acEss.getValue() < 110 and phaseVar != 4 and phaseVar != 8) {
+ if (!getprop("/systems/electrical/some-electric-thingie/emer-elec-config") and systems.ELEC.Bus.acEss.getValue() < 110 and phaseVar != 4 and phaseVar != 8 and AcBusEssFault.clearFlag == 0) {
AcBusEssFault.active = 1;
if (!systems.ELEC.Switch.acEssFeed.getBoolValue()) {
AcBusEssFaultFeed.active = 1;
@@ -967,7 +1010,7 @@ var messages_priority_2 = func {
ECAM_controller.warningReset(AcBusEssFaultAtc);
}
- if (!getprop("/systems/electrical/some-electric-thingie/emer-elec-config") and systems.ELEC.Bus.ac1.getValue() < 110 and phaseVar != 4 and phaseVar != 8) {
+ if (!getprop("/systems/electrical/some-electric-thingie/emer-elec-config") and systems.ELEC.Bus.ac1.getValue() < 110 and phaseVar != 4 and phaseVar != 8 and AcBus1Fault.clearFlag == 0) {
AcBus1Fault.active = 1;
AcBus1FaultBlower.active = 1;
} else {
@@ -975,7 +1018,7 @@ var messages_priority_2 = func {
ECAM_controller.warningReset(AcBus1FaultBlower);
}
- if (!dcEmerconfig.active and systems.ELEC.Bus.dcEss.getValue() < 25 and phaseVar != 4 and phaseVar != 8) {
+ if (!dcEmerconfig.active and systems.ELEC.Bus.dcEss.getValue() < 25 and phaseVar != 4 and phaseVar != 8 and DcEssBusFault.clearFlag == 0) {
DcEssBusFault.active = 1;
DcEssBusFaultRadio.active = 1;
DcEssBusFaultRadio2.active = 1;
@@ -989,7 +1032,7 @@ var messages_priority_2 = func {
ECAM_controller.warningReset(DcEssBusFaultGPWS);
}
- if (!getprop("/systems/electrical/some-electric-thingie/emer-elec-config") and systems.ELEC.Bus.ac2.getValue() < 110 and phaseVar != 4 and phaseVar != 8) {
+ if (!getprop("/systems/electrical/some-electric-thingie/emer-elec-config") and systems.ELEC.Bus.ac2.getValue() < 110 and phaseVar != 4 and phaseVar != 8 and AcBus2Fault.clearFlag == 0) {
AcBus2Fault.active = 1;
AcBus2FaultExtract.active = 1;
} else {
@@ -997,7 +1040,7 @@ var messages_priority_2 = func {
ECAM_controller.warningReset(AcBus2FaultExtract);
}
- if (!getprop("/systems/electrical/some-electric-thingie/emer-elec-config") and systems.ELEC.Bus.dc1.getValue() < 25 and systems.ELEC.Bus.dc2.getValue() >= 25 and phaseVar != 4 and phaseVar != 8) {
+ if (!getprop("/systems/electrical/some-electric-thingie/emer-elec-config") and systems.ELEC.Bus.dc1.getValue() < 25 and systems.ELEC.Bus.dc2.getValue() >= 25 and phaseVar != 4 and phaseVar != 8 and dcBus1Fault.clearFlag == 0) {
dcBus1Fault.active = 1;
dcBus1FaultBlower.active = 1;
dcBus1FaultExtract.active = 1;
@@ -1007,7 +1050,7 @@ var messages_priority_2 = func {
ECAM_controller.warningReset(dcBus1FaultExtract);
}
- if (!getprop("/systems/electrical/some-electric-thingie/emer-elec-config") and systems.ELEC.Bus.dc1.getValue() >= 25 and systems.ELEC.Bus.dc2.getValue() <= 25 and phaseVar != 4 and phaseVar != 8) {
+ if (!getprop("/systems/electrical/some-electric-thingie/emer-elec-config") and systems.ELEC.Bus.dc1.getValue() >= 25 and systems.ELEC.Bus.dc2.getValue() <= 25 and phaseVar != 4 and phaseVar != 8 and dcBus2Fault.clearFlag == 0) {
dcBus2Fault.active = 1;
dcBus2FaultAirData.active = 1;
dcBus2FaultBaro.active = 1;
@@ -1017,13 +1060,13 @@ var messages_priority_2 = func {
ECAM_controller.warningReset(dcBus2FaultBaro);
}
- if (!getprop("/systems/electrical/some-electric-thingie/emer-elec-config") and !dcEmerconfig.active and systems.ELEC.Bus.dcBat.getValue() < 25 and phaseVar != 4 and phaseVar != 5 and phaseVar != 7 and phaseVar != 8) {
+ if (!getprop("/systems/electrical/some-electric-thingie/emer-elec-config") and !dcEmerconfig.active and systems.ELEC.Bus.dcBat.getValue() < 25 and phaseVar != 4 and phaseVar != 5 and phaseVar != 7 and phaseVar != 8 and dcBusBatFault.clearFlag == 0) {
dcBusBatFault.active = 1;
} else {
ECAM_controller.warningReset(dcBusBatFault);
}
- if (!(getprop("/systems/electrical/some-electric-thingie/emer-elec-config") and !getprop("/systems/electrical/relay/emer-glc/contact-pos")) and systems.ELEC.Bus.dcEssShed.getValue() < 25 and systems.ELEC.Bus.dcEss.getValue() >= 25 and phaseVar != 4 and phaseVar != 8) {
+ if (!(getprop("/systems/electrical/some-electric-thingie/emer-elec-config") and !getprop("/systems/electrical/relay/emer-glc/contact-pos")) and systems.ELEC.Bus.dcEssShed.getValue() < 25 and systems.ELEC.Bus.dcEss.getValue() >= 25 and phaseVar != 4 and phaseVar != 8 and dcBusEssShed.clearFlag == 0) {
dcBusEssShed.active = 1;
dcBusEssShedExtract.active = 1;
dcBusEssShedIcing.active = 1;
@@ -1033,7 +1076,7 @@ var messages_priority_2 = func {
ECAM_controller.warningReset(dcBusEssShedIcing);
}
- if (!(getprop("/systems/electrical/some-electric-thingie/emer-elec-config") and !getprop("/systems/electrical/relay/emer-glc/contact-pos")) and systems.ELEC.Bus.acEssShed.getValue() < 110 and systems.ELEC.Bus.acEss.getValue() >= 110 and phaseVar != 4 and phaseVar != 8) {
+ if (!(getprop("/systems/electrical/some-electric-thingie/emer-elec-config") and !getprop("/systems/electrical/relay/emer-glc/contact-pos")) and systems.ELEC.Bus.acEssShed.getValue() < 110 and systems.ELEC.Bus.acEss.getValue() >= 110 and phaseVar != 4 and phaseVar != 8 and acBusEssShed.clearFlag == 0) {
acBusEssShed.active = 1;
if (!getprop("/systems/electrical/some-electric-thingie/emer-elec-config")) {
acBusEssShedAtc.active = 1;
@@ -1045,7 +1088,13 @@ var messages_priority_2 = func {
ECAM_controller.warningReset(acBusEssShedAtc);
}
- if (fcu.FCUController.FCU1.failed and fcu.FCUController.FCU2.failed and systems.ELEC.Bus.dcEss.getValue() >= 25 and systems.ELEC.Bus.dcEss.getValue() >= 25) {
+ if (getprop("/instrumentation/tcas/serviceable") == 0 and phaseVar != 3 and phaseVar != 4 and phaseVar != 7 and systems.ELEC.Bus.ac1.getValue() and pts.Instrumentation.TCAS.Inputs.mode.getValue() != 1 and tcasFault.clearFlag == 0) {
+ tcasFault.active = 1;
+ } else {
+ ECAM_controller.warningReset(tcasFault);
+ }
+
+ if (fcu.FCUController.FCU1.failed and fcu.FCUController.FCU2.failed and systems.ELEC.Bus.dcEss.getValue() >= 25 and systems.ELEC.Bus.dcEss.getValue() >= 25 and fcuFault.clearFlag == 0) {
fcuFault.active = 1;
fcuFaultBaro.active = 1;
} else {
@@ -1053,7 +1102,7 @@ var messages_priority_2 = func {
ECAM_controller.warningReset(fcuFaultBaro);
}
- if (fcu.FCUController.FCU1.failed and !fcu.FCUController.FCU2.failed and systems.ELEC.Bus.dcEss.getValue() >= 25) {
+ if (fcu.FCUController.FCU1.failed and !fcu.FCUController.FCU2.failed and systems.ELEC.Bus.dcEss.getValue() >= 25 and fcuFault1.clearFlag == 0) {
fcuFault1.active = 1;
fcuFault1Baro.active = 1;
} else {
@@ -1061,7 +1110,7 @@ var messages_priority_2 = func {
ECAM_controller.warningReset(fcuFault1Baro);
}
- if (fcu.FCUController.FCU2.failed and !fcu.FCUController.FCU1.failed and systems.ELEC.Bus.dc2.getValue() >= 25) {
+ if (fcu.FCUController.FCU2.failed and !fcu.FCUController.FCU1.failed and systems.ELEC.Bus.dc2.getValue() >= 25 and fcuFault2.clearFlag == 0) {
fcuFault2.active = 1;
fcuFault2Baro.active = 1;
} else {
@@ -1573,7 +1622,7 @@ var messages_right_memo = func {
}
# Listeners
-setlistener("/controls/fctl/fac1", func() {
+setlistener("/controls/fctl/switches/fac1", func() {
if (dualFail.active == 0 and emerconfig.active == 0) { return; }
if (fac1Node.getBoolValue() and dualFail.active == 1) {
diff --git a/Nasal/ECAM/ECAM-messages.nas b/Nasal/ECAM/ECAM-messages.nas
index 54832420..b4e74496 100644
--- a/Nasal/ECAM/ECAM-messages.nas
+++ b/Nasal/ECAM/ECAM-messages.nas
@@ -10,8 +10,14 @@
# Left E/WD
var warnings = std.Vector.new([
+ var stall = warning.new(msg: "", aural: 2),
var flap_not_zero = warning.new(msg: "F/CTL FLAP LVR NOT ZERO", colour: "r", aural: 0, light: 0),
+ var overspeed = warning.new(msg: "OVER SPEED", colour: "r", aural: 0, light: 0, hasSubmsg: 1),
+ var overspeedVMO = warning.new(msg: "-VMO/MMO.......350 /.82", colour: "r"),
+ var overspeedGear = warning.new(msg: "-VLE...........280 /.67", colour: "r"),
+ var overspeedFlap = warning.new(msg: "-VFE................XXX", colour: "r"),
+
# DUAL ENG FAIL
var dualFail = warning.new(msg: "ENG DUAL FAILURE", colour: "r", aural: 0, light: 0, hasSubmsg: 1),
var dualFailModeSel = warning.new(msg: " -ENG MODE SEL.......IGN", colour: "c"),
@@ -118,11 +124,11 @@ var warnings = std.Vector.new([
# Autopilot
var ap_offw = warning.new(msg: "AUTO FLT AP OFF", colour: "r", light: 0),
- var athr_offw = warning.new(msg: "AUTO FLT A/THR OFF", colour: "a", aural: 1, light: 1),
+ var athr_offw = warning.new(msg: "AUTO FLT A/THR OFF", colour: "a", aural: 1, light: 1, hasSubmsg: 1),
var athr_offw_1 = warning.new(msg: "-THR LEVERS........MOVE", colour: "c"),
- var athr_lock = warning.new(msg: "ENG THRUST LOCKED", colour: "a", aural: 1, light: 1),
+ var athr_lock = warning.new(msg: "ENG THRUST LOCKED", colour: "a", aural: 1, light: 1, hasSubmsg: 1),
var athr_lock_1 = warning.new(msg: "-THR LEVERS........MOVE", colour: "c"),
- var athr_lim = warning.new(msg: "AUTO FLT A/THR LIMITED", colour: "a", aural: 1, light: 1),
+ var athr_lim = warning.new(msg: "AUTO FLT A/THR LIMITED", colour: "a", aural: 1, light: 1, hasSubmsg: 1),
var athr_lim_1 = warning.new(msg: "-THR LEVERS........MOVE", colour: "c"),
# Cargo smoke
@@ -215,6 +221,9 @@ var warnings = std.Vector.new([
var acBusEssShed = warning.new(msg: "ELEC DC ESS BUS SHED", colour: "a", aural: 1, light: 1),
var acBusEssShedAtc = warning.new(msg: " -ATC..............SYS 2", colour: "c"),
+ # TCAS FAULT
+ var tcasFault = warning.new(msg: "NAV TCAS FAULT", colour: "a", aural: 1, light: 1),
+
# FCU fault
var fcuFault = warning.new(msg: "AUTO FLT FCU 1+2 FAULT", colour: "a", aural: 1, light: 1, hasSubmsg: 1),
var fcuFaultBaro = warning.new(msg: " -PFD BARO REF: STD ONLY", colour: "c"),
@@ -239,7 +248,6 @@ var warnings = std.Vector.new([
var apuLoopBFault = warning.new(msg: "APU FIRE LOOP B FAULT", colour: "a"),
var crgFwdFireDetFault = warning.new(msg: "FWD CRG DET FAULT", colour: "a"),
var crgAftFireDetFault = warning.new(msg: "AFT CRG DET FAULT", colour: "a"),
-
# Recall
var recallNormal = warning.new(msg: " ", colour: "g", hasSubmsg: 1),
var recallNormal1 = warning.new(msg: " ", colour: "g", hasSubmsg: 1),
diff --git a/Nasal/FBW/it-fbw.nas b/Nasal/FBW/it-fbw.nas
index 1709f75e..4ea77502 100644
--- a/Nasal/FBW/it-fbw.nas
+++ b/Nasal/FBW/it-fbw.nas
@@ -5,84 +5,178 @@
# If All ELACs Fail, Alternate Law
-setprop("/it-fbw/roll-back", 0);
-setprop("/it-fbw/spd-hold", 0);
-setprop("/it-fbw/protections/overspeed", 0);
-setprop("/it-fbw/protections/overspeed-roll-back", 0);
-setprop("/it-fbw/speeds/vmo-mmo", 350);
var mmoIAS = 0;
-var fctlInit = func {
- setprop("/controls/fctl/elac1", 1);
- setprop("/controls/fctl/elac2", 1);
- setprop("/controls/fctl/sec1", 1);
- setprop("/controls/fctl/sec2", 1);
- setprop("/controls/fctl/sec3", 1);
- setprop("/controls/fctl/fac1", 1);
- setprop("/controls/fctl/fac2", 1);
- setprop("/systems/fctl/elac1", 0);
- setprop("/systems/fctl/elac2", 0);
- setprop("/systems/fctl/sec1", 0);
- setprop("/systems/fctl/sec2", 0);
- setprop("/systems/fctl/sec3", 0);
- setprop("/systems/fctl/fac1", 0);
- setprop("/systems/fctl/fac2", 0);
- setprop("/it-fbw/degrade-law", 0);
- setprop("/it-fbw/override", 0);
- setprop("/it-fbw/law", 0);
- updatet.start();
- fbwt.start();
-}
+var elac1_sw = 0;
+var elac2_sw = 0;
+var sec1_sw = 0;
+var sec2_sw = 0;
+var sec3_sw = 0;
+var fac1_sw = 0;
+var fac2_sw = 0;
+
+var elac1_fail = 0;
+var elac2_fail = 0;
+var sec1_fail = 0;
+var sec2_fail = 0;
+var sec3_fail = 0;
+var fac1_fail = 0;
+var fac2_fail = 0;
+
+var ac_ess = 0;
+var dc_ess = 0;
+var dc_ess_shed = 0;
+var ac1 = 0;
+var ac2 = 0;
+var dc1 = 0;
+var dc2 = 0;
+var dcHot1 = 0;
+var dcHot2 = 0;
+var blue = 0;
+var green = 0;
+var yellow = 0;
+var ail = 0;
+var roll = 0;
+var rollback = 0;
+var battery1_sw = 0;
+var battery2_sw = 0;
+
+var law = 0;
+
+var FBW = {
+ degradeLaw: props.globals.getNode("/it-fbw/degrade-law"),
+ activeLaw: props.globals.getNode("/it-fbw/law"),
+ override: props.globals.getNode("/it-fbw/override"),
+ rollBack: props.globals.getNode("/it-fbw/roll-back"),
+ rollLim: props.globals.getNode("/it-fbw/roll-lim"),
+ Computers: {
+ elac1: props.globals.getNode("/systems/fctl/elac1"),
+ elac2: props.globals.getNode("/systems/fctl/elac2"),
+ sec1: props.globals.getNode("/systems/fctl/sec1"),
+ sec2: props.globals.getNode("/systems/fctl/sec2"),
+ sec3: props.globals.getNode("/systems/fctl/sec3"),
+ fac1: props.globals.getNode("/systems/fctl/fac1"),
+ fac2: props.globals.getNode("/systems/fctl/fac2"),
+ },
+ Failures: {
+ elac1: props.globals.getNode("/systems/failures/fctl/elac1"),
+ elac2: props.globals.getNode("/systems/failures/fctl/elac2"),
+ sec1: props.globals.getNode("/systems/failures/fctl/sec1"),
+ sec2: props.globals.getNode("/systems/failures/fctl/sec2"),
+ sec3: props.globals.getNode("/systems/failures/fctl/sec3"),
+ fac1: props.globals.getNode("/systems/failures/fctl/fac1"),
+ fac2: props.globals.getNode("/systems/failures/fctl/fac2"),
+ },
+ Lights: {
+ elac1: props.globals.getNode("/controls/fctl/lights/elac1-fault"),
+ elac2: props.globals.getNode("/controls/fctl/lights/elac2-fault"),
+ sec1: props.globals.getNode("/controls/fctl/lights/sec1-fault"),
+ sec2: props.globals.getNode("/controls/fctl/lights/sec2-fault"),
+ sec2: props.globals.getNode("/controls/fctl/lights/sec3-fault"),
+ fac1: props.globals.getNode("/controls/fctl/lights/fac1-fault"),
+ fac2: props.globals.getNode("/controls/fctl/lights/fac2-fault"),
+ },
+ Protections: {
+ overspeedRoll: props.globals.getNode("/it-fbw/protections/overspeed-roll-back"),
+ },
+ Switches: {
+ elac1Sw: props.globals.getNode("/controls/fctl/switches/elac1"),
+ elac2Sw: props.globals.getNode("/controls/fctl/switches/elac2"),
+ sec1Sw: props.globals.getNode("/controls/fctl/switches/sec1"),
+ sec2Sw: props.globals.getNode("/controls/fctl/switches/sec2"),
+ sec3Sw: props.globals.getNode("/controls/fctl/switches/sec3"),
+ fac1Sw: props.globals.getNode("/controls/fctl/switches/fac1"),
+ fac2Sw: props.globals.getNode("/controls/fctl/switches/fac2"),
+ },
+ init: func() {
+ if (updatet.isRunning) {
+ updatet.stop();
+ }
+ if (fbwt.isRunning) {
+ fbwt.stop();
+ }
+
+ me.resetFail();
+
+ me.Switches.elac1Sw.setBoolValue(1);
+ me.Switches.elac2Sw.setBoolValue(1);
+ me.Switches.sec1Sw.setBoolValue(1);
+ me.Switches.sec2Sw.setBoolValue(1);
+ me.Switches.sec3Sw.setBoolValue(1);
+ me.Switches.fac1Sw.setBoolValue(1);
+ me.Switches.fac2Sw.setBoolValue(1);
+ me.Computers.elac1.setBoolValue(0);
+ me.Computers.elac2.setBoolValue(0);
+ me.Computers.sec1.setBoolValue(0);
+ me.Computers.sec2.setBoolValue(0);
+ me.Computers.sec3.setBoolValue(0);
+ me.Computers.fac1.setBoolValue(0);
+ me.Computers.fac2.setBoolValue(0);
+ me.degradeLaw.setValue(0);
+ me.activeLaw.setValue(0);
+ me.override.setValue(0);
+
+ if (!updatet.isRunning) {
+ updatet.start();
+ }
+ if (!fbwt.isRunning) {
+ fbwt.start();
+ }
+ },
+ resetFail: func() {
+ me.Failures.elac1.setBoolValue(0);
+ me.Failures.elac2.setBoolValue(0);
+ me.Failures.sec1.setBoolValue(0);
+ me.Failures.sec2.setBoolValue(0);
+ me.Failures.sec3.setBoolValue(0);
+ me.Failures.fac1.setBoolValue(0);
+ me.Failures.fac2.setBoolValue(0);
+ },
+};
var update_loop = func {
- var elac1_sw = getprop("/controls/fctl/elac1");
- var elac2_sw = getprop("/controls/fctl/elac2");
- var sec1_sw = getprop("/controls/fctl/sec1");
- var sec2_sw = getprop("/controls/fctl/sec2");
- var sec3_sw = getprop("/controls/fctl/sec3");
- var fac1_sw = getprop("/controls/fctl/fac1");
- var fac2_sw = getprop("/controls/fctl/fac2");
+ elac1_sw = FBW.Switches.elac1Sw.getValue();
+ elac2_sw = FBW.Switches.elac2Sw.getValue();
+ sec1_sw = FBW.Switches.sec1Sw.getValue();
+ sec2_sw = FBW.Switches.sec2Sw.getValue();
+ sec3_sw = FBW.Switches.sec3Sw.getValue();
+ fac1_sw = FBW.Switches.fac1Sw.getValue();
+ fac2_sw = FBW.Switches.fac2Sw.getValue();
- var elac1_fail = getprop("/systems/failures/elac1");
- var elac2_fail = getprop("/systems/failures/elac2");
- var sec1_fail = getprop("/systems/failures/sec1");
- var sec2_fail = getprop("/systems/failures/sec2");
- var sec3_fail = getprop("/systems/failures/sec3");
- var fac1_fail = getprop("/systems/failures/fac1");
- var fac2_fail = getprop("/systems/failures/fac2");
+ elac1_fail = FBW.Failures.elac1.getValue();
+ elac2_fail = FBW.Failures.elac2.getValue();
+ sec1_fail = FBW.Failures.sec1.getValue();
+ sec2_fail = FBW.Failures.sec2.getValue();
+ sec3_fail = FBW.Failures.sec3.getValue();
+ fac1_fail = FBW.Failures.fac1.getValue();
+ fac2_fail = FBW.Failures.fac2.getValue();
- var ac_ess = props.globals.getNode("/systems/electrical/bus/ac-ess").getValue();
- var dc_ess = props.globals.getNode("/systems/electrical/bus/dc-ess").getValue();
- var dc_ess_shed = props.globals.getNode("/systems/electrical/bus/dc-ess-shed").getValue();
- var ac1 = props.globals.getNode("/systems/electrical/bus/ac-1").getValue();
- var ac2 = props.globals.getNode("/systems/electrical/bus/ac-2").getValue();
- var dc1 = props.globals.getNode("/systems/electrical/bus/dc-1").getValue();
- var dc2 = props.globals.getNode("/systems/electrical/bus/dc-2").getValue();
- var battery1_sw = props.globals.getNode("/controls/electrical/switches/bat-1").getValue();
- var battery2_sw = props.globals.getNode("/controls/electrical/switches/bat-2").getValue();
- var elac1_test = getprop("/systems/electrical/elac1-test");
- var elac2_test = getprop("/systems/electrical/elac2-test");
+ ac_ess = systems.ELEC.Bus.acEss.getValue();
+ dc_ess = systems.ELEC.Bus.dcEss.getValue();
+ dc_ess_shed = systems.ELEC.Bus.dcEssShed.getValue();
+ ac1 = systems.ELEC.Bus.ac1.getValue();
+ ac2 = systems.ELEC.Bus.ac2.getValue();
+ dc1 = systems.ELEC.Bus.dc1.getValue();
+ dc2 = systems.ELEC.Bus.dc2.getValue();
+ dcHot1 = systems.ELEC.Bus.dcHot1.getValue();
+ dcHot2 = systems.ELEC.Bus.dcHot2.getValue();
+ battery1_sw = systems.ELEC.Switch.bat1.getValue();
+ battery2_sw = systems.ELEC.Switch.bat2.getValue();
- if (elac1_sw and !elac1_fail and (dc_ess >= 25 or battery1_sw) and !elac1_test) {
- setprop("/systems/fctl/elac1", 1);
- setprop("/systems/failures/elac1-fault", 0);
- } else if (elac1_sw and (elac1_fail or (dc_ess < 25 and !battery1_sw)) and !elac1_test) {
- setprop("/systems/failures/elac1-fault", 1);
- setprop("/systems/fctl/elac1", 0);
- } else if (!elac1_test) {
- setprop("/systems/failures/elac1-fault", 0);
- setprop("/systems/fctl/elac1", 1);
+ if (elac1_sw and !elac1_fail and (dc_ess >= 25 or dcHot1 >= 25)) {
+ FBW.Computers.elac1.setValue(1);
+ FBW.Lights.elac1.setValue(0);
+ } else if (elac1_sw and (elac1_fail or (dc_ess < 25 and dcHot1 < 25))) {
+ FBW.Computers.elac1.setValue(0);
+ FBW.Lights.elac1.setValue(1);
}
- if (elac2_sw and !elac2_fail and (dc2 >= 25 or battery2_sw) and !elac2_test) {
- setprop("/systems/fctl/elac2", 1);
- setprop("/systems/failures/elac2-fault", 0);
- } else if (elac2_sw and (elac2_fail or (dc2 < 25 and !battery2_sw)) and !elac2_test) {
- setprop("/systems/failures/elac2-fault", 1);
- setprop("/systems/fctl/elac2", 0);
- } else if (!elac2_test) {
- setprop("/systems/failures/elac2-fault", 0);
- setprop("/systems/fctl/elac2", 1);
+ if (elac2_sw and !elac2_fail and (dc2 >= 25 or dcHot2 >= 25)) {
+ FBW.Computers.elac2.setValue(1);
+ FBW.Lights.elac2.setValue(0);
+ } else if (elac1_sw and (elac2_fail or (dc2 < 25 and dcHot2 < 25))) {
+ FBW.Computers.elac2.setValue(0);
+ FBW.Lights.elac2.setValue(1);
}
if (sec1_sw and !sec1_fail and ac_ess >= 110) {
@@ -165,37 +259,40 @@ var update_loop = func {
var sec3 = getprop("/systems/fctl/sec3");
var fac1 = getprop("/systems/fctl/fac1");
var fac2 = getprop("/systems/fctl/fac2");
- var law = getprop("/it-fbw/law");
+ law = FBW.activeLaw.getValue();
# Degrade logic, all failures which degrade FBW need to go here. -JD
+ blue = systems.HYD.Psi.blue.getValue();
+ green = systems.HYD.Psi.green.getValue();
+ yellow = systems.HYD.Psi.yellow.getValue();
if (getprop("/gear/gear[1]/wow") == 0 and getprop("/gear/gear[2]/wow") == 0) {
if (!elac1 and !elac2) {
if (law == 0) {
- setprop("/it-fbw/degrade-law", 1);
+ FBW.degradeLaw.setValue(1);
}
}
- if (ac_ess >= 110 and getprop("/systems/hydraulic/blue-psi") >= 1500 and getprop("/systems/hydraulic/green-psi") < 1500 and getprop("/systems/hydraulic/yellow-psi") < 1500) {
+ if (ac_ess >= 110 and blue >= 1500 and green < 1500 and yellow < 1500) {
if (law == 0 or law == 1) {
- setprop("/it-fbw/degrade-law", 2);
+ FBW.degradeLaw.setValue(2);
}
}
- if (ac_ess < 110 or (getprop("/systems/hydraulic/blue-psi") < 1500 and getprop("/systems/hydraulic/green-psi") < 1500 and getprop("/systems/hydraulic/yellow-psi") < 1500)) {
- setprop("/it-fbw/degrade-law", 3);
+ if (ac_ess < 110 or (blue < 1500 and green < 1500 and yellow < 1500)) {
+ FBW.degradeLaw.setValue(3);
}
}
if (getprop("/controls/gear/gear-down") == 1 and getprop("/it-autoflight/output/ap1") == 0 and getprop("/it-autoflight/output/ap2") == 0) {
if (law == 1) {
- setprop("/it-fbw/degrade-law", 2);
+ FBW.degradeLaw.setValue(2);
}
}
# degrade loop runs faster; reset this variable
- var law = getprop("/it-fbw/law");
+ law = FBW.activeLaw.getValue();
# Mech Backup can always return to direct, if it can.
- if (law == 3 and ac_ess >= 110 and (getprop("/systems/hydraulic/green-psi") >= 1500 or getprop("/systems/hydraulic/blue-psi") >= 1500 or getprop("/systems/hydraulic/yellow-psi") >= 1500)) {
- setprop("/it-fbw/degrade-law", 2);
+ if (law == 3 and ac_ess >= 110 and (green >= 1500 or blue >= 1500 or yellow >= 1500)) {
+ FBW.degradeLaw.setValue(2);
}
mmoIAS = (getprop("/instrumentation/airspeed-indicator/indicated-speed-kt") / getprop("/instrumentation/airspeed-indicator/indicated-mach")) * 0.82;
@@ -220,59 +317,60 @@ var update_loop = func {
}
var fbw_loop = func {
- var ail = getprop("/controls/flight/aileron");
+ ail = pts.Controls.Flight.aileron.getValue();
+ roll = pts.Orientation.roll.getValue();
+ rollback = FBW.rollBack.getValue();
- if (ail > 0.4 and getprop("/orientation/roll-deg") >= -33.5) {
- setprop("/it-fbw/roll-lim", "67");
- if (getprop("/it-fbw/roll-back") == 1 and getprop("/orientation/roll-deg") <= 33.5 and getprop("/orientation/roll-deg") >= -33.5) {
- setprop("/it-fbw/roll-back", 0);
+ if (ail > 0.4 and roll >= -33.5) {
+ FBW.rollLim.setValue("67");
+ if (rollback == 1 and roll <= 33.5 and roll >= -33.5) {
+ FBW.rollBack.setValue(0);
+ } elsif (rollback == 0 and (roll > 33.5 or roll < -33.5)) {
+ FBW.rollBack.setValue(1);
}
- if (getprop("/it-fbw/roll-back") == 0 and (getprop("/orientation/roll-deg") > 33.5 or getprop("/orientation/roll-deg") < -33.5)) {
- setprop("/it-fbw/roll-back", 1);
- }
- } else if (ail < -0.4 and getprop("/orientation/roll-deg") <= 33.5) {
- setprop("/it-fbw/roll-lim", "67");
- if (getprop("/it-fbw/roll-back") == 1 and getprop("/orientation/roll-deg") <= 33.5 and getprop("/orientation/roll-deg") >= -33.5) {
- setprop("/it-fbw/roll-back", 0);
- }
- if (getprop("/it-fbw/roll-back") == 0 and (getprop("/orientation/roll-deg") > 33.5 or getprop("/orientation/roll-deg") < -33.5)) {
- setprop("/it-fbw/roll-back", 1);
+ } else if (ail < -0.4 and roll <= 33.5) {
+ FBW.rollLim.setValue("67");
+ if (rollback == 1 and roll <= 33.5 and roll >= -33.5) {
+ FBW.rollBack.setValue(0);
+ } elsif (rollback == 0 and (roll > 33.5 or roll < -33.5)) {
+ FBW.rollBack.setValue(1);
}
} else if (ail < 0.04 and ail > -0.04) {
- setprop("/it-fbw/roll-lim", "33");
- if (getprop("/it-fbw/roll-back") == 1 and getprop("/orientation/roll-deg") <= 33.5 and getprop("/orientation/roll-deg") >= -33.5) {
- setprop("/it-fbw/roll-back", 0);
+ FBW.rollLim.setValue("33");
+ if (rollback == 1 and roll <= 33.5 and roll >= -33.5) {
+ FBW.rollBack.setValue(0);
}
}
if (ail > 0.04 or ail < -0.04) {
- setprop("/it-fbw/protections/overspeed-roll-back", 0);
+ FBW.Protections.overspeedRoll.setValue(0);
} else if (ail < 0.04 and ail > -0.04) {
- setprop("/it-fbw/protections/overspeed-roll-back", 1);
+ FBW.Protections.overspeedRoll.setValue(1);
}
if (getprop("/it-fbw/override") == 0) {
- var degrade = getprop("/it-fbw/degrade-law");
+ var active = FBW.activeLaw.getValue();
+ var degrade = FBW.degradeLaw.getValue();
if (degrade == 0) {
- if (getprop("/it-fbw/law") != 0) {
- setprop("/it-fbw/law", 0);
+ if (active != 0) {
+ FBW.activeLaw.setValue(0);
}
} else if (degrade == 1) {
- if (getprop("/it-fbw/law") != 1) {
- setprop("/it-fbw/law", 1);
+ if (active != 1) {
+ FBW.activeLaw.setValue(1);
}
} else if (degrade == 2) {
- if (getprop("/it-fbw/law") != 2) {
- setprop("/it-fbw/law", 2);
+ if (active != 2) {
+ FBW.activeLaw.setValue(2);
}
} else if (degrade == 3) {
- if (getprop("/it-fbw/law") != 3) {
- setprop("/it-fbw/law", 3);
+ if (active != 3) {
+ FBW.activeLaw.setValue(3);
}
}
}
- if (getprop("/it-fbw/law") != 0) {
+ if (FBW.activeLaw.getValue() != 0) {
if (getprop("/it-autoflight/output/ap1") == 1 or getprop("/it-autoflight/output/ap2") == 1) {
fcu.apOff("hard", 0);
}
diff --git a/Nasal/FMGC/FCU.nas b/Nasal/FMGC/FCU.nas
index dbda3922..03eee6f2 100644
--- a/Nasal/FMGC/FCU.nas
+++ b/Nasal/FMGC/FCU.nas
@@ -58,6 +58,7 @@ var FCU = {
var FCUController = {
FCU1: nil,
FCU2: nil,
+ activeFMGC: props.globals.getNode("/FMGC/active-fmgc-channel"),
FCUworking: 0,
_init: 0,
init: func() {
@@ -77,7 +78,19 @@ var FCUController = {
} else {
me.FCUworking = 0;
}
+
+ notification = nil;
+ foreach (var update_item; me.update_items) {
+ update_item.update(notification);
+ }
},
+ update_items: [
+ props.UpdateManager.FromPropertyHashList(["/it-autoflight/output/fd1","/it-autoflight/output/fd2", "/it-autoflight/output/ap1", "/it-autoflight/output/ap2"], 1, func(notification)
+ {
+ updateActiveFMGC();
+ }
+ ),
+ ],
resetFail: func() {
if (me._init == 0) { return; }
me.FCU1.restore();
@@ -103,7 +116,7 @@ var FCUController = {
},
ATHR: func() {
if (me.FCUworking) {
- if (!athr.getBoolValue()) {
+ if (!athr.getBoolValue() and !pts.FMGC.CasCompare.rejectAll.getBoolValue()) {
athrInput.setValue(1);
} else {
athrOff("hard");
@@ -441,6 +454,21 @@ var FCUController = {
},
};
+# Master / slave principle of operation depending on the autopilot / flight director engagement
+var updateActiveFMGC = func {
+ if (ap1.getBoolValue()) {
+ FCUController.activeFMGC.setValue(1);
+ } elsif (ap2.getBoolValue()) {
+ FCUController.activeFMGC.setValue(2);
+ } elsif (fd1.getBoolValue()) {
+ FCUController.activeFMGC.setValue(1);
+ } elsif (fd2.getBoolValue()) {
+ FCUController.activeFMGC.setValue(2);
+ } else {
+ FCUController.activeFMGC.setValue(1);
+ }
+}
+
# Autopilot Disconnection
var apOff = func(type, side) {
if (side == 0) {
diff --git a/Nasal/FMGC/FMGC.nas b/Nasal/FMGC/FMGC.nas
index 147478d6..8b983ef8 100644
--- a/Nasal/FMGC/FMGC.nas
+++ b/Nasal/FMGC/FMGC.nas
@@ -264,24 +264,24 @@ var masterFMGC = maketimer(0.2, func {
reset_FMGC();
}
+ if (getprop("/systems/navigation/adr/computation/overspeed-vfe-spd") != 1024) {
+ setprop("/FMGC/internal/maxspeed", getprop("/systems/navigation/adr/computation/overspeed-vfe-spd") - 4);
+ } else {
+ setprop("/FMGC/internal/maxspeed", getprop("/it-fbw/speeds/vmo-mmo"));
+ }
+
flap = getprop("/controls/flight/flap-pos");
if (flap == 0) { # 0
- setprop("/FMGC/internal/maxspeed", getprop("/it-fbw/speeds/vmo-mmo"));
setprop("/FMGC/internal/minspeed", 202);
} else if (flap == 1) { # 1
- setprop("/FMGC/internal/maxspeed", 230);
setprop("/FMGC/internal/minspeed", 184);
} else if (flap == 2) { # 1+F
- setprop("/FMGC/internal/maxspeed", 215);
setprop("/FMGC/internal/minspeed", 171);
} else if (flap == 3) { # 2
- setprop("/FMGC/internal/maxspeed", 200);
setprop("/FMGC/internal/minspeed", 156);
} else if (flap == 4) { # 3
- setprop("/FMGC/internal/maxspeed", 185);
setprop("/FMGC/internal/minspeed", 147);
} else if (flap == 5) { # FULL
- setprop("/FMGC/internal/maxspeed", 177);
setprop("/FMGC/internal/minspeed", 131);
}
diff --git a/Nasal/Panels/atc.nas b/Nasal/Panels/atc.nas
index d6c205e4..167e568f 100644
--- a/Nasal/Panels/atc.nas
+++ b/Nasal/Panels/atc.nas
@@ -9,6 +9,9 @@ var guiModes = ['OFF', 'STANDBY', 'TEST', 'GROUND', 'ON', 'ALTITUDE'];
var guiNode = props.globals.getNode("/sim/gui/dialogs/radios/transponder-mode", 1);
var forLoopFlag = 0;
+var altimeter = props.globals.initNode("/instrumentation/transponder/altimeter-input-src", 0, "INT");
+var airspeed = props.globals.initNode("/instrumentation/transponder/airspeed-input-src", 0, "INT");
+
var Transponder = {
mode: 0,
code: "2000",
@@ -97,6 +100,8 @@ var Transponder = {
return;
}
me.activeADIRS = newADIRS;
+ altimeter.setValue(newADIRS);
+ airspeed.setValue(newADIRS);
},
modeSwitch: func(newMode) {
me.mode = newMode;
@@ -196,6 +201,8 @@ var transponderPanel = {
# update newly selected transponder
Transponders.vector[me.atcSel - 1].modeSwitch(me.modeSel);
me.atcFailLight(Transponders.vector[me.atcSel - 1].failed);
+
+ me.updateAirData();
},
modeSwitch: func(newMode) {
if (newMode < 0 or newMode > 5) {
@@ -223,11 +230,27 @@ var transponderPanel = {
me.codeDisp = me.code;
me.codeProp.setValue(sprintf("%s", me.codeDisp));
Transponders.vector[me.atcSel - 1].setCode(me.code);
- }
+ },
+ updateAirData: func() {
+ if (me.atcSel == 1) {
+ if (systems.SwitchingPanel.Switches.airData.getValue() == -1) {
+ Transponders.vector[0].switchADIRS(3);
+ } else {
+ Transponders.vector[0].switchADIRS(1);
+ }
+ } else {
+ if (systems.SwitchingPanel.Switches.airData.getValue() == 1) {
+ Transponders.vector[1].switchADIRS(3);
+ } else {
+ Transponders.vector[1].switchADIRS(2);
+ }
+ }
+ },
};
var init = func() {
transponderPanel.atcSwitch(1);
+ transponderPanel.updateAirData();
transponderTimer.start();
}
diff --git a/Nasal/Sim/libraries.nas b/Nasal/Sim/libraries.nas
index a2fea82b..677bd04b 100644
--- a/Nasal/Sim/libraries.nas
+++ b/Nasal/Sim/libraries.nas
@@ -194,13 +194,14 @@ var triggerDoor = func(door, doorName, doorDesc) {
#######################
var systemsInit = func {
- fbw.fctlInit();
+ fbw.FBW.init();
light_manager.init();
systems.ELEC.init();
systems.PNEU.init();
systems.HYD.init();
systems.FUEL.init();
systems.ADIRS.init();
+ systems.ADIRSnew.init();
systems.eng_init();
systems.fire_init();
systems.autobrake_init();
@@ -220,6 +221,7 @@ var systemsInit = func {
ecam.ECAM_controller.init();
atc.init();
fcu.FCUController.init();
+ dmc.DMController.init();
}
setlistener("/sim/signals/fdm-initialized", func {
@@ -232,11 +234,13 @@ var systemsLoop = maketimer(0.1, func {
systems.HYD.loop();
systems.FUEL.loop();
systems.ADIRS.loop();
+ systems.ADIRSnew.loop();
libraries.ECAM.loop();
libraries.BUTTONS.update();
fadec.FADEC.loop();
rmp.rmpUpdate();
fcu.FCUController.loop();
+ dmc.DMController.loop();
if ((getprop("/controls/pneumatic/switches/groundair") or getprop("/controls/electrical/ground-cart")) and ((getprop("/velocities/groundspeed-kt") > 2) or (getprop("/controls/gear/brake-parking") == 0 and getprop("/services/chocks/nose") == 0 and getprop("/services/chocks/left") == 0 and getprop("/services/chocks/right") == 0))) {
setprop("/controls/electrical/ground-cart", 0);
diff --git a/Nasal/Sim/property-tree-setup.nas b/Nasal/Sim/property-tree-setup.nas
index 6260b17b..99e2a9e3 100644
--- a/Nasal/Sim/property-tree-setup.nas
+++ b/Nasal/Sim/property-tree-setup.nas
@@ -30,6 +30,9 @@ var Controls = {
throttle: props.globals.getNode("/controls/engines/engine[1]/throttle"),
},
},
+ Flight: {
+ aileron: props.globals.getNode("/controls/flight/aileron"),
+ },
Gear: {
gearDown: props.globals.getNode("/controls/gear/gear-down"),
},
@@ -54,6 +57,12 @@ var Engines = {
},
};
+var FMGC = {
+ CasCompare: {
+ rejectAll: props.globals.getNode("/systems/fmgc/cas-compare/cas-reject-all"),
+ },
+};
+
var Gear = {
compression: [props.globals.getNode("/gear/gear[0]/compression-norm"),props.globals.getNode("/gear/gear[1]/compression-norm"),props.globals.getNode("/gear/gear[2]/compression-norm")],
wow: [props.globals.getNode("/gear/gear[0]/wow"),props.globals.getNode("/gear/gear[1]/wow"),props.globals.getNode("/gear/gear[2]/wow")],
@@ -63,6 +72,18 @@ var Instrumentation = {
AirspeedIndicator: {
indicatedSpdKt: props.globals.getNode("/instrumentation/airspeed-indicator/indicated-speed-kt"),
},
+ TCAS: {
+ Inputs: {
+ mode: props.globals.getNode("/instrumentation/tcas/inputs/mode"),
+ },
+ },
+};
+
+var JSBSIM = {
+ FCS: {
+ flapDeg: props.globals.getNode("/fdm/jsbsim/fcs/flap-pos-deg"),
+ slatDeg: props.globals.getNode("/fdm/jsbsim/fcs/slat-pos-deg"),
+ },
};
var JSBSim = {
@@ -98,6 +119,12 @@ var Sim = {
},
};
+var Orientation = {
+ pitch: props.globals.getNode("/orientation/pitch-deg"),
+ roll: props.globals.getNode("/orientation/roll-deg"),
+ yaw: props.globals.getNode("/orientation/yaw-deg"),
+};
+
var PTSSystems = {
Thrust: {
flex: props.globals.getNode("/systems/thrust/lim-flex"),
diff --git a/Nasal/Systems/ADIRS.nas b/Nasal/Systems/ADIRS/ADIRS.nas
similarity index 84%
rename from Nasal/Systems/ADIRS.nas
rename to Nasal/Systems/ADIRS/ADIRS.nas
index 6940f8bf..e6fcbf93 100644
--- a/Nasal/Systems/ADIRS.nas
+++ b/Nasal/Systems/ADIRS/ADIRS.nas
@@ -16,18 +16,9 @@ setprop("/controls/adirs/align-time", 600);
var ADIRS = {
init: func() {
setprop("/controls/adirs/numm", 0);
- setprop("/instrumentation/adirs/adr[0]/active", 0);
- setprop("/instrumentation/adirs/adr[1]/active", 0);
- setprop("/instrumentation/adirs/adr[2]/active", 0);
setprop("/instrumentation/adirs/ir[0]/aligned", 0);
setprop("/instrumentation/adirs/ir[1]/aligned", 0);
setprop("/instrumentation/adirs/ir[2]/aligned", 0);
- setprop("/controls/adirs/adr[0]/fault", 0);
- setprop("/controls/adirs/adr[1]/fault", 0);
- setprop("/controls/adirs/adr[2]/fault", 0);
- setprop("/controls/adirs/adr[0]/off", 0);
- setprop("/controls/adirs/adr[1]/off", 0);
- setprop("/controls/adirs/adr[2]/off", 0);
setprop("/controls/adirs/ir[0]/align", 0);
setprop("/controls/adirs/ir[1]/align", 0);
setprop("/controls/adirs/ir[2]/align", 0);
@@ -40,7 +31,6 @@ var ADIRS = {
setprop("/controls/adirs/ir[0]/fault", 0);
setprop("/controls/adirs/ir[1]/fault", 0);
setprop("/controls/adirs/ir[2]/fault", 0);
- setprop("/controls/adirs/onbat", 0);
setprop("/controls/adirs/mcdu/mode1", ""); # INVAL ALIGN NAV ATT or off (blank)
setprop("/controls/adirs/mcdu/mode2", "");
setprop("/controls/adirs/mcdu/mode3", "");
@@ -82,22 +72,6 @@ var ADIRS = {
me.stopAlign(2,1);
}
}
-
- if (ac1 >= 110 or ac2 >= 110) {
- pwr_src = "AC";
- } else if (dcbat >= 25 and (getprop("/controls/adirs/ir[0]/knob") != 0 or getprop("/controls/adirs/ir[1]/knob") != 0 or getprop("/controls/adirs/ir[2]/knob") != 0)) {
- pwr_src = "BATT";
- } else {
- pwr_src = "XX";
- }
-
- if (getprop("/controls/adirs/ir[0]/time") + 3 >= getprop("/sim/time/elapsed-sec") or getprop("/controls/adirs/ir[1]/time") + 3 >= getprop("/sim/time/elapsed-sec") or getprop("/controls/adirs/ir[2]/time") + 3 >= getprop("/sim/time/elapsed-sec")) {
- setprop("/controls/adirs/onbat", 1);
- } else if (pwr_src == "BATT") {
- setprop("/controls/adirs/onbat", 1);
- } else {
- setprop("/controls/adirs/onbat", 0);
- }
},
knob: func(k) {
knob = getprop("/controls/adirs/ir[" ~ k ~ "]/knob");
@@ -141,7 +115,6 @@ var ADIRS = {
} else if (n == 2) {
alignThree.stop();
}
- setprop("/instrumentation/adirs/adr[" ~ n ~ "]/active", 0);
setprop("/instrumentation/adirs/ir[" ~ n ~ "]/aligned", 0);
setprop("/controls/adirs/mcducbtn", 0);
},
diff --git a/Nasal/Systems/ADIRS/ADR.nas b/Nasal/Systems/ADIRS/ADR.nas
new file mode 100644
index 00000000..cb32b559
--- /dev/null
+++ b/Nasal/Systems/ADIRS/ADR.nas
@@ -0,0 +1,264 @@
+# A3XX ADIRS System
+# Jonathan Redpath (legoboyvdlp)
+
+# Copyright (c) 2019 Jonathan Redpath (legoboyvdlp)
+
+var _NUMADIRU = 3;
+
+var _selfTestTime = nil;
+
+var ADIRU = {
+ # local vars
+ _voltageMain: 0,
+ _voltageBackup: 0,
+ _voltageLimitedTime: 0,
+ _noPowerTime: 0,
+ _timeVar: 0,
+
+ num: 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(n) {
+ var adiru = { parents:[ADIRU] };
+ adiru.num = n;
+ return adiru;
+ },
+ 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;
+ },
+ selfTest: func() {
+ ADIRSnew._selfTest = 1;
+ _selfTestTime = pts.Sim.Time.elapsedSec.getValue();
+
+ ADIRSnew.Lights.adrOff[me.num].setValue(1);
+ ADIRSnew.Lights.adrFault[me.num].setValue(1);
+ settimer(func() {
+ ADIRSnew.Lights.adrOff[me.num].setValue(0);
+ ADIRSnew.Lights.adrFault[me.num].setValue(0);
+ }, 0.1);
+ settimer(func() {
+ ADIRSnew.Lights.adrOff[me.num].setValue(1);
+ ADIRSnew.Lights.adrFault[me.num].setValue(1);
+ ADIRSnew.Lights.irFault[me.num].setValue(1);
+ ADIRSnew.Lights.irOff[me.num].setValue(1);
+ }, 1.0);
+ settimer(func() {
+ ADIRSnew.Lights.adrOff[me.num].setValue(0);
+ ADIRSnew.Lights.adrFault[me.num].setValue(0);
+ ADIRSnew.Lights.irFault[me.num].setValue(0);
+ ADIRSnew.Lights.irOff[me.num].setValue(0);
+ }, 1.1);
+
+ ADIRSnew.selfTest();
+ },
+ setOperative: func(newOperative) {
+ if (newOperative != me.operative) {
+ me.operative = newOperative;
+ if (newOperative) {
+ me.selfTest();
+ }
+ }
+ },
+ 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.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 ADIRSControlPanel = {
+ adrSw: func(n) {
+ if (n < 0 or n > _NUMADIRU) { return; }
+ ADIRSnew._adrSwitchState = ADIRSnew.Switches.adrSw[n].getValue();
+ ADIRSnew.Switches.adrSw[n].setValue(!ADIRSnew._adrSwitchState);
+ if (ADIRSnew.ADIRunits[n] != nil) {
+ ADIRSnew.ADIRunits[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();
+ ADIRSnew.Switches.irSw[n].setValue(!ADIRSnew._irSwitchState);
+ if (ADIRSnew.IRunits[n] != nil) {
+ ADIRSnew.IRunits[n].outputOn = !ADIRSnew._irSwitchState;
+ }
+ ADIRSnew.Lights.irOff[n].setValue(ADIRSnew._adrSwitchState);
+ },
+ 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();
+ if (ADIRSnew.ADIRunits[n] != nil) {
+ ADIRSnew.ADIRunits[n].mode = mode;
+ ADIRSnew.ADIRunits[n].updateEnergised(mode);
+ ADIRSnew.Switches.irModeSw[n].setValue(mode);
+ }
+ }
+};
+
+var ADIRSnew = {
+ # local vars
+ _adrSwitchState: 0,
+ _irSwitchState: 0,
+ _irModeSwitchState: 0,
+ _hasPower: 0,
+ _cacheOperative: [0, 0, 0],
+ _cacheOutputOn: [0, 0, 0],
+ _flapPos: nil,
+ _slatPos: nil,
+ _selfTest: 0,
+ _init: 0,
+
+ # ADIRS Units
+ ADIRunits: [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
+ 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")],
+ irFault: [props.globals.getNode("/controls/navigation/adirscp/lights/ir-1-fault"), props.globals.getNode("/controls/navigation/adirscp/lights/ir-2-fault"), props.globals.getNode("/controls/navigation/adirscp/lights/ir-3-fault")],
+ 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"),
+ },
+ 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")],
+ },
+ 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() {
+ if (!me._init) {
+ for (i = 0; i < _NUMADIRU; i = i + 1) {
+ me.ADIRunits[i] = ADIRU.new(i);
+ me._init = 1;
+ }
+ }
+ },
+ update_items: [
+ props.UpdateManager.FromPropertyHashList(["/fdm/jsbsim/fcs/flap-pos-deg","/fdm/jsbsim/fcs/slat-pos-deg"], 0.1, func(notification)
+ {
+ me._flapPos = pts.JSBSIM.FCS.flapDeg.getValue();
+ me._slatPos = pts.JSBSIM.FCS.slatDeg.getValue();
+
+ if (me._flapPos >= 23 and me._slatPos >= 25) {
+ ADIRSnew.overspeedVFE.setValue(181);
+ } elsif (me._flapPos >= 18) {
+ ADIRSnew.overspeedVFE.setValue(189);
+ } elsif (me._flapPos >= 13 or me._slatPos > 20) {
+ ADIRSnew.overspeedVFE.setValue(204);
+ } elsif (me._slatPos <= 20 and me._flapPos > 2) {
+ ADIRSnew.overspeedVFE.setValue(219);
+ } elsif (me._slatPos >= 2 and me._slatPos <= 20) {
+ ADIRSnew.overspeedVFE.setValue(234);
+ } else {
+ ADIRSnew.overspeedVFE.setValue(1024);
+ }
+ }
+ ),
+ ],
+ loop: func() {
+ if (me._init) {
+ for (i = 0; i < _NUMADIRU; i = i + 1) {
+ # update ADR units power
+ me._hasPower = me.ADIRunits[i].updatePower(me.mainSupply[i]);
+ if (me._hasPower == 0) {
+ me.ADIRunits[i].updateBackupPower(me.backupSupply[i][0],me.backupSupply[i][1])
+ }
+
+ # Update ADR units
+ me.ADIRunits[i].update();
+
+ if (me.ADIRunits[i].operative != me._cacheOperative[i] or me.ADIRunits[i].outputOn != me._cacheOutputOn[i]) {
+ me._cacheOperative[i] = me.ADIRunits[i].operative;
+ me._cacheOutputOn[i] = me.ADIRunits[i].outputOn;
+ if (me.ADIRunits[i].outputOn) {
+ me.Operating.adr[i].setValue(me.ADIRunits[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() {
+ ADIRSnew.Lights.onBat.setBoolValue(1);
+ selfTestLoop.start();
+ },
+
+};
+
+setlistener("/systems/fmgc/cas-compare/cas-reject-all", func() {
+ if (pts.FMGC.CasCompare.rejectAll.getBoolValue()) {
+ fcu.athrOff("hard");
+ }
+}, 0, 0);
+
+selfTestLoop = maketimer(0.2, func() {
+ if (pts.Sim.Time.elapsedSec.getValue() > _selfTestTime + 5) {
+ ADIRSnew.Lights.onBat.setBoolValue(0);
+ selfTestLoop.stop();
+ ADIRSnew._selfTest = 0;
+ }
+});
\ No newline at end of file
diff --git a/Nasal/Systems/ADIRS/SwitchingPanel.nas b/Nasal/Systems/ADIRS/SwitchingPanel.nas
new file mode 100644
index 00000000..96066a20
--- /dev/null
+++ b/Nasal/Systems/ADIRS/SwitchingPanel.nas
@@ -0,0 +1,32 @@
+# 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"),
+ eisDmc: props.globals.getNode("/controls/navigation/switching/eis-dmc"),
+ },
+
+ doAirData: func(newAirData) {
+ if (newAirData < -1 or newAirData > 1) { return; }
+ me.Switches.airData.setValue(newAirData);
+ atc.transponderPanel.updateAirData();
+ if (newAirData == -1) {
+ dmc.DMController.DMCs[0].changeActiveADIRS(2);
+ dmc.DMController.DMCs[1].changeActiveADIRS(1);
+ } elsif (newAirData == 1) {
+ dmc.DMController.DMCs[0].changeActiveADIRS(0);
+ dmc.DMController.DMCs[1].changeActiveADIRS(2);
+ } elsif (newAirData == 0) {
+ dmc.DMController.DMCs[0].changeActiveADIRS(0);
+ dmc.DMController.DMCs[1].changeActiveADIRS(1);
+ }
+ },
+ doEisDMC: func(newDMC) {
+ if (newDMC < -1 or newDMC > 1) { return; }
+ me.Switches.eisDMC.setValue(newDMC);
+ },
+};
\ No newline at end of file
diff --git a/Nasal/Systems/DMC.nas b/Nasal/Systems/DMC.nas
new file mode 100644
index 00000000..64283871
--- /dev/null
+++ b/Nasal/Systems/DMC.nas
@@ -0,0 +1,85 @@
+# A3XX Display System
+# Jonathan Redpath (legoboyvdlp)
+
+# Copyright (c) 2019 Jonathan Redpath (legoboyvdlp)
+
+var DMC = {
+ _set: 0,
+ _setNil: 0,
+
+ activeADIRS: -9,
+
+ airspeeds: [props.globals.getNode("/systems/navigation/adr/output/cas-1", 1), props.globals.getNode("/systems/navigation/adr/output/cas-2", 1), props.globals.getNode("/systems/navigation/adr/output/cas-3", 1)],
+ altitudes: [props.globals.getNode("/systems/navigation/adr/output/baro-alt-corrected-1-capt", 1), props.globals.getNode("/systems/navigation/adr/output/baro-alt-corrected-2-capt", 1), props.globals.getNode("/systems/navigation/adr/output/baro-alt-corrected-3-capt", 1)],
+ machs: [props.globals.getNode("/systems/navigation/adr/output/mach-1", 1), props.globals.getNode("/systems/navigation/adr/output/mach-2", 1), props.globals.getNode("/systems/navigation/adr/output/mach-3", 1)],
+ altitudesPfd: [props.globals.getNode("/instrumentation/altimeter[0]/indicated-altitude-ft-pfd", 1), props.globals.getNode("/instrumentation/altimeter[1]/indicated-altitude-ft-pfd", 1), props.globals.getNode("/instrumentation/altimeter[2]/indicated-altitude-ft-pfd", 1)],
+ sats: [props.globals.getNode("/systems/navigation/adr/output/sat-1", 1), props.globals.getNode("/systems/navigation/adr/output/sat-2", 1), props.globals.getNode("/systems/navigation/adr/output/sat-3", 1)],
+ tats: [props.globals.getNode("/systems/navigation/adr/output/tat-1", 1), props.globals.getNode("/systems/navigation/adr/output/tat-2", 1), props.globals.getNode("/systems/navigation/adr/output/tat-3", 1)],
+ outputs: [nil, nil, nil, nil, nil, nil], # airspeed, altitude, mach, pfd altitude, sat, tat
+
+ new: func(num) {
+ var d = { parents:[DMC] };
+ d.activeADIRS = num;
+ d.outputs = [nil, nil, nil, nil, nil, nil];
+ return d;
+ },
+ changeActiveADIRS: func(newADIRS) {
+ me.activeADIRS = newADIRS;
+ me._set = 0;
+ },
+ setOutputs: func(ADIRS) {
+ me.outputs[0] = me.airspeeds[ADIRS];
+ me.outputs[1] = me.altitudes[ADIRS];
+ me.outputs[2] = me.machs[ADIRS];
+ me.outputs[3] = me.altitudesPfd[ADIRS];
+ me.outputs[4] = me.sats[ADIRS];
+ me.outputs[5] = me.tats[ADIRS];
+ },
+ setOutputsNil: func() {
+ me.outputs[0] = nil;
+ me.outputs[1] = nil;
+ me.outputs[2] = nil;
+ me.outputs[3] = nil;
+ me.outputs[4] = nil;
+ me.outputs[5] = nil;
+ },
+ update: func() {
+ if (systems.ADIRSnew.ADIRunits[me.activeADIRS].operative and systems.ADIRSnew.ADIRunits[me.activeADIRS].outputOn) {
+ if (me._set != 1) {
+ me._setNil = 0;
+ me.setOutputs(me.activeADIRS);
+ me._setADIRS = me.activeADIRS;
+ me._set = 1;
+ }
+ } else {
+ if (me._setNil != 1) {
+ me._set = 0;
+ me.setOutputsNil();
+ me._setNil = 1;
+ }
+ }
+ },
+};
+
+var DMController = {
+ _init: 0,
+ i: nil, # to make sure scope remains local use me.i
+ DMCs: [nil, nil, nil],
+
+ init: func() {
+ if (!me._init) {
+ me.DMCs = [DMC.new(0), DMC.new(1), DMC.new(2)];
+
+ # update DMC2 to correct properties for first officer PFD
+ me.DMCs[1].altitudes = [props.globals.getNode("/systems/navigation/adr/output/baro-alt-corrected-1-fo", 1), props.globals.getNode("/systems/navigation/adr/output/baro-alt-corrected-2-fo", 1), props.globals.getNode("/systems/navigation/adr/output/baro-alt-corrected-3-fo", 1)];
+ me.DMCs[1].altitudesPfd = [props.globals.getNode("/instrumentation/altimeter[3]/indicated-altitude-ft-pfd", 1), props.globals.getNode("/instrumentation/altimeter[4]/indicated-altitude-ft-pfd", 1), props.globals.getNode("/instrumentation/altimeter[5]/indicated-altitude-ft-pfd", 1)];
+
+ me._init = 1;
+ }
+ },
+ loop: func() {
+ for (me.i = 0; me.i < 3; me.i = me.i + 1) {
+ me.DMCs[me.i].update();
+ }
+ },
+};
\ No newline at end of file
diff --git a/Nasal/Systems/electrical.nas b/Nasal/Systems/electrical.nas
index 4aeb3067..e905f7b7 100644
--- a/Nasal/Systems/electrical.nas
+++ b/Nasal/Systems/electrical.nas
@@ -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"),
diff --git a/Sounds/A320-common-sound.xml b/Sounds/A320-common-sound.xml
index c31ba0a2..53846b25 100644
--- a/Sounds/A320-common-sound.xml
+++ b/Sounds/A320-common-sound.xml
@@ -1581,14 +1581,32 @@
100
+
+ Cricket
+ Aircraft/A320-family/Sounds/Cockpit/cricket.wav
+ looped
+ avionics
+
+ /sim/sound/warnings/cricket
+
+
+ 0.2
+
+ 10
+ 100
+
+
stall-voice
looped
Aircraft/A320-family/Sounds/Cockpit/stall_voice.wav
avionics
- warnings/stall/active
+ /sim/sound/warnings/stall-voice
+
+ 2.0
+
10
100.0
diff --git a/Sounds/Cockpit/cricket.wav b/Sounds/Cockpit/cricket.wav
index 0e23005a..54ba04ea 100644
Binary files a/Sounds/Cockpit/cricket.wav and b/Sounds/Cockpit/cricket.wav differ
diff --git a/Sounds/Cockpit/stall_voice.wav b/Sounds/Cockpit/stall_voice.wav
index ff066513..8d7ae005 100644
Binary files a/Sounds/Cockpit/stall_voice.wav and b/Sounds/Cockpit/stall_voice.wav differ
diff --git a/Systems/a320-adr.xml b/Systems/a320-adr.xml
new file mode 100644
index 00000000..5676bfbd
--- /dev/null
+++ b/Systems/a320-adr.xml
@@ -0,0 +1,1015 @@
+
+
+
+
+
+
+
+
+
+
+
+ aero/alpha-deg
+
+ /velocities/groundspeed-mps
+
+ 0 0.0
+ 2 0.0
+ 3 1.0
+
+
+
+
+
+
+
+ aero/alpha-deg-corrected
+
+ 12
+ -180
+ 180
+
+
+
+
+ aero/alpha-deg-corrected
+
+ 12
+ -180
+ 180
+
+
+
+
+ aero/alpha-deg-corrected
+
+ 12
+ -180
+ 180
+
+
+
+
+ /systems/pitot[0]/measured-total-pressure-inhg
+
+
+
+ /systems/pitot[1]/measured-total-pressure-inhg
+
+
+
+ /systems/pitot[2]/measured-total-pressure-inhg
+
+
+
+ /systems/static[0]/pressure-inhg
+
+
+
+ /systems/static[1]/pressure-inhg
+
+
+
+ /systems/static[2]/pressure-inhg
+
+
+
+
+
+
+
+ /environment/temperature-degc
+ 273.15
+
+
+ 1
+
+ 0.2
+ 0.995
+
+ velocities/mach
+ 2
+
+
+
+
+ 273.15
+
+
+
+
+
+
+
+
+
+ /environment/temperature-degc
+ 273.15
+
+
+ 1
+
+ 0.2
+ 0.996
+
+ velocities/mach
+ 2
+
+
+
+
+ 273.15
+
+
+
+
+
+ /systems/navigation/probes/tat-1/compute-tat
+
+ 11
+ -256
+ 256
+
+
+
+
+ /systems/navigation/probes/tat-2/compute-tat
+
+ 11
+ -256
+ 256
+
+
+
+
+
+
+
+
+ /instrumentation/altimeter[0]/pressure-alt-ft
+
+ 17
+ -65536
+ 65536
+
+
+
+
+ /instrumentation/altimeter[1]/pressure-alt-ft
+
+ 17
+ -65536
+ 65536
+
+
+
+
+ /instrumentation/altimeter[2]/pressure-alt-ft
+
+ 17
+ -65536
+ 65536
+
+
+
+
+ /instrumentation/altimeter[3]/pressure-alt-ft
+
+ 17
+ -65536
+ 65536
+
+
+
+
+ /instrumentation/altimeter[4]/pressure-alt-ft
+
+ 17
+ -65536
+ 65536
+
+
+
+
+ /instrumentation/altimeter[5]/pressure-alt-ft
+
+ 17
+ -65536
+ 65536
+
+
+
+
+ /instrumentation/altimeter[0]/indicated-altitude-ft
+
+ 17
+ -65536
+ 65536
+
+
+
+
+ /instrumentation/altimeter[1]/indicated-altitude-ft
+
+ 17
+ -65536
+ 65536
+
+
+
+
+ /instrumentation/altimeter[2]/indicated-altitude-ft
+
+ 17
+ -65536
+ 65536
+
+
+
+
+ /instrumentation/altimeter[3]/indicated-altitude-ft
+
+ 17
+ -65536
+ 65536
+
+
+
+
+ /instrumentation/altimeter[4]/indicated-altitude-ft
+
+ 17
+ -65536
+ 65536
+
+
+
+
+ /instrumentation/altimeter[5]/indicated-altitude-ft
+
+ 17
+ -65536
+ 65536
+
+
+
+
+
+
+ 5
+
+
+
+
+
+ /systems/navigation/probes/pitot-1
+ /systems/navigation/probes/static-1
+
+ 29.9212553
+
+ 1
+
+
+ 2
+ 7
+
+
+ 1
+
+
+
+
+ 0
+ 9999999999999999
+
+
+
+
+
+
+ 661.47
+
+ /systems/navigation/adr/computation/cas-1-product
+ 0.5
+
+
+
+
+
+
+
+
+ 5
+
+
+
+
+
+ /systems/navigation/probes/pitot-2
+ /systems/navigation/probes/static-2
+
+ 29.9212553
+
+ 1
+
+
+ 2
+ 7
+
+
+ 1
+
+
+
+
+ 0
+ 9999999999999999
+
+
+
+
+
+
+ 661.47
+
+ /systems/navigation/adr/computation/cas-2-product
+ 0.5
+
+
+
+
+
+
+
+
+ 5
+
+
+
+
+
+ /systems/navigation/probes/pitot-3
+ /systems/navigation/probes/static-3
+
+ 29.9212553
+
+ 1
+
+
+ 2
+ 7
+
+
+ 1
+
+
+
+
+ 0
+ 9999999999999999
+
+
+
+
+
+
+ 661.47
+
+ /systems/navigation/adr/computation/cas-3-product
+ 0.5
+
+
+
+
+
+
+ /systems/navigation/adr/computation/cas-1-compute
+
+ 14
+ 0
+ 1024
+
+
+
+
+ /systems/navigation/adr/computation/cas-2-compute
+
+ 14
+ 0
+ 1024
+
+
+
+
+ /systems/navigation/adr/computation/cas-3-compute
+
+ 14
+ 0
+ 1024
+
+
+
+
+
+
+ 5
+
+
+
+
+
+ /systems/navigation/probes/pitot-1
+ /systems/navigation/probes/static-1
+
+ /systems/navigation/probes/static-1
+
+ 1
+
+
+ 2
+ 7
+
+
+ 1
+
+
+
+
+ 0
+ 999999999999
+
+
+
+
+
+
+ /systems/navigation/adr/computation/mach-1-product
+ 0.5
+
+
+
+
+
+
+
+ 5
+
+
+
+
+
+ /systems/navigation/probes/pitot-2
+ /systems/navigation/probes/static-2
+
+ /systems/navigation/probes/static-2
+
+ 1
+
+
+ 2
+ 7
+
+
+ 1
+
+
+
+
+ 0
+ 999999999999
+
+
+
+
+
+
+ /systems/navigation/adr/computation/mach-2-product
+ 0.5
+
+
+
+
+
+
+
+ 5
+
+
+
+
+
+ /systems/navigation/probes/pitot-3
+ /systems/navigation/probes/static-3
+
+ /systems/navigation/probes/static-3
+
+ 1
+
+
+ 2
+ 7
+
+
+ 1
+
+
+
+
+ 0
+ 999999999999
+
+
+
+
+
+
+ /systems/navigation/adr/computation/mach-3-product
+ 0.5
+
+
+
+
+
+ /systems/navigation/adr/computation/mach-1-compute
+
+ 16
+ 0
+ 4.096
+
+
+
+
+ /systems/navigation/adr/computation/mach-2-compute
+
+ 16
+ 0
+ 4.096
+
+
+
+
+ /systems/navigation/adr/computation/mach-3-compute
+
+ 16
+ 0
+ 4.096
+
+
+
+
+
+
+ /systems/navigation/probes/tat-1/tat
+
+
+ /velocities/TAS
+ 2
+
+ 7569
+
+
+
+
+
+
+ /environment/temperature-degc
+
+ 11
+ -256
+ 256
+
+
+
+
+ /environment/temperature-degc
+
+ 11
+ -256
+ 256
+
+
+
+
+
+
+ 661.47
+ /systems/navigation/adr/computation/mach-1
+
+
+
+ /systems/navigation/adr/computation/sat-1
+ 273.15
+
+ 288.15
+
+ 0.5
+
+
+
+
+
+
+
+
+ 661.47
+ /systems/navigation/adr/computation/mach-2
+
+
+
+ /systems/navigation/adr/computation/sat-2
+ 273.15
+
+ 288.15
+
+ 0.5
+
+
+
+
+
+
+
+
+ 661.47
+ /systems/navigation/adr/computation/mach-3
+
+
+
+ /systems/navigation/adr/computation/sat-1
+ 273.15
+
+ 288.15
+
+ 0.5
+
+
+
+
+
+
+ /systems/navigation/adr/computation/tas-1-compute
+
+ 15
+ 0
+ 2048
+
+
+
+
+ /systems/navigation/adr/computation/tas-2-compute
+
+ 15
+ 0
+ 2048
+
+
+
+
+ /systems/navigation/adr/computation/tas-3-compute
+
+ 15
+ 0
+ 2048
+
+
+
+
+
+
+
+
+ /systems/navigation/adr/output/cas-1
+ /systems/navigation/adr/output/cas-2
+ /systems/navigation/adr/output/cas-3
+
+ 354
+
+ 1
+ 0
+
+
+
+
+
+
+
+
+
+ /systems/navigation/adr/output/mach-1
+ /systems/navigation/adr/output/mach-2
+ /systems/navigation/adr/output/mach-3
+
+ 0.826
+
+ 1
+ 0
+
+
+
+
+
+
+
+ /systems/navigation/adr/computation/overspeed-vle-speed eq 1
+
+ /ECAM/Lower/door-left ne 0
+ /ECAM/Lower/door-right ne 0
+ /ECAM/Lower/door-nose-left ne 0
+ /ECAM/Lower/door-nose-right ne 0
+ /gear/gear[0]/position-norm ne 0
+ /gear/gear[1]/position-norm ne 0
+ /gear/gear[2]/position-norm ne 0
+
+
+
+
+
+
+
+
+
+ /systems/navigation/adr/output/cas-1
+ /systems/navigation/adr/output/cas-2
+ /systems/navigation/adr/output/cas-3
+
+ 284
+
+ 1
+ 0
+
+
+
+
+
+
+
+
+
+ /systems/navigation/adr/output/cas-1
+ /systems/navigation/adr/output/cas-2
+ /systems/navigation/adr/output/cas-3
+
+ /systems/navigation/adr/computation/overspeed-vfe-spd
+
+ 1
+ 0
+
+
+
+
+
+
+
+ /systems/navigation/adr/computation/overspeed-vmo
+ /systems/navigation/adr/computation/overspeed-mmo
+ /systems/navigation/adr/computation/overspeed-vle
+ /systems/navigation/adr/computation/overspeed-vfe
+
+
+
+
+
+
+
+
+
+ /systems/navigation/probes/aoa-1
+ /systems/navigation/adr/operating-1
+
+
+
+ /systems/navigation/probes/aoa-2
+ /systems/navigation/adr/operating-2
+
+
+
+ /systems/navigation/probes/aoa-3
+ /systems/navigation/adr/operating-3
+
+
+
+ /systems/navigation/adr/computation/baro-alt-1-capt
+ /systems/navigation/adr/operating-1
+
+
+
+ /systems/navigation/adr/computation/baro-alt-2-capt
+ /systems/navigation/adr/operating-2
+
+
+
+ /systems/navigation/adr/computation/baro-alt-3-capt
+ /systems/navigation/adr/operating-3
+
+
+
+ /systems/navigation/adr/computation/baro-alt-1-fo
+ /systems/navigation/adr/operating-1
+
+
+
+ /systems/navigation/adr/computation/baro-alt-2-fo
+ /systems/navigation/adr/operating-2
+
+
+
+ /systems/navigation/adr/computation/baro-alt-3-fo
+ /systems/navigation/adr/operating-3
+
+
+
+ /systems/navigation/adr/computation/baro-alt-corrected-1-capt
+ /systems/navigation/adr/operating-1
+
+
+
+ /systems/navigation/adr/computation/baro-alt-corrected-2-capt
+ /systems/navigation/adr/operating-2
+
+
+
+ /systems/navigation/adr/computation/baro-alt-corrected-3-capt
+ /systems/navigation/adr/operating-3
+
+
+
+ /systems/navigation/adr/computation/baro-alt-corrected-1-fo
+ /systems/navigation/adr/operating-1
+
+
+
+ /systems/navigation/adr/computation/baro-alt-corrected-2-fo
+ /systems/navigation/adr/operating-2
+
+
+
+ /systems/navigation/adr/computation/baro-alt-corrected-3-fo
+ /systems/navigation/adr/operating-3
+
+
+
+ /systems/navigation/adr/computation/cas-1
+ /systems/navigation/adr/operating-1
+
+
+
+ /systems/navigation/adr/computation/cas-2
+ /systems/navigation/adr/operating-2
+
+
+
+ /systems/navigation/adr/computation/cas-3
+ /systems/navigation/adr/operating-3
+
+
+
+ /systems/navigation/adr/computation/mach-1
+ /systems/navigation/adr/operating-1
+
+
+
+ /systems/navigation/adr/computation/mach-2
+ /systems/navigation/adr/operating-2
+
+
+
+ /systems/navigation/adr/computation/mach-3
+ /systems/navigation/adr/operating-3
+
+
+
+ /systems/navigation/adr/computation/sat-1
+ /systems/navigation/adr/operating-1
+
+
+
+ /systems/navigation/adr/computation/sat-2
+ /systems/navigation/adr/operating-2
+
+
+
+ /systems/navigation/adr/computation/sat-1
+ /systems/navigation/adr/operating-3
+
+
+
+ /systems/navigation/adr/computation/tas-1
+ /systems/navigation/adr/operating-1
+
+
+
+ /systems/navigation/adr/computation/tas-2
+ /systems/navigation/adr/operating-2
+
+
+
+ /systems/navigation/adr/computation/tas-3
+ /systems/navigation/adr/operating-3
+
+
+
+ /systems/navigation/probes/tat-1/tat
+ /systems/navigation/adr/operating-1
+
+
+
+ /systems/navigation/probes/tat-2/tat
+ /systems/navigation/adr/operating-2
+
+
+
+ /systems/navigation/probes/tat-1/tat
+ /systems/navigation/adr/operating-3
+
+
+
+
+
+ /systems/navigation/adr/operating-1
+ /systems/navigation/adr/operating-2
+ /systems/navigation/adr/operating-3
+
+
+
+
+
+ /systems/navigation/adr/computation/overspeed
+ /systems/navigation/adr/any-adr-on
+
+
+
+ /instrumentation/radar-altimeter[0]/radar-altitude-ft
+ 1
+
+ 0
+ 5000
+
+
+
+
+ /instrumentation/radar-altimeter[1]/radar-altitude-ft
+ 1
+
+ 0
+ 5000
+
+
+
+
+
+ /instrumentation/transponder/altimeter-input-src eq 1
+
+
+ /instrumentation/transponder/altimeter-input-src eq 2
+
+
+ /instrumentation/transponder/altimeter-input-src eq 3
+
+
+
+
+
+ /instrumentation/transponder/airspeed-input-src eq 1
+
+
+ /instrumentation/transponder/airspeed-input-src eq 2
+
+
+ /instrumentation/transponder/airspeed-input-src eq 3
+
+
+
+
+
+ /FMGC/active-fmgc-channel eq 1
+ /systems/fmgc/cas-compare/cas-reject-1 eq 0
+
+
+ /FMGC/active-fmgc-channel eq 2
+ /systems/fmgc/cas-compare/cas-reject-2 eq 0
+
+
+ /systems/fmgc/cas-compare/cas-reject-1 eq 1
+ /systems/fmgc/cas-compare/cas-reject-2 eq 1
+ /systems/fmgc/cas-compare/cas-reject-3 eq 0
+
+
+
+
+
+ /FMGC/active-fmgc-channel eq 1
+ /systems/fmgc/cas-compare/cas-reject-1 eq 0
+
+
+ /FMGC/active-fmgc-channel eq 2
+ /systems/fmgc/cas-compare/cas-reject-2 eq 0
+
+
+ /systems/fmgc/cas-compare/cas-reject-1 eq 1
+ /systems/fmgc/cas-compare/cas-reject-2 eq 1
+ /systems/fmgc/cas-compare/cas-reject-3 eq 0
+
+
+
+
+
diff --git a/Systems/a320-electrical.xml b/Systems/a320-electrical.xml
index 1e28b9c8..5f3b8d4f 100644
--- a/Systems/a320-electrical.xml
+++ b/Systems/a320-electrical.xml
@@ -1348,8 +1348,8 @@
/systems/electrical/bus/dc-2 ge 25
-
-
+
@@ -1357,10 +1357,10 @@
-
+
@@ -1368,9 +1368,7 @@
-
-
diff --git a/Systems/a320-fmgc.xml b/Systems/a320-fmgc.xml
new file mode 100644
index 00000000..93919e38
--- /dev/null
+++ b/Systems/a320-fmgc.xml
@@ -0,0 +1,161 @@
+
+
+
+
+
+
+
+
+
+
+
+
+ /systems/navigation/adr/output/cas-1
+ /systems/navigation/adr/output/cas-3
+
+
+
+
+
+
+
+
+
+ /systems/navigation/adr/output/cas-2
+ /systems/navigation/adr/output/cas-3
+
+
+
+
+
+
+
+
+
+ /systems/navigation/adr/output/cas-2
+ /systems/navigation/adr/output/cas-1
+
+
+
+
+
+
+
+
+
+
+ /systems/fmgc/cas-compare/cas-1-to-3
+ 5
+
+
+ /systems/fmgc/cas-compare/cas-2-to-1
+ 5
+
+
+ /systems/fmgc/cas-compare/cas-2-to-3
+ 5
+
+
+ 1
+ 0
+
+
+
+
+
+
+
+
+
+ /systems/fmgc/cas-compare/cas-1-to-3
+ 5
+
+
+ /systems/fmgc/cas-compare/cas-2-to-1
+ 5
+
+
+ /systems/fmgc/cas-compare/cas-2-to-3
+ 5
+
+
+ 1
+ 0
+
+
+
+
+
+
+
+
+
+ /systems/fmgc/cas-compare/cas-2-to-3
+ 5
+
+
+ /systems/fmgc/cas-compare/cas-2-to-1
+ 5
+
+
+ /systems/fmgc/cas-compare/cas-1-to-3
+ 5
+
+
+ 1
+ 0
+
+
+
+
+
+
+
+
+
+ /systems/fmgc/cas-compare/cas-1-to-3
+ 5
+
+
+ /systems/fmgc/cas-compare/cas-2-to-3
+ 5
+
+
+ /systems/fmgc/cas-compare/cas-2-to-1
+ 5
+
+
+ 1
+ 0
+
+
+
+
+
+
+
+
+ /systems/fmgc/cas-compare/cas-reject-1
+ 1
+
+ 3
+ 1
+
+
+
+
+
+
+
+
+ /systems/fmgc/cas-compare/cas-reject-2
+ 1
+
+ 3
+ 2
+
+
+
+
+
+
diff --git a/Systems/fmgc-thrust.xml b/Systems/fmgc-thrust.xml
index 36d7db36..11744f74 100644
--- a/Systems/fmgc-thrust.xml
+++ b/Systems/fmgc-thrust.xml
@@ -216,7 +216,7 @@
- /instrumentation/airspeed-indicator/indicated-speed-kt
+ /it-autoflight/internal/current-speed-input
/it-autoflight/internal/kts
@@ -340,7 +340,7 @@
- /instrumentation/airspeed-indicator/indicated-mach
+ /it-autoflight/internal/current-mach-input
1000.0
diff --git a/Systems/instrumentation.xml b/Systems/instrumentation.xml
index 4ec00124..3439f4cb 100644
--- a/Systems/instrumentation.xml
+++ b/Systems/instrumentation.xml
@@ -9,30 +9,91 @@
adf
0
+ /systems/electrical/bus/ac-ess-shed
+ 109.9
adf
1
+ /systems/electrical/bus/ac-2
+ 109.9
- airspeed-indicator
+ airspeed-indicator
0
- /systems/pitot/total-pressure-inhg
- /systems/static/pressure-inhg
+ /systems/pitot[2]/measured-total-pressure-inhg
+ /systems/static[2]/pressure-inhg
altimeter
0
- /systems/static/pressure-inhg
- 0
- 0
+ /systems/static[0]/pressure-inhg
+ 1
+ 0.1
1
1
+
+ altimeter
+ 1
+ /systems/static[1]/pressure-inhg
+ 1
+ 0.1
+ 1
+ 1
+
+
+
+ altimeter
+ 2
+ /systems/static[2]/pressure-inhg
+ 1
+ 0.1
+ 1
+ 1
+
+
+
+ altimeter
+ 3
+ /systems/static[0]/pressure-inhg
+ 1
+ 0.1
+ 1
+ 1
+
+
+
+ altimeter
+ 4
+ /systems/static[1]/pressure-inhg
+ 1
+ 0.1
+ 1
+ 1
+
+
+
+ altimeter
+ 5
+ /systems/static[2]/pressure-inhg
+ 1
+ 0.1
+ 1
+ 1
+
+
+
+ altimeter
+ 6
+ /systems/static[2]/pressure-inhg
+ 0.1
+
+
attitude-indicator
0
@@ -65,21 +126,29 @@
dme
0
+ /systems/electrical/bus/ac-ess-shed
+ 109.9
dme
1
+ /systems/electrical/bus/ac-2
+ 109.9
-
+
dme
2
+ /systems/electrical/bus/ac-ess-shed
+ 109.9
dme
3
+ /systems/electrical/bus/ac-2
+ 109.9
@@ -111,24 +180,39 @@
0
-
+
+ marker-beacon
+ 0
+ /systems/electrical/bus/ac-ess-shed
+ 109.9
+
+
+
nav
0
+ /systems/electrical/bus/ac-ess-shed
+ 109.9
nav
1
+ /systems/electrical/bus/ac-2
+ 109.9
-
+
nav
2
+ /systems/electrical/bus/ac-ess-shed
+ 109.9
nav
3
+ /systems/electrical/bus/ac-2
+ 109.9
@@ -140,6 +224,8 @@
transponder
0
2
+ /instrumentation/transponder/altimeter-input
+ /instrumentation/transponder/airspeed-input
/instrumentation/encoder/mode-c-alt-ft
/instrumentation/encoder/mode-s-alt-ft
@@ -175,6 +261,22 @@
0
+
+ radar-altimeter
+ 0
+ 0.0666
+ /systems/electrical/bus/ac-1
+ 109.9
+
+
+
+ radar-altimeter
+ 1
+ 0.0666
+ /systems/electrical/bus/ac-2
+ 109.9
+
+
tacan
0
diff --git a/Systems/libraries.xml b/Systems/libraries.xml
index 0093a7e6..06bb51a4 100644
--- a/Systems/libraries.xml
+++ b/Systems/libraries.xml
@@ -121,13 +121,121 @@
-
/instrumentation/altimeter/indicated-altitude-ft
+
/instrumentation/altimeter[0]/indicated-altitude-ft
100
-
+
+
+
+
+ Altitude PFD
+ gain
+ 1.0
+ 0.05
+
+
+
+
+
/instrumentation/altimeter[1]/indicated-altitude-ft
+
100
+
+
+
+
+
+
+
+
+ Altitude PFD
+ gain
+ 1.0
+ 0.05
+
+
+
+
+
/instrumentation/altimeter[2]/indicated-altitude-ft
+
100
+
+
+
+
+
+
+
+
+ Altitude PFD
+ gain
+ 1.0
+ 0.05
+
+
+
+
+
/instrumentation/altimeter[3]/indicated-altitude-ft
+
100
+
+
+
+
+
+
+
+
+ Altitude PFD
+ gain
+ 1.0
+ 0.05
+
+
+
+
+
/instrumentation/altimeter[4]/indicated-altitude-ft
+
100
+
+
+
+
+
+
+
+
+ Altitude PFD
+ gain
+ 1.0
+ 0.05
+
+
+
+
+
/instrumentation/altimeter[5]/indicated-altitude-ft
+
100
+
+
+
+
+
+
+
+
+ Altitude PFD
+ gain
+ 1.0
+ 0.05
+
+
+
+
+
/instrumentation/altimeter[6]/indicated-altitude-ft
+
100
+
+
+
+
+
diff --git a/Systems/pfd.xml b/Systems/pfd.xml
index 46ac7798..05ccae2c 100644
--- a/Systems/pfd.xml
+++ b/Systems/pfd.xml
@@ -174,12 +174,46 @@
- /instrumentation/airspeed-indicator/indicated-speed-kt
+ /systems/navigation/adr/output/cas-1
30
-
+
+ 0
+ 390
+
+
+
+ Speed Predictor Input
+ gain
+ 1.0
+
+
+
+ /systems/navigation/adr/output/cas-2
+ 30
+
+
+
+
+ 0
+ 390
+
+
+
+ Speed Predictor Input
+ gain
+ 1.0
+
+
+
+ /systems/navigation/adr/output/cas-3
+ 30
+
+
+
+
0
390
@@ -193,12 +227,57 @@
0.01
+
+ Speed Predictor (Smoothed)
+ false
+ /instrumentation/pfd/speed-minus-30-1
+
+ 10.0
+ 0.01
+
+
+
+ Speed Predictor (Smoothed)
+ false
+ /instrumentation/pfd/speed-minus-30-2
+
+ 10.0
+ 0.01
+
+
+
+ Speed Predictor (Smoothed)
+ false
+ /instrumentation/pfd/speed-minus-30-3
+
+ 10.0
+ 0.01
+
+
Speed Predictor Exponential
false
exponential
- /instrumentation/pfd/speed-lookahead-cmd
-
+ /instrumentation/pfd/speed-lookahead-cmd-1
+
+ 0.32
+
+
+
+ Speed Predictor Exponential
+ false
+ exponential
+ /instrumentation/pfd/speed-lookahead-cmd-2
+
+ 0.32
+
+
+
+ Speed Predictor Exponential
+ false
+ exponential
+ /instrumentation/pfd/speed-lookahead-cmd-3
+
0.32
diff --git a/Systems/pitot-static.xml b/Systems/pitot-static.xml
new file mode 100644
index 00000000..8ef146ee
--- /dev/null
+++ b/Systems/pitot-static.xml
@@ -0,0 +1,57 @@
+
+
+
+
+ pitot
+ 0
+
+
+
+ pitot
+ 1
+
+
+
+ pitot
+ 2
+
+
+
+ static
+ 0
+ 0.7
+ 1
+ 0.43
+
+
+
+ static
+ 1
+ 0.7
+ 1
+ 0.42
+
+
+
+ static
+ 2
+ 0.7
+ 1
+ 0.45
+
+
+
+ vacuum
+ 0
+ /engines/engine[0]/rpm
+ 1.0
+
+
+
+ vacuum
+ 1
+ /engines/engine[1]/rpm
+ 1.0
+
+
+