Merge branch '3D' into 3D-flightdeck
This commit is contained in:
commit
2f8bdb28d7
15 changed files with 110 additions and 53 deletions
|
@ -18,7 +18,7 @@
|
|||
<property>environment/relative-humidity</property>
|
||||
<value>0.075</value>
|
||||
</product>
|
||||
<property>fdm/jsbsim/aero/alpha-deg-norm</property>
|
||||
<property>fdm/jsbsim/aero/alpha-deg-fixed</property>
|
||||
</sum>
|
||||
</expression>
|
||||
<value>13.5</value>
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
<property>environment/relative-humidity</property>
|
||||
<value>0.075</value>
|
||||
</product>
|
||||
<property>fdm/jsbsim/aero/alpha-deg-norm</property>
|
||||
<property>fdm/jsbsim/aero/alpha-deg-fixed</property>
|
||||
</sum>
|
||||
</expression>
|
||||
<value>13.5</value>
|
||||
|
|
|
@ -3014,7 +3014,7 @@
|
|||
<name>AOA Vane L1</name>
|
||||
<type>rotate</type>
|
||||
<object-name>AOASensorL1</object-name>
|
||||
<property>fdm/jsbsim/aero/alpha-deg-norm</property>
|
||||
<property>fdm/jsbsim/aero/alpha-deg-fixed</property>
|
||||
<interpolation>
|
||||
<entry><ind>-60</ind><dep>85</dep></entry>
|
||||
<entry><ind>-35</ind><dep>60</dep></entry>
|
||||
|
@ -3038,7 +3038,7 @@
|
|||
<name>AOA Vane R</name>
|
||||
<type>rotate</type>
|
||||
<object-name>AOASensorR</object-name>
|
||||
<property>fdm/jsbsim/aero/alpha-deg-norm</property>
|
||||
<property>fdm/jsbsim/aero/alpha-deg-fixed</property>
|
||||
<interpolation>
|
||||
<entry><ind>-60</ind><dep>-85</dep></entry>
|
||||
<entry><ind>-35</ind><dep>-60</dep></entry>
|
||||
|
@ -3062,7 +3062,7 @@
|
|||
<name>AOA Vane L2</name>
|
||||
<type>rotate</type>
|
||||
<object-name>AOASensorL2</object-name>
|
||||
<property>fdm/jsbsim/aero/alpha-deg-norm</property>
|
||||
<property>fdm/jsbsim/aero/alpha-deg-fixed</property>
|
||||
<interpolation>
|
||||
<entry><ind>-60</ind><dep>85</dep></entry>
|
||||
<entry><ind>-35</ind><dep>60</dep></entry>
|
||||
|
|
|
@ -89,6 +89,8 @@ var canvas_pfd = {
|
|||
tgt_kts: 0,
|
||||
tgt_ias: 0,
|
||||
vapp: 0,
|
||||
valphaprot: 0,
|
||||
valphamax: 0,
|
||||
vls: 0,
|
||||
new: func(svg, name, number) {
|
||||
var obj = {parents: [canvas_pfd] };
|
||||
|
@ -656,6 +658,9 @@ var canvas_pfd = {
|
|||
|
||||
if (!fmgc.FMGCInternal.takeoffState and fmgc.FMGCInternal.phase >= 1 and !notification.gear1Wow and !notification.gear2Wow) {
|
||||
me.vls = fmgc.FMGCNodes.vls.getValue();
|
||||
me.valphaprot = fmgc.FMGCNodes.valphaProt.getValue();
|
||||
me.valphamax = fmgc.FMGCNodes.valphaMax.getValue();
|
||||
|
||||
if (me.vls <= 30) {
|
||||
me.VLSmin = 0 - me.ASI;
|
||||
} else if (me.vls >= 420) {
|
||||
|
@ -664,20 +669,20 @@ var canvas_pfd = {
|
|||
me.VLSmin = me.vls - 30 - me.ASI;
|
||||
}
|
||||
|
||||
if (fmgc.FMGCInternal.alpha_prot <= 30) {
|
||||
if (me.valphaprot <= 30) {
|
||||
me.ALPHAprot = 0 - me.ASI;
|
||||
} else if (fmgc.FMGCInternal.alpha_prot >= 420) {
|
||||
} else if (me.valphaprot >= 420) {
|
||||
me.ALPHAprot = 390 - me.ASI;
|
||||
} else {
|
||||
me.ALPHAprot = fmgc.FMGCInternal.alpha_prot - 30 - me.ASI;
|
||||
me.ALPHAprot = me.valphaprot - 30 - me.ASI;
|
||||
}
|
||||
|
||||
if (fmgc.FMGCInternal.alpha_max <= 30) {
|
||||
if (me.valphamax <= 30) {
|
||||
me.ALPHAmax = 0 - me.ASI;
|
||||
} else if (fmgc.FMGCInternal.alpha_max >= 420) {
|
||||
} else if (me.valphamax >= 420) {
|
||||
me.ALPHAmax = 390 - me.ASI;
|
||||
} else {
|
||||
me.ALPHAmax = fmgc.FMGCInternal.alpha_max - 30 - me.ASI;
|
||||
me.ALPHAmax = me.valphamax - 30 - me.ASI;
|
||||
}
|
||||
|
||||
if (fmgc.FMGCInternal.vsw <= 30) {
|
||||
|
|
|
@ -261,6 +261,7 @@ var FMGCNodes = {
|
|||
clean: props.globals.getNode("/FMGC/internal/clean"),
|
||||
flap2: props.globals.getNode("/FMGC/internal/flap-2"),
|
||||
flap3: props.globals.getNode("/FMGC/internal/flap-3"),
|
||||
ktsToMachFactor: props.globals.getNode("/FMGC/internal/kts-to-mach-factor"),
|
||||
lw: props.globals.getNode("/FMGC/internal/lw"),
|
||||
lwClean: props.globals.getNode("/FMGC/internal/lw-clean"),
|
||||
lwVs1gConf0: props.globals.getNode("/FMGC/internal/lw-vs1g-conf-0"),
|
||||
|
@ -269,14 +270,13 @@ var FMGCNodes = {
|
|||
lwVs1gConf3: props.globals.getNode("/FMGC/internal/lw-vs1g-conf-3"),
|
||||
lwVs1gConfFull: props.globals.getNode("/FMGC/internal/lw-vs1g-conf-full"),
|
||||
mngSpdAlt: props.globals.getNode("/FMGC/internal/mng-alt-spd"),
|
||||
ktsToMachFactor: props.globals.getNode("/FMGC/internal/kts-to-mach-factor"),
|
||||
machToKtsFactor: props.globals.getNode("/FMGC/internal/mach-to-kts-factor"),
|
||||
mngMachAlt: props.globals.getNode("/FMGC/internal/mng-alt-mach"),
|
||||
slat: props.globals.getNode("/FMGC/internal/slat"),
|
||||
Power: {
|
||||
FMGC1Powered: props.globals.getNode("systems/fmgc/power/power-1-on"),
|
||||
FMGC2Powered: props.globals.getNode("systems/fmgc/power/power-2-on"),
|
||||
},
|
||||
slat: props.globals.getNode("/FMGC/internal/slat"),
|
||||
toFromSet: props.globals.initNode("/FMGC/internal/tofrom-set", 0, "BOOL"),
|
||||
toState: props.globals.initNode("/FMGC/internal/to-state", 0, "BOOL"),
|
||||
tow: props.globals.getNode("/FMGC/internal/tow"),
|
||||
|
@ -289,6 +289,8 @@ var FMGCNodes = {
|
|||
v1: props.globals.initNode("/FMGC/internal/v1", 0, "DOUBLE"),
|
||||
v1set: props.globals.initNode("/FMGC/internal/v1-set", 0, "BOOL"),
|
||||
phase: props.globals.initNode("/FMGC/internal/phase", 0, "INT"),
|
||||
valphaMax: props.globals.getNode("/FMGC/internal/valpha-max"),
|
||||
valphaProt: props.globals.getNode("/FMGC/internal/valpha-prot"),
|
||||
vls: props.globals.getNode("/FMGC/internal/vls"),
|
||||
vmax: props.globals.getNode("/FMGC/internal/vmax"),
|
||||
vs1g: props.globals.getNode("/FMGC/internal/vs1g"),
|
||||
|
@ -823,8 +825,8 @@ var masterFMGC = maketimer(0.2, func {
|
|||
aoa = getprop("/systems/navigation/adr/output/aoa-1");
|
||||
cas = getprop("/systems/navigation/adr/output/cas-1");
|
||||
if (aoa > -5) {
|
||||
FMGCInternal.alpha_prot = cas * math.sqrt((aoa - aoa_0)/(aoa_prot - aoa_0));
|
||||
FMGCInternal.alpha_max = cas * math.sqrt((aoa - aoa_0)/(aoa_max - aoa_0));
|
||||
FMGCInternal.alpha_prot = FMGCNodes.valphaProt.getValue();
|
||||
FMGCInternal.alpha_max = FMGCNodes.valphaMax.getValue();
|
||||
} else {
|
||||
FMGCInternal.alpha_prot = 0;
|
||||
FMGCInternal.alpha_max = 0;
|
||||
|
|
|
@ -107,7 +107,7 @@ var Fdm = {
|
|||
JSBsim: {
|
||||
Aero: {
|
||||
alpha: props.globals.getNode("/fdm/jsbsim/aero/alpha-deg"),
|
||||
alphaNorm: props.globals.getNode("/fdm/jsbsim/aero/alpha-deg-norm"),
|
||||
alphaNorm: props.globals.getNode("/fdm/jsbsim/aero/alpha-deg-fixed"),
|
||||
},
|
||||
Fadec: {
|
||||
detent: [props.globals.getNode("/fdm/jsbsim/fadec/control-1/detent"),props.globals.getNode("/fdm/jsbsim/fadec/control-2/detent")],
|
||||
|
|
|
@ -51,7 +51,7 @@
|
|||
</fcs_function>
|
||||
|
||||
<sensor name="/systems/navigation/probes/aoa-1">
|
||||
<input>aero/alpha-deg-norm</input>
|
||||
<input>aero/alpha-deg-fixed</input>
|
||||
<quantization name="/systems/navigation/adr/output/aoa-1">
|
||||
<bits>12</bits>
|
||||
<min>-180</min>
|
||||
|
@ -60,7 +60,7 @@
|
|||
</sensor>
|
||||
|
||||
<sensor name="/systems/navigation/probes/aoa-2">
|
||||
<input>aero/alpha-deg-norm</input>
|
||||
<input>aero/alpha-deg-fixed</input>
|
||||
<quantization name="/systems/navigation/adr/output/aoa-2">
|
||||
<bits>12</bits>
|
||||
<min>-180</min>
|
||||
|
@ -69,7 +69,7 @@
|
|||
</sensor>
|
||||
|
||||
<sensor name="/systems/navigation/probes/aoa-3">
|
||||
<input>aero/alpha-deg-norm</input>
|
||||
<input>aero/alpha-deg-fixed</input>
|
||||
<quantization name="/systems/navigation/adr/output/aoa-3">
|
||||
<bits>12</bits>
|
||||
<min>-180</min>
|
||||
|
|
|
@ -1009,7 +1009,7 @@
|
|||
|
||||
<!-- Alpha Floor and Toga Lk -->
|
||||
<switch name="fadec/alpha-floor-engage">
|
||||
<default value="9.5"/>
|
||||
<default value="14.5"/>
|
||||
<test logic="OR" value="15">
|
||||
/controls/flight/flaps-pos eq 1
|
||||
/controls/flight/flaps-pos eq 2
|
||||
|
|
|
@ -70,12 +70,25 @@
|
|||
</test>
|
||||
</switch>
|
||||
|
||||
<fcs_function name="fbw/stall-alpha-deg">
|
||||
<function>
|
||||
<table>
|
||||
<independentVar lookup="row">atmosphere/density-altitude</independentVar>
|
||||
<tableData>
|
||||
0 15.5
|
||||
43000 8.3
|
||||
</tableData>
|
||||
</table>
|
||||
</function>
|
||||
</fcs_function>
|
||||
|
||||
<switch name="fbw/protections/overspeed">
|
||||
<default value="fbw/protections/overspeed"/>
|
||||
<test logic="OR" value="0">
|
||||
position/wow eq 1
|
||||
/it-fbw/law ne 0
|
||||
/instrumentation/airspeed-indicator/indicated-speed-kt le /FMGC/internal/vmo-mmo
|
||||
aero/alpha-deg-damped ge fbw/stall-alpha-deg
|
||||
</test>
|
||||
<test value="1">
|
||||
/instrumentation/airspeed-indicator/indicated-speed-kt ge /FMGC/internal/vmo-mmo-plus-6
|
||||
|
@ -1461,16 +1474,32 @@
|
|||
</function>
|
||||
</fcs_function>
|
||||
|
||||
<summer name="fbw/pitch/stall-alpha-error">
|
||||
<input>aero/alpha-deg-fixed</input>
|
||||
<input>-fbw/stall-alpha-deg</input>
|
||||
</summer>
|
||||
|
||||
<fcs_function name="fbw/pitch/e-i-min">
|
||||
<function>
|
||||
<table>
|
||||
<independentVar lookup="row">fbw/pitch/max-rad-error</independentVar>
|
||||
<tableData>
|
||||
-0.087266 -1.0
|
||||
-0.034907 -0.1
|
||||
0.000000 0.0
|
||||
</tableData>
|
||||
</table>
|
||||
<max>
|
||||
<table>
|
||||
<independentVar lookup="row">fbw/pitch/max-rad-error</independentVar>
|
||||
<tableData>
|
||||
-0.087266 -1.0
|
||||
-0.034907 -0.1
|
||||
0.000000 0.0
|
||||
</tableData>
|
||||
</table>
|
||||
<table>
|
||||
<independentVar lookup="row">fbw/pitch/stall-alpha-error</independentVar>
|
||||
<independentVar lookup="column">/it-fbw/law</independentVar>
|
||||
<tableData>
|
||||
0 1
|
||||
-2.5 -1 -1
|
||||
0.0 0 -1
|
||||
</tableData>
|
||||
</table>
|
||||
</max>
|
||||
</function>
|
||||
</fcs_function>
|
||||
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
<!-- Copyright (c) 2022 Josh Davidson and Jonathan Redpath -->
|
||||
|
||||
<system name="A320: FMGC">
|
||||
|
||||
<property value="350">/FMGC/internal/vmo-kts</property>
|
||||
|
||||
<channel name="FMGC Power" execrate="8">
|
||||
|
@ -189,6 +190,34 @@
|
|||
</function>
|
||||
</fcs_function>
|
||||
|
||||
<!-- V alpha prot/max -->
|
||||
<lag_filter name="/FMGC/internal/valphadot-lag">
|
||||
<input>aero/alphadot-rad_sec</input>
|
||||
<c1>0.75</c1>
|
||||
</lag_filter>
|
||||
|
||||
<pure_gain name="/FMGC/internal/valphadot-offset">
|
||||
<input>/FMGC/internal/valphadot-lag</input>
|
||||
<gain>125</gain>
|
||||
</pure_gain>
|
||||
|
||||
<fcs_function name="/FMGC/internal/valpha-prot">
|
||||
<function>
|
||||
<sum>
|
||||
<product>
|
||||
<property>/FMGC/internal/vs1g-kts</property>
|
||||
<value>1.09</value>
|
||||
</product>
|
||||
<property>/FMGC/internal/valphadot-offset</property>
|
||||
</sum>
|
||||
</function>
|
||||
</fcs_function>
|
||||
|
||||
<summer name="/FMGC/internal/valpha-max">
|
||||
<input>/FMGC/internal/vs1g-kts</input>
|
||||
<input>/FMGC/internal/valphadot-offset</input>
|
||||
</summer>
|
||||
|
||||
<!-- Extra VS1g tables for predictions etc -->
|
||||
<fcs_function name="/FMGC/internal/vs1g-conf-0">
|
||||
<function>
|
||||
|
|
|
@ -142,7 +142,7 @@
|
|||
<scheduled_gain name="/systems/hydraulic/sources/rat/rat-airspeed-cmd">
|
||||
<input>velocities/vc-kts</input>
|
||||
<table>
|
||||
<independentVar lookup="row">aero/alpha-deg-norm</independentVar>
|
||||
<independentVar lookup="row">aero/alpha-deg-fixed</independentVar>
|
||||
<tableData>
|
||||
-60 0
|
||||
0 1
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
<channel name="FDM Rate Libraries">
|
||||
|
||||
<switch name="aero/alpha-deg-norm">
|
||||
<switch name="aero/alpha-deg-fixed">
|
||||
<default value="0"/>
|
||||
<test value="aero/alpha-deg">
|
||||
gear/unit[0]/WOW eq 0
|
||||
|
@ -15,7 +15,7 @@
|
|||
</switch>
|
||||
|
||||
<lag_filter name="aero/alpha-deg-damped">
|
||||
<input>aero/alpha-deg-norm</input>
|
||||
<input>aero/alpha-deg-fixed</input>
|
||||
<c1>10</c1>
|
||||
</lag_filter>
|
||||
|
||||
|
|
|
@ -242,7 +242,6 @@
|
|||
<test logic="AND" value="hydraulics/spoiler-l2/retracted">
|
||||
/systems/hydraulic/yellow-psi ge 1500
|
||||
/systems/failures/spoilers/spoiler-l2 eq 0
|
||||
spoilers/main-cmd eq 0
|
||||
</test>
|
||||
<clipto>
|
||||
<min>0.0</min>
|
||||
|
@ -338,7 +337,6 @@
|
|||
<test logic="AND" value="hydraulics/spoiler-l3/retracted">
|
||||
/systems/hydraulic/blue-psi ge 1500
|
||||
/systems/failures/spoilers/spoiler-l3 eq 0
|
||||
spoilers/main-cmd eq 0
|
||||
</test>
|
||||
<clipto>
|
||||
<min>0.0</min>
|
||||
|
@ -434,7 +432,6 @@
|
|||
<test logic="AND" value="hydraulics/spoiler-l4/retracted">
|
||||
/systems/hydraulic/yellow-psi ge 1500
|
||||
/systems/failures/spoilers/spoiler-l4 eq 0
|
||||
spoilers/main-cmd eq 0
|
||||
</test>
|
||||
<clipto>
|
||||
<min>0.0</min>
|
||||
|
@ -506,7 +503,6 @@
|
|||
<test logic="AND" value="hydraulics/spoiler-l5/retracted">
|
||||
/systems/hydraulic/green-psi ge 1500
|
||||
/systems/failures/spoilers/spoiler-l5 eq 0
|
||||
spoilers/main-cmd eq 0
|
||||
</test>
|
||||
<clipto>
|
||||
<min>0.0</min>
|
||||
|
@ -663,7 +659,6 @@
|
|||
<test logic="AND" value="hydraulics/spoiler-r2/retracted">
|
||||
/systems/hydraulic/yellow-psi ge 1500
|
||||
/systems/failures/spoilers/spoiler-r2 eq 0
|
||||
spoilers/main-cmd eq 0
|
||||
</test>
|
||||
<clipto>
|
||||
<min>0.0</min>
|
||||
|
@ -704,8 +699,8 @@
|
|||
<table>
|
||||
<independentVar lookup="row">fbw/roll/s-r-3</independentVar>
|
||||
<tableData>
|
||||
0.0 0.0
|
||||
1.0 -0.7
|
||||
-1.0 -0.7
|
||||
0.0 0.0
|
||||
</tableData>
|
||||
</table>
|
||||
</sum>
|
||||
|
@ -722,8 +717,8 @@
|
|||
<table>
|
||||
<independentVar lookup="row">fbw/roll/s-r-3</independentVar>
|
||||
<tableData>
|
||||
0.0 0.0
|
||||
1.0 -0.7
|
||||
-1.0 -0.7
|
||||
0.0 0.0
|
||||
</tableData>
|
||||
</table>
|
||||
</sum>
|
||||
|
@ -735,8 +730,8 @@
|
|||
<table>
|
||||
<independentVar lookup="row">fbw/roll/s-r-3</independentVar>
|
||||
<tableData>
|
||||
0.0 0.0
|
||||
1.0 0.7
|
||||
0.0 0.0
|
||||
1.0 0.7
|
||||
</tableData>
|
||||
</table>
|
||||
</function>
|
||||
|
@ -759,7 +754,6 @@
|
|||
<test logic="AND" value="hydraulics/spoiler-r3/retracted">
|
||||
/systems/hydraulic/blue-psi ge 1500
|
||||
/systems/failures/spoilers/spoiler-r3 eq 0
|
||||
spoilers/main-cmd eq 0
|
||||
</test>
|
||||
<clipto>
|
||||
<min>0.0</min>
|
||||
|
@ -800,8 +794,8 @@
|
|||
<table>
|
||||
<independentVar lookup="row">fbw/roll/s-r-4</independentVar>
|
||||
<tableData>
|
||||
0.0 0.0
|
||||
1.0 -0.7
|
||||
-1.0 -0.7
|
||||
0.0 0.0
|
||||
</tableData>
|
||||
</table>
|
||||
</sum>
|
||||
|
@ -818,8 +812,8 @@
|
|||
<table>
|
||||
<independentVar lookup="row">fbw/roll/s-r-4</independentVar>
|
||||
<tableData>
|
||||
0.0 0.0
|
||||
1.0 -0.7
|
||||
-1.0 -0.7
|
||||
0.0 0.0
|
||||
</tableData>
|
||||
</table>
|
||||
</sum>
|
||||
|
@ -831,8 +825,8 @@
|
|||
<table>
|
||||
<independentVar lookup="row">fbw/roll/s-r-4</independentVar>
|
||||
<tableData>
|
||||
0.0 0.0
|
||||
1.0 0.7
|
||||
0.0 0.0
|
||||
1.0 0.7
|
||||
</tableData>
|
||||
</table>
|
||||
</function>
|
||||
|
@ -855,7 +849,6 @@
|
|||
<test logic="AND" value="hydraulics/spoiler-r4/retracted">
|
||||
/systems/hydraulic/yellow-psi ge 1500
|
||||
/systems/failures/spoilers/spoiler-r4 eq 0
|
||||
spoilers/main-cmd eq 0
|
||||
</test>
|
||||
<clipto>
|
||||
<min>0.0</min>
|
||||
|
@ -927,7 +920,6 @@
|
|||
<test logic="AND" value="hydraulics/spoiler-r5/retracted">
|
||||
/systems/hydraulic/green-psi ge 1500
|
||||
/systems/failures/spoilers/spoiler-r5 eq 0
|
||||
spoilers/main-cmd eq 0
|
||||
</test>
|
||||
<clipto>
|
||||
<min>0.0</min>
|
||||
|
|
|
@ -1468,7 +1468,7 @@
|
|||
|
||||
<!-- Alpha Floor and Toga Lk -->
|
||||
<switch name="fadec/alpha-floor-engage">
|
||||
<default value="9.5"/>
|
||||
<default value="14.5"/>
|
||||
<test logic="OR" value="15">
|
||||
/controls/flight/flaps-pos eq 1
|
||||
/controls/flight/flaps-pos eq 2
|
||||
|
|
|
@ -55,7 +55,7 @@
|
|||
<entry><ind>1.00</ind><dep>0.010</dep></entry>
|
||||
</table>
|
||||
<table>
|
||||
<property>/fdm/jsbsim/aero/alpha-deg-norm</property>
|
||||
<property>/fdm/jsbsim/aero/alpha-deg-fixed</property>
|
||||
<entry><ind> 0.0</ind><dep>0.00</dep></entry>
|
||||
<entry><ind> 7.5</ind><dep>0.01</dep></entry>
|
||||
<entry><ind>17.0</ind><dep>0.03</dep></entry>
|
||||
|
|
Loading…
Reference in a new issue