improved logic of retard callout with autoland, 5 callout, fixed bugs, improved autoland FLARE Kp

This commit is contained in:
Joshua Davidson 2017-04-10 19:08:55 -04:00
parent 21be4e0716
commit 61926f14ed
10 changed files with 147 additions and 71 deletions

View file

@ -277,7 +277,7 @@
</cmd>
<autoland>
<kp-roll>0.10</kp-roll>
<kp-pitch>0.03</kp-pitch>
<kp-pitch>0.05</kp-pitch>
<kp-rudder>-0.3</kp-rudder>
</autoland>
</config>

View file

@ -74,26 +74,6 @@
</offsets>
<condition>
<or>
<and>
<or>
<equals>
<property>/controls/electrical/switches/battery1</property>
<value>1</value>
</equals>
<equals>
<property>/controls/electrical/switches/battery2</property>
<value>1</value>
</equals>
</or>
<less-than>
<property>/systems/electrical/bus/ac1</property>
<value>25</value>
</less-than>
<less-than>
<property>/systems/electrical/bus/ac2</property>
<value>25</value>
</less-than>
</and>
<greater-than-equals>
<property>/systems/electrical/bus/ac1</property>
<value>25</value>
@ -186,26 +166,6 @@
</offsets>
<condition>
<or>
<and>
<or>
<equals>
<property>/controls/electrical/switches/battery1</property>
<value>1</value>
</equals>
<equals>
<property>/controls/electrical/switches/battery2</property>
<value>1</value>
</equals>
</or>
<less-than>
<property>/systems/electrical/bus/ac1</property>
<value>25</value>
</less-than>
<less-than>
<property>/systems/electrical/bus/ac2</property>
<value>25</value>
</less-than>
</and>
<greater-than-equals>
<property>/systems/electrical/bus/ac1</property>
<value>25</value>

View file

@ -192,11 +192,11 @@ var do_rev_thrust = func {
if ((getprop("/controls/engines/engine[0]/reverser") == "1") and (getprop("/controls/engines/engine[1]/reverser") == "1") and (getprop("/gear/gear[1]/wow") == 1) and (getprop("/gear/gear[2]/wow") == 1)) {
var pos1 = getprop("/controls/engines/engine[0]/throttle-pos");
var pos2 = getprop("/controls/engines/engine[1]/throttle-pos");
if (pos1 < 0.25) {
setprop("/controls/engines/engine[0]/throttle-pos", pos1 + 0.05);
if (pos1 < 0.5) {
setprop("/controls/engines/engine[0]/throttle-pos", pos1 + 0.167);
}
if (pos2 < 0.25) {
setprop("/controls/engines/engine[1]/throttle-pos", pos2 + 0.05);
if (pos2 < 0.5) {
setprop("/controls/engines/engine[1]/throttle-pos", pos2 + 0.167);
}
}
var state1 = getprop("/systems/thrust/state1");
@ -215,17 +215,15 @@ var do_rev_thrust = func {
var un_rev_thrust = func {
if ((getprop("/controls/engines/engine[0]/reverser") == "1") and (getprop("/controls/engines/engine[1]/reverser") == "1")) {
interpolate("/engines/engine[0]/reverser-pos-norm", 0, 1.0);
interpolate("/engines/engine[1]/reverser-pos-norm", 0, 1.0);
var pos1 = getprop("/controls/engines/engine[0]/throttle-pos");
var pos2 = getprop("/controls/engines/engine[1]/throttle-pos");
if (pos1 > 0.0) {
setprop("/controls/engines/engine[0]/throttle-pos", pos1 - 0.05);
setprop("/controls/engines/engine[0]/throttle-pos", pos1 - 0.167);
} else {
un_rev_thrust_b();
}
if (pos2 > 0.0) {
setprop("/controls/engines/engine[1]/throttle-pos", pos2 - 0.05);
setprop("/controls/engines/engine[1]/throttle-pos", pos2 - 0.167);
} else {
un_rev_thrust_b();
}
@ -233,6 +231,8 @@ var un_rev_thrust = func {
}
var un_rev_thrust_b = func {
interpolate("/engines/engine[0]/reverser-pos-norm", 0, 1.0);
interpolate("/engines/engine[1]/reverser-pos-norm", 0, 1.0);
setprop("/controls/engines/engine[0]/throttle-pos", 0);
setprop("/controls/engines/engine[1]/throttle-pos", 0);
setprop("/fdm/jsbsim/propulsion/engine[0]/reverser-angle-rad", 0);

View file

@ -1,5 +1,5 @@
# Airbus A3XX FBW System by Joshua Davidson (it0uchpods/411)
# V0.9.1
# V0.9.2
########################
# Roll Update Function #
@ -7,8 +7,9 @@
var roll_input = func {
var ail = getprop("/controls/flight/aileron");
if (getprop("/it-autoflight/output/ap1") == 0 and getprop("/it-autoflight/output/ap2") == 0 and ((getprop("/it-fbw/law") == "NORMAL") or (getprop("/it-fbw/law") == "ALTERNATE"))) {
var ail = getprop("/controls/flight/aileron");
if (ail >= 0.05 and ail < 0.15) {
var rfbw = getprop("/it-fbw/roll-deg");

View file

@ -159,7 +159,7 @@ setlistener("/sim/signals/fdm-initialized", func {
var aglgears = func {
var agl = getprop("/position/altitude-agl-ft") or 0;
var aglft = agl - 8.004; # is the position from the Airbus A320 above ground
var aglft = agl - 11.102; # is the position from the Airbus A320 above ground
var aglm = aglft * 0.3048;
setprop("/position/gear-agl-ft", aglft);
setprop("/position/gear-agl-m", aglm);
@ -168,11 +168,3 @@ var aglgears = func {
}
aglgears();
setlistener("/controls/parking-brake", func {
if (getprop("/controls/parking-brake") == 1) {
setprop("/electrical/switches/ext-pwr", 1);
} else {
setprop("/electrical/switches/ext-pwr", 0);
}
});

View file

@ -49,10 +49,10 @@
<property>/instrumentation/mk-viii/inputs/discretes/gpws-inhibit</property>
<value>0</value>
</equals>
<less-than>
<less-than-equals>
<property>/position/gear-agl-ft</property>
<value>2500</value>
</less-than>
</less-than-equals>
<greater-than>
<property>/position/gear-agl-ft</property>
<value>2400</value>
@ -84,10 +84,10 @@
<property>/instrumentation/mk-viii/inputs/discretes/gpws-inhibit</property>
<value>0</value>
</equals>
<less-than>
<less-than-equals>
<property>/position/gear-agl-ft</property>
<value>2000</value>
</less-than>
</less-than-equals>
<greater-than>
<property>/position/gear-agl-ft</property>
<value>1900</value>
@ -109,6 +109,102 @@
<reference-dist>20.0</reference-dist>
<max-dist>100.0</max-dist>
</gpws>
<gpws>
<name>10ftaland</name>
<path>Aircraft/A320Family/Sounds/GPWS/altitude-10ft.wav</path>
<mode>once</mode>
<condition>
<and>
<equals>
<property>/instrumentation/mk-viii/inputs/discretes/gpws-inhibit</property>
<value>0</value>
</equals>
<greater-than>
<property>/controls/flight/flaps</property>
<value>0.640</value>
</greater-than>
<less-than-equals>
<property>/position/gear-agl-ft</property>
<value>10</value>
</less-than-equals>
<greater-than>
<property>/position/gear-agl-ft</property>
<value>8</value>
</greater-than>
<less-than>
<property>/it-autoflight/internal/vert-speed-fpm</property>
<value>0</value>
</less-than>
<or>
<equals>
<property>/it-autoflight/output/ap1</property>
<value>1</value>
</equals>
<equals>
<property>/it-autoflight/output/ap2</property>
<value>1</value>
</equals>
</or>
</and>
</condition>
<volume>
<factor>8</factor>
</volume>
<position>
<x>0.00</x>
<y>0.00</y>
<z>0.00</z>
</position>
<reference-dist>20.0</reference-dist>
<max-dist>100.0</max-dist>
</gpws>
<gpws>
<name>5</name>
<path>Aircraft/A320Family/Sounds/GPWS/altitude-5.wav</path>
<mode>once</mode>
<condition>
<and>
<equals>
<property>/instrumentation/mk-viii/inputs/discretes/gpws-inhibit</property>
<value>0</value>
</equals>
<greater-than>
<property>/controls/flight/flaps</property>
<value>0.640</value>
</greater-than>
<less-than-equals>
<property>/position/gear-agl-ft</property>
<value>5</value>
</less-than-equals>
<greater-than>
<property>/position/gear-agl-ft</property>
<value>3</value>
</greater-than>
<less-than>
<property>/it-autoflight/internal/vert-speed-fpm</property>
<value>0</value>
</less-than>
<equals>
<property>/controls/engines/engine[0]/throttle</property>
<value>0.0</value>
</equals>
<equals>
<property>/controls/engines/engine[1]/throttle</property>
<value>0.0</value>
</equals>
</and>
</condition>
<volume>
<factor>8</factor>
</volume>
<position>
<x>0.00</x>
<y>0.00</y>
<z>0.00</z>
</position>
<reference-dist>20.0</reference-dist>
<max-dist>100.0</max-dist>
</gpws>
<gpws>
<name>100above</name>
@ -120,10 +216,10 @@
<property>/instrumentation/mk-viii/inputs/discretes/gpws-inhibit</property>
<value>0</value>
</equals>
<less-than> <!-- Until I add a calulation for minimums + 100, and add the ability to adjust DH, I'm keeping 350 -->
<less-than-equals> <!-- Until I add a calulation for minimums + 100, and add the ability to adjust DH, I'm keeping 350. Should be working within the next few builds -->
<property>/position/gear-agl-ft</property>
<value>350</value>
</less-than>
</less-than-equals>
<greater-than>
<property>/position/gear-agl-ft</property>
<value>300</value>
@ -159,10 +255,38 @@
<property>/controls/flight/flaps</property>
<value>0.640</value>
</greater-than>
<less-than>
<property>/position/gear-agl-ft</property>
<value>18</value>
</less-than>
<or>
<and>
<less-than>
<property>/position/gear-agl-ft</property>
<value>18</value>
</less-than>
<equals>
<property>/it-autoflight/output/ap1</property>
<value>0</value>
</equals>
<equals>
<property>/it-autoflight/output/ap2</property>
<value>0</value>
</equals>
</and>
<and>
<less-than>
<property>/position/gear-agl-ft</property>
<value>8</value>
</less-than>
<or>
<equals>
<property>/it-autoflight/output/ap1</property>
<value>1</value>
</equals>
<equals>
<property>/it-autoflight/output/ap2</property>
<value>1</value>
</equals>
</or>
</and>
</or>
<greater-than>
<property>controls/engines/engine[0]/throttle</property>
<value>0.0</value>
@ -192,7 +316,6 @@
<volume>
<property>/sim/sound/effects/volume</property>
</volume>
<type>avionics</type>
</retard>
<apoff>

Binary file not shown.

Binary file not shown.

BIN
Sounds/GPWS/altitude-5.wav Normal file

Binary file not shown.

Binary file not shown.