This commit is contained in:
merspieler 2018-09-30 15:00:14 +02:00
commit e8caffb138
13 changed files with 409 additions and 434 deletions

View file

@ -6,18 +6,15 @@
##############################################
var knob = 0;
var roll = 0;
var pitch = 0;
var gs = 0;
var ac1 = 0;
var ac2 = 0;
var dcbat = 0;
var pwr_src = "XX";
setprop("/controls/adirs/align-time", 600);
setlistener("/sim/signals/fdm-initialized", func {
var roll = getprop("/orientation/roll-deg");
var pitch = getprop("/orientation/pitch-deg");
var gs = getprop("/velocities/groundspeed-kt");
var ac1 = 0;
var ac2 = 0;
var dcbat = 0;
var pwr_src = "XX";
});
var ADIRS = {
init: func() {
setprop("/controls/adirs/numm", 0);

View file

@ -5,6 +5,14 @@
# Copyright (c) Joshua Davidson (it0uchpods) #
##############################################
var stateL = 0;
var stateR = 0;
var thrustL = 0;
var thrustR = 0;
var elec = 0;
var speed = 0;
var wow = 0;
var altitude = 0;
setprop("/ECAM/left-msg", "NONE");
setprop("/position/gear-agl-ft", 0);
# w = White, b = Blue, g = Green, a = Amber, r = Red
@ -34,14 +42,6 @@ var ECAM = {
setprop("/ECAM/Lower/light/press", 0);
setprop("/ECAM/Lower/light/sts", 0);
setprop("/ECAM/Lower/light/wheel", 0);
var stateL = getprop("/engines/engine[0]/state");
var stateR = getprop("/engines/engine[1]/state");
var thrustL = getprop("/systems/thrust/state1");
var thrustR = getprop("/systems/thrust/state2");
var elec = getprop("/systems/electrical/on");
var speed = getprop("/velocities/airspeed-kt");
var wow = getprop("/gear/gear[0]/wow");
var altitude = getprop("/position/gear-agl-ft");
LowerECAM.reset();
},
MSGclr: func() {
@ -310,4 +310,4 @@ var LowerECAM = {
setprop("/ECAM/Lower/light/sts", 0);
setprop("/ECAM/Lower/light/wheel", 0);
},
};
};

View file

@ -9,6 +9,26 @@
# IT-AUTOFLIGHT Based Autopilot #
#################################
var trueSpeedKts = 0;
var locdefl = 0;
var signal = 0;
var gear1 = 0;
var gear2 = 0;
var gnds_mps = 0;
var current_course = 0;
var wp_fly_from = 0;
var wp_fly_to = 0;
var next_course = 0;
var max_bank_limit = 0;
var delta_angle = 0;
var max_bank = 0;
var radius = 0;
var time = 0;
var delta_angle_rad = 0;
var R = 0;
var dist_coeff = 0;
var turn_dist = 0;
var vsnow = 0;
setprop("/it-autoflight/internal/heading-deg", getprop("/orientation/heading-magnetic-deg"));
setprop("/it-autoflight/internal/track-deg", getprop("/orientation/track-magnetic-deg"));
setprop("/it-autoflight/internal/vert-speed-fpm", 0);
@ -17,29 +37,6 @@ setprop("/it-autoflight/internal/heading-predicted", 0);
setprop("/it-autoflight/internal/altitude-predicted", 0);
setprop("/it-autoflight/internal/lnav-advance-nm", 1);
setlistener("/sim/signals/fdm-initialized", func {
var trueSpeedKts = getprop("/instrumentation/airspeed-indicator/true-speed-kt");
var locdefl = getprop("/instrumentation/nav[0]/heading-needle-deflection-norm");
var signal = getprop("/instrumentation/nav[0]/gs-needle-deflection-norm");
var gear1 = getprop("/gear/gear[1]/wow");
var gear2 = getprop("/gear/gear[2]/wow");
var gnds_mps = 0;
var current_course = 0;
var wp_fly_from = 0;
var wp_fly_to = 0;
var next_course = 0;
var max_bank_limit = 0;
var delta_angle = 0;
var max_bank = 0;
var radius = 0;
var time = 0;
var delta_angle_rad = 0;
var R = 0;
var dist_coeff = 0;
var turn_dist = 0;
var vsnow = 0;
});
var APinit = func {
setprop("/instrumentation/efis[0]/trk-selected", 0);
setprop("/instrumentation/efis[1]/trk-selected", 0);

View file

@ -9,6 +9,94 @@
# Init Functions #
##################
var database1 = 0;
var database2 = 0;
var code1 = 0;
var code2 = 0;
var gear0 = 0;
var state1 = 0;
var state2 = 0;
var flaps = 0;
var dep = "";
var arr = "";
var n1_left = 0;
var n1_right = 0;
var flaps = 0;
var modelat = 0;
var mode = 0;
var modeI = 0;
var gs = 0;
var alt = 0;
var aglalt = 0;
var cruiseft = 0;
var cruiseft_b = 0;
var newcruise = 0;
var phase = 0;
var state1 = 0;
var state2 = 0;
var wowl = 0;
var wowr = 0;
var targetalt = 0;
var targetvs = 0;
var targetfpa = 0;
var reduc_agl_ft = 0;
var locarm = 0;
var apprarm = 0;
var gear0 = 0;
var fd1 = 0;
var fd2 = 0;
var spd = 0;
var hdg = 0;
var alt = 0;
var altitude = 0;
var flap = 0;
var freqnav0uf = 0;
var freqnav0 = 0;
var namenav0 = "XX";
var freqnav1uf = 0;
var freqnav1 = 0;
var namenav1 = "XX";
var freqnav2uf = 0;
var freqnav2 = 0;
var namenav2 = "XX";
var freqnav3uf = 0;
var freqnav3 = 0;
var namenav3 = "XX";
var freqadf0uf = 0;
var freqadf0 = 0;
var nameadf0 = "XX";
var freqadf1uf = 0;
var freqadf1 = 0;
var nameadf1 = "XX";
var ias = 0;
var mach = 0;
var ktsmach = 0;
var mngktsmach = 0;
var mng_spd = 0;
var mng_spd_cmd = 0;
var kts_sel = 0;
var mach_sel = 0;
var srsSPD = 0;
var maxspeed = 0;
var minspeed = 0;
var mach_switchover = 0;
var decel = 0;
var mng_alt_spd_cmd = 0;
var mng_alt_spd = 0;
var mng_alt_mach_cmd = 0;
var mng_alt_mach = 0;
var mng_spd_cmd = 0;
var mng_spd = 0;
var ap1 = 0;
var ap2 = 0;
var flx = 0;
var lat = 0;
var newlat = 0;
var vert = 0;
var newvert = 0;
var newvertarm = 0;
var thr1 = 0;
var thr2 = 0;
setprop("/FMGC/internal/maxspeed", 0);
setprop("/FMGC/internal/minspeed", 0);
setprop("/position/gear-agl-ft", 0);
@ -29,97 +117,6 @@ setprop("/FMGC/internal/adf1-mcdu", "XXX/999.99");
setprop("/FMGC/internal/adf2-mcdu", "999.99/XXX");
setprop("/gear/gear[0]/wow-fmgc", 1);
setlistener("/sim/signals/fdm-initialized", func {
var database1 = getprop("/FMGC/internal/navdatabase");
var database2 = getprop("/FMGC/internal/navdatabase2");
var code1 = getprop("/FMGC/internal/navdatabasecode");
var code2 = getprop("/FMGC/internal/navdatabasecode2");
var gear0 = getprop("/gear/gear[0]/wow");
var state1 = getprop("/systems/thrust/state1");
var state2 = getprop("/systems/thrust/state2");
var flaps = getprop("/controls/flight/flap-pos");
var dep = getprop("/FMGC/internal/dep-arpt");
var arr = getprop("/FMGC/internal/arr-arpt");
var n1_left = getprop("/engines/engine[0]/n1-actual");
var n1_right = getprop("/engines/engine[1]/n1-actual");
var flaps = getprop("/controls/flight/flap-pos");
var modelat = getprop("/modes/pfd/fma/roll-mode");
var mode = getprop("/modes/pfd/fma/pitch-mode");
var modeI = getprop("/it-autoflight/mode/vert");
var gs = getprop("/velocities/groundspeed-kt");
var alt = getprop("/instrumentation/altimeter/indicated-altitude-ft");
var aglalt = getprop("/position/gear-agl-ft");
var cruiseft = getprop("/FMGC/internal/cruise-ft");
var cruiseft_b = getprop("/FMGC/internal/cruise-ft") - 200;
var newcruise = getprop("/it-autoflight/internal/alt");
var phase = getprop("/FMGC/status/phase");
var state1 = getprop("/systems/thrust/state1");
var state2 = getprop("/systems/thrust/state2");
var wowl = getprop("/gear/gear[1]/wow");
var wowr = getprop("/gear/gear[2]/wow");
var targetalt = getprop("/it-autoflight/internal/alt");
var targetvs = getprop("/it-autoflight/input/vs");
var targetfpa = getprop("/it-autoflight/input/fpa");
var reduc_agl_ft = getprop("/it-autoflight/settings/reduc-agl-ft");
var locarm = getprop("/it-autopilot/output/loc-armed");
var apprarm = getprop("/it-autopilot/output/appr-armed");
var gear0 = getprop("/gear/gear[0]/wow");
var fd1 = getprop("/it-autoflight/input/fd1");
var fd2 = getprop("/it-autoflight/input/fd2");
var spd = getprop("/it-autoflight/input/spd-kts");
var hdg = getprop("/it-autoflight/input/hdg");
var alt = getprop("/it-autoflight/input/alt");
var altitude = getprop("/instrumentation/altimeter/indicated-altitude-ft");
var flap = getprop("/controls/flight/flap-pos");
var freqnav0uf = getprop("/instrumentation/nav[0]/frequencies/selected-mhz");
var freqnav0 = sprintf("%.2f", freqnav0uf);
var namenav0 = getprop("/instrumentation/nav[0]/nav-id");
var freqnav1uf = getprop("/instrumentation/nav[1]/frequencies/selected-mhz");
var freqnav1 = sprintf("%.2f", freqnav1uf);
var namenav1 = getprop("/instrumentation/nav[1]/nav-id");
var freqnav2uf = getprop("/instrumentation/nav[2]/frequencies/selected-mhz");
var freqnav2 = sprintf("%.2f", freqnav2uf);
var namenav2 = getprop("/instrumentation/nav[2]/nav-id");
var freqnav3uf = getprop("/instrumentation/nav[3]/frequencies/selected-mhz");
var freqnav3 = sprintf("%.2f", freqnav3uf);
var namenav3 = getprop("/instrumentation/nav[3]/nav-id");
var freqadf0uf = getprop("/instrumentation/adf[0]/frequencies/selected-khz");
var freqadf0 = sprintf("%.2f", freqadf0uf);
var nameadf0 = getprop("/instrumentation/adf[0]/ident");
var freqadf1uf = getprop("/instrumentation/adf[1]/frequencies/selected-khz");
var freqadf1 = sprintf("%.2f", freqadf1uf);
var nameadf1 = getprop("/instrumentation/adf[1]/ident");
var ias = getprop("/instrumentation/airspeed-indicator/indicated-speed-kt");
var mach = getprop("/instrumentation/airspeed-indicator/indicated-mach");
var ktsmach = getprop("/it-autoflight/input/kts-mach");
var mngktsmach = getprop("/FMGC/internal/mng-kts-mach");
var mng_spd = getprop("/FMGC/internal/mng-spd");
var mng_spd_cmd = getprop("/FMGC/internal/mng-spd-cmd");
var kts_sel = getprop("/it-autoflight/input/spd-kts");
var mach_sel = getprop("/it-autoflight/input/spd-mach");
var srsSPD = getprop("/it-autoflight/settings/togaspd");
var maxspeed = getprop("/FMGC/internal/maxspeed");
var minspeed = getprop("/FMGC/internal/minspeed");
var mach_switchover = getprop("/FMGC/internal/mach-switchover");
var decel = getprop("/FMGC/internal/decel");
var mng_alt_spd_cmd = getprop("/FMGC/internal/mng-alt-spd");
var mng_alt_spd = 0;
var mng_alt_mach_cmd = getprop("/FMGC/internal/mng-alt-mach");
var mng_alt_mach = 0;
var mng_spd_cmd = getprop("/FMGC/internal/mng-spd-cmd");
var mng_spd = getprop("/FMGC/internal/mng-spd");
var ap1 = getprop("/it-autoflight/output/ap1");
var ap2 = getprop("/it-autoflight/output/ap2");
var flx = getprop("/systems/thrust/lim-flex");
var lat = getprop("/it-autoflight/mode/lat");
var newlat = getprop("/modes/pfd/fma/roll-mode");
var vert = getprop("/it-autoflight/mode/vert");
var newvert = getprop("/modes/pfd/fma/pitch-mode");
var newvertarm = getprop("/modes/pfd/fma/pitch-mode2-armed");
var thr1 = getprop("/controls/engines/engine[0]/throttle-pos");
var thr2 = getprop("/controls/engines/engine[1]/throttle-pos");
});
var FMGCinit = func {
setprop("/FMGC/status/to-state", 0);
setprop("/FMGC/status/phase", "0"); # 0 is Preflight 1 is Takeoff 2 is Climb 3 is Cruise 4 is Descent 5 is Decel/Approach 6 is Go Around 7 is Done

View file

@ -5,17 +5,14 @@
# Copyright (c) Joshua Davidson (it0uchpods) #
##############################################
var thr1 = 0;
var thr2 = 0;
var wow0 = 0;
var gnd_speed = 0;
setprop("/controls/autobrake/active", 0);
setprop("/controls/autobrake/mode", 0);
setprop("/controls/autobrake/decel-rate", 0);
setlistener("/sim/signals/fdm-initialized", func {
var thr1 = 0;
var thr2 = 0;
var wow0 = getprop("/gear/gear[0]/wow");
var gnd_speed = getprop("/velocities/groundspeed-kt");
});
var autobrake_init = func {
setprop("/controls/autobrake/active", 0);
setprop("/controls/autobrake/mode", 0);

View file

@ -21,61 +21,58 @@ var screens = nil;
var lpower_consumption = nil;
var light_power_consumption = nil;
var lights = nil;
setlistener("/sim/signals/fdm-initialized", func {
var galley_sw = getprop("/controls/electrical/switches/galley");
var idg1_sw = getprop("/controls/electrical/switches/idg1");
var idg2_sw = getprop("/controls/electrical/switches/idg2");
var gen1_sw = getprop("/controls/electrical/switches/gen1");
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 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");
var battery2_sw = getprop("/controls/electrical/switches/battery2");
var manrat = getprop("/controls/electrical/switches/rat-man");
var battery1_volts = getprop("/systems/electrical/battery1-volts");
var battery2_volts = getprop("/systems/electrical/battery2-volts");
var battery1_amps = getprop("/systems/electrical/battery1-amps");
var battery2_amps = getprop("/systems/electrical/battery2-amps");
var battery1_percent = getprop("/systems/electrical/battery1-percent");
var battery2_percent = getprop("/systems/electrical/battery2-percent");
var battery1_percent_calc = 0;
var battery2_percent_calc = 0;
var rpmapu = getprop("/systems/apu/rpm");
var extpwr_on = getprop("/controls/switches/cart");
var stateL = getprop("/engines/engine[0]/state");
var stateR = getprop("/engines/engine[1]/state");
var xtieL = getprop("/controls/electrical/xtie/xtieL");
var xtieR = getprop("/controls/electrical/xtie/xtieR");
var ac1 = getprop("/systems/electrical/bus/ac1");
var ac2 = getprop("/systems/electrical/bus/ac2");
var ac_ess = getprop("/systems/electrical/bus/ac-ess");
var dc_ess_shed = getprop("/systems/electrical/bus/dc-ess-shed");
var ac_ess_shed = getprop("/systems/electrical/bus/ac-ess-shed");
var dc1 = getprop("/systems/electrical/bus/dc1");
var dc2 = getprop("/systems/electrical/bus/dc2");
var dcbat = getprop("/systems/electrical/bus/dcbat");
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/gen2-volts");
var galley_shed = getprop("/systems/electrical/extra/galleyshed");
var emergen = getprop("/controls/electrical/switches/emer-gen");
var ias = getprop("/instrumentation/airspeed-indicator/indicated-speed-kt");
var rat = getprop("/controls/electrical/rat");
var ac_ess_fail = getprop("/systems/failures/elec-ac-ess");
var batt1_fail = getprop("/systems/failures/elec-batt1");
var batt2_fail = getprop("/systems/failures/elec-batt2");
var gallery_fail = getprop("/systems/failures/elec-galley");
var genapu_fail = getprop("/systems/failures/elec-genapu");
var gen1_fail = getprop("/systems/failures/elec-gen1");
var gen2_fail = getprop("/systems/failures/elec-gen2");
var bat1_volts = getprop("/systems/electrical/battery1-volts");
var bat2_volts = getprop("/systems/electrical/battery2-volts");
var replay = getprop("/sim/replay/replay-state");
var wow = getprop("/gear/gear[1]/wow");
});
var galley_sw = 0;
var idg1_sw = 0;
var idg2_sw = 0;
var gen1_sw = 0;
var gen2_sw = 0;
var gen_apu_sw = 0;
var gen_ext_sw = 0;
var apu_ext_crosstie_sw = 0;
var ac_ess_feed_sw = 0;
var battery1_sw = 0;
var battery2_sw = 0;
var manrat = 0;
var battery1_volts = 0;
var battery2_volts = 0;
var battery1_amps = 0;
var battery2_amps = 0;
var battery1_percent = 0;
var battery2_percent = 0;
var battery1_percent_calc = 0;
var battery2_percent_calc = 0;
var rpmapu = 0;
var extpwr_on = 0;
var stateL = 0;
var stateR = 0;
var xtieL = 0;
var xtieR = 0;
var ac1 = 0;
var ac2 = 0;
var ac_ess = 0;
var dc_ess_shed = 0;
var ac_ess_shed = 0;
var dc1 = 0;
var dc2 = 0;
var dcbat = 0;
var dc_ess = 0;
var gen_1_volts = 0;
var gen_2_volts = 0;
var galley_shed = 0;
var emergen = 0;
var ias = 0;
var rat = 0;
var ac_ess_fail = 0;
var batt1_fail = 0;
var batt2_fail = 0;
var gallery_fail = 0;
var genapu_fail = 0;
var gen1_fail = 0;
var gen2_fail = 0;
var bat1_volts = 0;
var bat2_volts = 0;
var replay = 0;
var wow = 0;
# Power Consumption, cockpit screens
# According to pprune, each LCD uses 60W. Will assume that it reduces linearly to ~50 watts when dimmed, and to 0 watts when off

View file

@ -11,6 +11,25 @@ if (getprop("/options/eng") == "IAE") {
io.include("fadec-cfm.nas");
}
var thr1 = 0;
var thr2 = 0;
var state1 = 0;
var state2 = 0;
var engstate1 = 0;
var engstate2 = 0;
var eprtoga = 0;
var eprmct = 0;
var eprflx = 0;
var eprclb = 0;
var n1toga = 0;
var n1mct = 0;
var n1flx = 0;
var n1clb = 0;
var alpha = 0;
var flaps = 0;
var alphaProt = 0;
var togaLock = 0;
var gs = 0;
setprop("/systems/thrust/alpha-floor", 0);
setprop("/systems/thrust/toga-lk", 0);
setprop("/systems/thrust/epr/toga-lim", 0.0);
@ -37,25 +56,6 @@ setprop("/engines/flex-derate", 0);
setprop("/systems/thrust/eng-out", 0);
setlistener("/sim/signals/fdm-initialized", func {
var thr1 = getprop("/controls/engines/engine[0]/throttle-pos");
var thr2 = getprop("/controls/engines/engine[1]/throttle-pos");
var state1 = getprop("/systems/thrust/state1");
var state2 = getprop("/systems/thrust/state2");
var engstate1 = getprop("/engines/engine[0]/state");
var engstate2 = getprop("/engines/engine[1]/state");
var eprtoga = getprop("/systems/thrust/epr/toga-lim");
var eprmct = getprop("/systems/thrust/epr/mct-lim");
var eprflx = getprop("/systems/thrust/epr/flx-lim");
var eprclb = getprop("/systems/thrust/epr/clb-lim");
var n1toga = getprop("/systems/thrust/n1/toga-lim");
var n1mct = getprop("/systems/thrust/n1/mct-lim");
var n1flx = getprop("/systems/thrust/n1/flx-lim");
var n1clb = getprop("/systems/thrust/n1/clb-lim");
var alpha = getprop("/fdm/jsbsim/aero/alpha-deg");
var flaps = getprop("/controls/flight/flap-pos");
var alphaProt = 0;
var togaLock = 0;
var gs = getprop("/velocities/groundspeed-kt");
thrust_loop.start();
thrust_flash.start();
});

View file

@ -9,28 +9,26 @@
# Init Vars #
#############
setlistener("/sim/signals/fdm-initialized", func {
var level = getprop("/systems/fire/cargo/bottlelevel");
var fwdsquib = getprop("/systems/fire/cargo/fwdsquib");
var aftsquib = getprop("/systems/fire/cargo/aftsquib");
var fwddet = getprop("/systems/failures/cargo-fwd-fire");
var aftdet = getprop("/systems/failures/cargo-aft-fire");
var test = getprop("/controls/fire/cargo/test");
var guard1 = getprop("/controls/fire/cargo/fwdguard");
var guard2 = getprop("/controls/fire/cargo/aftguard");
var dischpb1 = getprop("/controls/fire/cargo/fwddisch");
var dischpb2 = getprop("/controls/fire/cargo/aftdisch");
var smokedet1 = getprop("/controls/fire/cargo/fwdsmokeLight");
var smokedet2 = getprop("/controls/fire/cargo/aftsmokeLight");
var bottleIsEmpty = getprop("/controls/fire/cargo/bottleempty");
var WeCanExt = getprop("/controls/fire/cargo/status");
var test2 = getprop("/systems/fire/cargo/test");
var state = getprop("/controls/fire/cargo/test/state");
var dc1 = getprop("/systems/electrical/bus/dc1");
var dc2 = getprop("/systems/electrical/bus/dc2");
var dcbat = getprop("/systems/electrical/bus/dcbat");
var pause = getprop("/sim/freeze/master");
});
var level = 0;
var fwdsquib = 0;
var aftsquib = 0;
var fwddet = 0;
var aftdet = 0;
var test = 0;
var guard1 = 0;
var guard2 = 0;
var dischpb1 = 0;
var dischpb2 = 0;
var smokedet1 = 0;
var smokedet2 = 0;
var bottleIsEmpty = 0;
var WeCanExt = 0;
var test2 = 0;
var state = 0;
var dc1 = 0;
var dc2 = 0;
var dcbat = 0;
var pause = 0;
var fire_init = func {
setprop("/controls/OH/protectors/fwddisch", 0);

View file

@ -5,35 +5,33 @@
# Copyright (c) Joshua Davidson (it0uchpods) #
##############################################
setlistener("/sim/signals/fdm-initialized", func {
var xfeed_sw = getprop("/controls/fuel/x-feed");
var tank0pump1_sw = getprop("/controls/fuel/tank0pump1");
var tank0pump2_sw = getprop("/controls/fuel/tank0pump2");
var tank1pump1_sw = getprop("/controls/fuel/tank1pump1");
var tank1pump2_sw = getprop("/controls/fuel/tank1pump2");
var tank2pump1_sw = getprop("/controls/fuel/tank2pump1");
var tank2pump2_sw = getprop("/controls/fuel/tank2pump2");
var mode_sw = getprop("/controls/fuel/mode");
var xfeed = getprop("/systems/fuel/x-feed");
var ac1 = getprop("/systems/electrical/bus/ac1");
var ac2 = getprop("/systems/electrical/bus/ac2");
var gravityfeedL = getprop("/systems/fuel/gravityfeedL");
var gravityfeedR = getprop("/systems/fuel/gravityfeedR");
var gload = getprop("/accelerations/pilot-gdamped");
var gravityfeedL_output = getprop("/systems/fuel/gravityfeedL-output");
var gravityfeedR_output = getprop("/systems/fuel/gravityfeedR-output");
var tank0 = getprop("/systems/fuel/tank[0]/feed");
var tank1 = getprop("/systems/fuel/tank[1]/feed");
var tank2 = getprop("/systems/fuel/tank[2]/feed");
var gravityfeedL = getprop("/systems/fuel/gravityfeedL");
var gravityfeedR = getprop("/systems/fuel/gravityfeedR");
var tank0pump1_fail = getprop("/systems/failures/tank0pump1");
var tank0pump2_fail = getprop("/systems/failures/tank0pump2");
var tank1pump1_fail = getprop("/systems/failures/tank1pump1");
var tank1pump2_fail = getprop("/systems/failures/tank1pump2");
var tank2pump1_fail = getprop("/systems/failures/tank2pump1");
var tank2pump2_fail = getprop("/systems/failures/tank2pump2");
});
var xfeed_sw = getprop("/controls/fuel/x-feed");
var tank0pump1_sw = 0;
var tank0pump2_sw = 0;
var tank1pump1_sw = 0;
var tank1pump2_sw = 0;
var tank2pump1_sw = 0;
var tank2pump2_sw = 0;
var mode_sw = 0;
var xfeed = 0;
var ac1 = 0;
var ac2 = 0;
var gravityfeedL = 0;
var gravityfeedR = 0;
var gload = 0;
var gravityfeedL_output = 0;
var gravityfeedR_output = 0;
var tank0 = 0;
var tank1 = 0;
var tank2 = 0;
var gravityfeedL = 0;
var gravityfeedR = 0;
var tank0pump1_fail = 0;
var tank0pump2_fail = 0;
var tank1pump1_fail = 0;
var tank1pump2_fail = 0;
var tank2pump1_fail = 0;
var tank2pump2_fail = 0;
var FUEL = {
init: func() {

View file

@ -5,47 +5,45 @@
# Copyright (c) Joshua Davidson (it0uchpods) #
##############################################
setlistener("/sim/signals/fdm-initialized", func {
var eng1_pump_sw = getprop("/controls/hydraulic/eng1-pump");
var eng2_pump_sw = getprop("/controls/hydraulic/eng2-pump");
var elec_pump_blue_sw = getprop("/controls/hydraulic/elec-pump-blue");
var elec_pump_yellow_sw = getprop("/controls/hydraulic/elec-pump-yellow");
var yellow_hand_pump = getprop("/controls/hydraulic/hand-pump-yellow");
var ptu_sw = getprop("/controls/hydraulic/ptu");
var rat_man_sw = getprop("/controls/hydraulic/rat-man");
var blue_psi = getprop("/systems/hydraulic/blue-psi");
var green_psi = getprop("/systems/hydraulic/green-psi");
var yellow_psi = getprop("/systems/hydraulic/yellow-psi");
var rpmapu = getprop("/systems/apu/rpm");
var stateL = getprop("/engines/engine[0]/state");
var stateR = getprop("/engines/engine[1]/state");
var dc_ess = getprop("/systems/electrical/bus/dc-ess");
var psi_diff = green_psi - yellow_psi;
var rat = getprop("/controls/hydraulic/rat");
var ratout = getprop("/controls/hydraulic/rat-deployed");
var gs = getprop("/velocities/groundspeed-kt");
var blue_leak = getprop("/systems/failures/hyd-blue");
var green_leak = getprop("/systems/failures/hyd-green");
var yellow_leak = getprop("/systems/failures/hyd-yellow");
var blue_pump_fail = getprop("/systems/failures/pump-blue");
var green_pump_fail = getprop("/systems/failures/pump-green");
var yellow_pump_eng_fail = getprop("/systems/failures/pump-yellow-eng");
var yellow_pump_elec_fail = getprop("/systems/failures/pump-yellow-elec");
var ptu_fail = getprop("/systems/failures/ptu");
var dc2 = getprop("/systems/electrical/bus/dc2");
var ptu_active = getprop("/systems/hydraulic/ptu-active");
var accum = getprop("/systems/hydraulic/brakes/accumulator-pressure-psi");
var lpsi = getprop("/systems/hydraulic/brakes/pressure-left-psi");
var rpsi = getprop("/systems/hydraulic/brakes/pressure-right-psi");
var parking = getprop("/controls/gear/brake-parking");
var askidnws_sw = getprop("/systems/hydraulic/brakes/askidnwssw");
var brake_mode = getprop("/systems/hydraulic/brakes/mode");
var brake_l = getprop("/systems/hydraulic/brakes/lbrake");
var brake_r = getprop("/systems/hydraulic/brakes/rbrake");
var brake_nose = getprop("/systems/hydraulic/brakes/nose-rubber");
var counter = getprop("/systems/hydraulic/brakes/counter");
var down = getprop("/controls/gear/gear-down");
});
var eng1_pump_sw = 0;
var eng2_pump_sw = 0;
var elec_pump_blue_sw = 0;
var elec_pump_yellow_sw = 0;
var yellow_hand_pump = 0;
var ptu_sw = 0;
var rat_man_sw = 0;
var blue_psi = 0;
var green_psi = 0;
var yellow_psi = 0;
var rpmapu = 0;
var stateL = 0;
var stateR = 0;
var dc_ess = 0;
var psi_diff = 0;
var rat = 0;
var ratout = 0;
var gs = 0;
var blue_leak = 0;
var green_leak = 0;
var yellow_leak = 0;
var blue_pump_fail = 0;
var green_pump_fail = 0;
var yellow_pump_eng_fail = 0;
var yellow_pump_elec_fail = 0;
var ptu_fail = 0;
var dc2 = 0;
var ptu_active = 0;
var accum = 0;
var lpsi = 0;
var rpsi = 0;
var parking = 0;
var askidnws_sw = 0;
var brake_mode = 0;
var brake_l = 0;
var brake_r = 0;
var brake_nose = 0;
var counter = 0;
var down = 0;
var HYD = {
init: func() {

View file

@ -5,63 +5,61 @@
# Copyright (c) Joshua Davidson (it0uchpods) #
##############################################
setlistener("/sim/signals/fdm-initialized", func {
var dewpoint = getprop("/environment/dewpoint-degc");
var temperature = getprop("/environment/temperature-degc");
var speed = getprop("/velocities/airspeed-kt");
var visibility = getprop("/environment/effective-visibility-m");
var visibLclWx = getprop("/environment/visibility-m");
var severity = getprop("/systems/icing/severity");
var factor = getprop("/systems/icing/factor");
var maxSpread = getprop("/systems/icing/max-spread-degc");
var icingCond = getprop("/systems/icing/icingcond");
var pause = getprop("/sim/freeze/master");
var melt = getprop("/systems/icing/melt-w-heat-factor");
var windowprobe = getprop("/controls/deice/windowprobeheat");
var wingBtn = getprop("/controls/switches/wing");
var wingFault = getprop("/controls/switches/wingfault");
var wingAnti = getprop("/controls/deice/wing");
var PSI = getprop("/systems/pneumatic/total-psi");
var wowl = getprop("/gear/gear[1]/wow");
var wowr = getprop("/gear/gear[2]/wow");
var PitotIcing = getprop("/systems/pitot/icing");
var PitotFailed = getprop("/systems/pitot/failed");
var lengBtn = getprop("/controls/switches/leng");
var lengFault = getprop("/controls/switches/lengfault");
var rengBtn = getprop("/controls/switches/reng");
var rengFault = getprop("/controls/switches/rengfault");
var lengAnti = getprop("/controls/deice/lengine");
var rengAnti = getprop("/controls/deice/rengine");
var WingHasBeenTurnedOff = getprop("/controls/deice/WingHasBeenTurnedOff");
var GroundModeFinished = getprop("/controls/deice/GroundModeFinished");
var icing1 = getprop("/sim/model/icing/iceable[0]/ice-inches");
var sensitive1 = getprop("/sim/model/icing/iceable[0]/sensitivity");
var v = 0;
var a = 0;
var icing2 = getprop("/sim/model/icing/iceable[1]/ice-inches");
var sensitive2 = getprop("/sim/model/icing/iceable[1]/sensitivity");
var u = 0;
var b = 0;
var icing3 = getprop("/sim/model/icing/iceable[2]/ice-inches");
var sensitive3 = getprop("/sim/model/icing/iceable[2]/sensitivity");
var t = 0;
var c = 0;
var icing4 = getprop("/sim/model/icing/iceable[3]/ice-inches");
var sensitive4 = getprop("/sim/model/icing/iceable[3]/sensitivity");
var s = 0;
var d = 0;
var icing5 = getprop("/sim/model/icing/iceable[4]/ice-inches");
var sensitive5 = getprop("/sim/model/icing/iceable[4]/sensitivity");
var r = 0;
var icing6 = getprop("/sim/model/icing/iceable[5]/ice-inches");
var sensitive6 = getprop("/sim/model/icing/iceable[5]/sensitivity");
var q = 0;
var e = 0;
var spread = 0;
var windowprb = getprop("/controls/switches/windowprobeheat");
var stateL = getprop("/engines/engine[0]/state");
var stateR = getprop("/engines/engine[1]/state");
});
var dewpoint = 0;
var temperature = 0;
var speed = 0;
var visibility = 0;
var visibLclWx = 0;
var severity = 0;
var factor = 0;
var maxSpread = 0;
var icingCond = 0;
var pause = 0;
var melt = 0;
var windowprobe = 0;
var wingBtn = 0;
var wingFault = 0;
var wingAnti = 0;
var PSI = 0;
var wowl = 0;
var wowr = 0;
var PitotIcing = 0;
var PitotFailed = 0;
var lengBtn = 0;
var lengFault = 0;
var rengBtn = 0;
var rengFault = 0;
var lengAnti = 0;
var rengAnti = 0;
var WingHasBeenTurnedOff = 0;
var GroundModeFinished = 0;
var icing1 = 0;
var sensitive1 = 0;
var v = 0;
var a = 0;
var icing2 = 0;
var sensitive2 = 0;
var u = 0;
var b = 0;
var icing3 = 0;
var sensitive3 = 0;
var t = 0;
var c = 0;
var icing4 = 0;
var sensitive4 = 0;
var s = 0;
var d = 0;
var icing5 = 0;
var sensitive5 = 0;
var r = 0;
var icing6 = 0;
var sensitive6 = 0;
var q = 0;
var e = 0;
var spread = 0;
var windowprb = 0;
var stateL = 0;
var stateR = 0;
var icingInit = func {
setprop("/systems/icing/severity", "0"); # maximum severity: we will make it random

View file

@ -5,76 +5,74 @@
# Copyright (c) Joshua Davidson (it0uchpods) #
##############################################
setlistener("/sim/signals/fdm-initialized", func {
var altitude = getprop("/instrumentation/altimeter/indicated-altitude-ft");
var bleed1_sw = getprop("/controls/pneumatic/switches/bleed1");
var bleed2_sw = getprop("/controls/pneumatic/switches/bleed2");
var bleedapu_sw = getprop("/controls/pneumatic/switches/bleedapu");
var pack1_sw = getprop("/controls/pneumatic/switches/pack1");
var pack2_sw = getprop("/controls/pneumatic/switches/pack2");
var hot_air_sw = getprop("/controls/pneumatic/switches/hot-air");
var ram_air_sw = getprop("/controls/pneumatic/switches/ram-air");
var pack_flo_sw = getprop("/controls/pneumatic/switches/pack-flo");
var xbleed_sw = getprop("/controls/pneumatic/switches/xbleed");
var eng1_starter = getprop("/systems/pneumatic/eng1-starter");
var eng2_starter = getprop("/systems/pneumatic/eng2-starter");
var groundair = getprop("/systems/pneumatic/groundair");
var groundair_supp = getprop("/controls/pneumatic/switches/groundair");
var rpmapu = getprop("/systems/apu/rpm");
var stateL = getprop("/engines/engine[0]/state");
var stateR = getprop("/engines/engine[1]/state");
var bleedapu_fail = getprop("/systems/failures/bleed-apu");
var bleedext_fail = getprop("/systems/failures/bleed-ext");
var bleedeng1_fail = getprop("/systems/failures/bleed-eng1");
var bleedeng2_fail = getprop("/systems/failures/bleed-eng2");
var pack1_fail = getprop("/systems/failures/pack1");
var pack2_fail = getprop("/systems/failures/pack2");
var engantiice1 = getprop("/controls/deice/eng1-on");
var engantiice2 = getprop("/controls/deice/eng2-on");
var bleed1 = getprop("/systems/pneumatic/bleed1");
var bleed2 = getprop("/systems/pneumatic/bleed2");
var bleedapu = getprop("/systems/pneumatic/bleedapu");
var ground = getprop("/systems/pneumatic/groundair");
var pack1 = getprop("/systems/pneumatic/pack1");
var pack2 = getprop("/systems/pneumatic/pack2");
var pack_psi = getprop("/systems/pneumatic/pack-psi");
var start_psi = getprop("/systems/pneumatic/start-psi");
var total_psi = getprop("/systems/pneumatic/total-psi");
var xbleed = getprop("/systems/pneumatic/xbleed", 0);
var starting = getprop("/systems/pneumatic/starting");
var phase = getprop("/FMGC/status/phase");
var pressmode = getprop("/systems/pressurization/mode");
var state1 = getprop("/systems/thrust/state1");
var state2 = getprop("/systems/thrust/state2");
var wowc = getprop("/gear/gear[0]/wow");
var wowl = getprop("/gear/gear[1]/wow");
var wowr = getprop("/gear/gear[2]/wow");
var deltap = getprop("/systems/pressurization/deltap");
var outflow = getprop("/systems/pressurization/outflowpos");
var speed = getprop("/velocities/groundspeed-kt");
var altitude = getprop("/instrumentation/altimeter/indicated-altitude-ft");
var airport_arr_elev_ft = getprop("autopilot/route-manager/destination/field-elevation-ft");
var vs = getprop("/systems/pressurization/vs-norm");
var manvs = getprop("/systems/pressurization/manvs-cmd");
var ditch = getprop("/systems/pressurization/ditchingpb");
var outflowpos = getprop("/systems/pressurization/outflowpos");
var cabinalt = getprop("/systems/pressurization/cabinalt");
var targetalt = getprop("/systems/pressurization/targetalt");
var targetvs = getprop("/systems/pressurization/targetvs");
var ambient = getprop("/systems/pressurization/ambientpsi");
var cabinpsi = getprop("/systems/pressurization/cabinpsi");
var pause = getprop("/sim/freeze/master");
var auto = getprop("/systems/pressurization/auto");
var dcess = getprop("/systems/electrical/bus/dc-ess");
var acess = getprop("/systems/electrical/bus/ac-ess");
var fanon = getprop("/systems/ventilation/avionics/fan");
var eng1on = getprop("/controls/deice/eng1-on");
var eng2on = getprop("/controls/deice/eng2-on");
var total_psi_calc = 0;
var masks = getprop("/controls/oxygen/masksDeployMan");
var autoMasks = getprop("/controls/oxygen/masksDeploy");
var guard = getprop("/controls/oxygen/masksGuard");
});
var altitude = 0;
var bleed1_sw = 0;
var bleed2_sw = 0;
var bleedapu_sw = 0;
var pack1_sw = 0;
var pack2_sw = 0;
var hot_air_sw = 0;
var ram_air_sw = 0;
var pack_flo_sw = 0;
var xbleed_sw = 0;
var eng1_starter = 0;
var eng2_starter = 0;
var groundair = 0;
var groundair_supp = 0;
var rpmapu = 0;
var stateL = 0;
var stateR = 0;
var bleedapu_fail = 0;
var bleedext_fail = 0;
var bleedeng1_fail = 0;
var bleedeng2_fail = 0;
var pack1_fail = 0;
var pack2_fail = 0;
var engantiice1 = 0;
var engantiice2 = 0;
var bleed1 = 0;
var bleed2 = 0;
var bleedapu = 0;
var ground = 0;
var pack1 = 0;
var pack2 = 0;
var pack_psi = 0;
var start_psi = 0;
var total_psi = 0;
var xbleed = 0;
var starting = 0;
var phase = 0;
var pressmode = 0;
var state1 = 0;
var state2 = 0;
var wowc = 0;
var wowl = 0;
var wowr = 0;
var deltap = 0;
var outflow = 0;
var speed = 0;
var altitude = 0;
var airport_arr_elev_ft = 0;
var vs = 0;
var manvs = 0;
var ditch = 0;
var outflowpos = 0;
var cabinalt = 0;
var targetalt = 0;
var targetvs = 0;
var ambient = 0;
var cabinpsi = 0;
var pause = 0;
var auto = 0;
var dcess = 0;
var acess = 0;
var fanon = 0;
var eng1on = 0;
var eng2on = 0;
var total_psi_calc = 0;
var masks = 0;
var autoMasks = 0;
var guard = 0;
var PNEU = {
init: func() {

View file

@ -1 +1 @@
4664
4665