diff --git a/A320-main.xml b/A320-main.xml index 251466a3..15bddf10 100644 --- a/A320-main.xml +++ b/A320-main.xml @@ -176,6 +176,7 @@ + diff --git a/Models/Instruments/ECAM/page-elec.xml b/Models/Instruments/ECAM/page-elec.xml index 3aee141a..9085bd50 100644 --- a/Models/Instruments/ECAM/page-elec.xml +++ b/Models/Instruments/ECAM/page-elec.xml @@ -712,7 +712,6 @@ - text TR1-volts @@ -830,6 +829,56 @@ + + gen1off + true + 2 + 10 + + Aircraft/A320Family/Models/Instruments/ECAM/res/elec-gen-green-line.png + + + + y-shift + -16 + + + x-shift + -100 + + + + + /controls/electrical/switches/gen1 + 1 + + + + + gen2off + true + 2 + 10 + + Aircraft/A320Family/Models/Instruments/ECAM/res/elec-gen-green-line.png + + + + y-shift + -16 + + + x-shift + 101 + + + + + /controls/electrical/switches/gen2 + 1 + + + diff --git a/Models/Instruments/ECAM/res/elec-gen-green-line.png b/Models/Instruments/ECAM/res/elec-gen-green-line.png new file mode 100644 index 00000000..72b755ef Binary files /dev/null and b/Models/Instruments/ECAM/res/elec-gen-green-line.png differ diff --git a/Models/Instruments/ECAM/res/page-elec.png b/Models/Instruments/ECAM/res/page-elec.png index 2da68802..c74e1892 100644 Binary files a/Models/Instruments/ECAM/res/page-elec.png and b/Models/Instruments/ECAM/res/page-elec.png differ diff --git a/Models/Wings/a320.wings.iae.xml b/Models/Wings/a320.wings.iae.xml index aaee4b7f..abf753bf 100644 --- a/Models/Wings/a320.wings.iae.xml +++ b/Models/Wings/a320.wings.iae.xml @@ -479,5 +479,344 @@ 0.949 - + + SlatsL + translate + SlatR1 + /sim/multiplay/generic/float[11] + + 0.0 0 + 0.6660.18 + 0.8140.22 + 1.00.27 + + + -1 + 0 + 0 + + + + SlatsL + translate + SlatR1 + /sim/multiplay/generic/float[11] + + 0.0 0 + 0.6660.03 + 0.8140.05 + 1.00.1 + + + 0 + 0 + -1 + + + + SlatsL1 + translate + SlatR2 + /sim/multiplay/generic/float[11] + + 0.0 0 + 0.6660.18 + 0.8140.22 + 1.00.27 + + + -1 + 0 + 0 + + + + SlatsL1 + translate + SlatR2 + /sim/multiplay/generic/float[11] + + 0.0 0 + 0.6660.03 + 0.8140.05 + 1.00.1 + + + 0 + 0 + -1 + + + + SlatsL2 + translate + SlatR3 + /sim/multiplay/generic/float[11] + + 0.0 0 + 0.6660.18 + 0.8140.22 + 1.00.27 + + + -1 + 0 + 0 + + + + SlatsL2 + translate + SlatR3 + /sim/multiplay/generic/float[11] + + 0.0 0 + 0.6660.03 + 0.8140.05 + 1.00.1 + + + 0 + 0 + -1 + + + + SlatsL3 + translate + SlatR4 + /sim/multiplay/generic/float[11] + + 0.0 0 + 0.6660.18 + 0.8140.22 + 1.00.27 + + + -1 + 0 + 0 + + + + SlatsL3 + translate + SlatR4 + /sim/multiplay/generic/float[11] + + 0.0 0 + 0.6660.03 + 0.8140.05 + 1.00.1 + + + 0 + 0 + -1 + + + + SlatsL4 + translate + SlatR5 + /sim/multiplay/generic/float[11] + + 0.0 0 + 0.6660.18 + 0.8140.22 + 1.00.27 + + + -1 + 0 + 0 + + + + SlatsL4 + translate + SlatR5 + /sim/multiplay/generic/float[11] + + 0.0 0 + 0.6660.03 + 0.8140.05 + 1.00.1 + + + 0 + 0 + -1 + + + + SlatsL + translate + SlatL1 + /sim/multiplay/generic/float[11] + + 0.0 0 + 0.6660.18 + 0.8140.22 + 1.00.27 + + + -1 + 0 + 0 + + + + SlatsL + translate + SlatL1 + /sim/multiplay/generic/float[11] + + 0.0 0 + 0.6660.03 + 0.8140.05 + 1.00.1 + + + 0 + 0 + -1 + + + + SlatsL1 + translate + SlatL2 + /sim/multiplay/generic/float[11] + + 0.0 0 + 0.6660.18 + 0.8140.22 + 1.00.27 + + + -1 + 0 + 0 + + + + SlatsL1 + translate + SlatL2 + /sim/multiplay/generic/float[11] + + 0.0 0 + 0.6660.03 + 0.8140.05 + 1.00.1 + + + 0 + 0 + -1 + + + + SlatsL2 + translate + SlatL3 + /sim/multiplay/generic/float[11] + + 0.0 0 + 0.6660.18 + 0.8140.22 + 1.00.27 + + + -1 + 0 + 0 + + + + SlatsL2 + translate + SlatL3 + /sim/multiplay/generic/float[11] + + 0.0 0 + 0.6660.03 + 0.8140.05 + 1.00.1 + + + 0 + 0 + -1 + + + + SlatsL3 + translate + SlatL4 + /sim/multiplay/generic/float[11] + + 0.0 0 + 0.6660.18 + 0.8140.22 + 1.00.27 + + + -1 + 0 + 0 + + + + SlatsL3 + translate + SlatL4 + /sim/multiplay/generic/float[11] + + 0.0 0 + 0.6660.03 + 0.8140.05 + 1.00.1 + + + 0 + 0 + -1 + + + + SlatsL4 + translate + SlatL5 + /sim/multiplay/generic/float[11] + + 0.0 0 + 0.6660.18 + 0.8140.22 + 1.00.27 + + + -1 + 0 + 0 + + + + SlatsL4 + translate + SlatL5 + /sim/multiplay/generic/float[11] + + 0.0 0 + 0.6660.03 + 0.8140.05 + 1.00.1 + + + 0 + 0 + -1 + + diff --git a/Nasal/electrical.nas b/Nasal/electrical.nas index bb3c514b..fbbaaedd 100644 --- a/Nasal/electrical.nas +++ b/Nasal/electrical.nas @@ -45,6 +45,7 @@ var elec_init = func { setprop("/systems/electrical/extra/ext-hz", 0); setprop("/systems/electrical/extra/apu-hz", 0); setprop("/systems/electrical/extra/galleyshed", 0); + setprop("/systems/electrical/gen-apu", 0); setprop("systems/electrical/on", 0); setprop("/controls/electrical/xtie/xtieL", 0); setprop("/controls/electrical/xtie/xtieR", 0); @@ -93,6 +94,7 @@ var master_elec = func { var gen2_sw = getprop("/controls/electrical/switches/gen2"); var gen_apu_sw = getprop("/controls/electrical/switches/gen-apu"); var gen_ext_sw = getprop("/controls/electrical/switches/gen-ext"); + var gen_apu = getprop("/systems/electrical/gen-apu"); var apu_ext_crosstie_sw = getprop("/controls/electrical/switches/apu-ext-crosstie"); var ac_ess_feed_sw = getprop("/controls/electrical/switches/ac-ess-feed"); var battery1_sw = getprop("/controls/electrical/switches/battery1"); @@ -111,6 +113,7 @@ var master_elec = func { var dc_ess = getprop("/systems/electrical/bus/dc-ess"); var gen_1_volts = getprop("/systems/electrical/extra/gen1-volts"); var gen_2_volts = getprop("/systems/electrical/extra/gen1-volts"); + var galley_shed = getprop("/systems/electrical/extra/galleyshed"); @@ -145,7 +148,7 @@ var master_elec = func { setprop("/systems/electrical/bus/dc1", dc_volt_std); setprop("/systems/electrical/bus/dc-ess", dc_volt_std); setprop("/systems/electrical/bus/dc1-amps", dc_amps_std); - } else if (rpmapu >= 94.9 and gen_apu_sw) { + } else if (gen_apu) { setprop("/systems/electrical/bus/ac1", ac_volt_std); setprop("/systems/electrical/bus/ac-ess", ac_volt_std); setprop("/systems/electrical/extra/apu-volts", ac_volt_std); @@ -194,7 +197,7 @@ var master_elec = func { setprop("/systems/electrical/bus/dc2", dc_volt_std); setprop("/systems/electrical/bus/dc-ess", dc_volt_std); setprop("/systems/electrical/bus/dc2-amps", dc_amps_std); - } else if (rpmapu >= 94.9 and gen_apu_sw) { + } else if (gen_apu) { setprop("/systems/electrical/bus/ac2", ac_volt_std); setprop("/systems/electrical/bus/ac-ess", ac_volt_std); setprop("/systems/electrical/extra/apu-volts", ac_volt_std); @@ -235,15 +238,29 @@ var master_elec = func { } if (ac_ess >= 100) { - if (galley_sw == 1) { + if (galley_sw == 1 and !galley_shed) { setprop("/systems/electrical/bus/galley", ac_volt_std); - } else if (galley_sw) { + } else if (galley_sw or galley_shed) { setprop("/systems/electrical/bus/galley", 0); } } else { setprop("/systems/electrical/bus/galley", 0); } + # Galley Shedding Logic + if (!gen_apu and !gen_ext_sw and (!gen1_sw or !gen2_sw)) { # this is when one of the generators is not working or turned off as it reads 0 V + setprop("/systems/electrical/extra/galleyshed", 1); + } else { + setprop("/systems/electrical/extra/galleyshed", 0); + } + + # APU Generator: Make it only come online when the apu is running. This is needed to make galley shed work properly. + if (rpmapu >= 94.9 and gen_apu_sw) { + setprop("/systems/electrical/gen-apu", 1); + } else { + setprop("/systems/electrical/gen-apu", 0); + } + # Battery Amps if (battery1_sw) { setprop("/systems/electrical/battery1-amps", dc_amps_std); diff --git a/Nasal/engines.nas b/Nasal/engines.nas index 6e2e133b..81404421 100644 --- a/Nasal/engines.nas +++ b/Nasal/engines.nas @@ -21,7 +21,8 @@ var n1_wm = 0; var n2_wm = 0; var apu_max = 99.8; var apu_egt_max = 513; -var spinup_time = 15; +var spinup_time = 49; # Measured from youtube video +# For future, APU FLAP also takes 15 extra seconds to open before startup var start_time = 10; var egt_lightup_time = 2; var egt_lightdn_time = 8; @@ -157,6 +158,7 @@ setlistener("/controls/APU/start", func { } }); + ############ # Stop APU # ############ diff --git a/Systems/flight-recorder.xml b/Systems/flight-recorder.xml index b618200e..ff2b4210 100644 --- a/Systems/flight-recorder.xml +++ b/Systems/flight-recorder.xml @@ -86,6 +86,10 @@ float /controls/flight/rudder-fdm + + float + /fdm/jsbsim/fcs/slat-pos-norm +