Some slight modifications to the generic CDU: YASim compatibility for weight calculations and changed erroneous documentation
This commit is contained in:
parent
6d62113a0c
commit
98277733d5
2 changed files with 21 additions and 6 deletions
|
@ -22,7 +22,7 @@ Add the following tags below the </sim> tag of your aircraft's -set.xml file.
|
|||
</config>
|
||||
<display>IDENT</display>
|
||||
<ident>
|
||||
<type>747-400</type>
|
||||
<model>747-400</model>
|
||||
<engines>-80C2B1F</engines>
|
||||
</ident>
|
||||
<input type="string"/>
|
||||
|
@ -48,4 +48,4 @@ Each single CDU unit must be set in your aircraft's model .xml file, like:
|
|||
|
||||
Currently there are two textures to choose from:
|
||||
- boeing_brown.png
|
||||
- boeing_grey.png
|
||||
- boeing_grey.png
|
||||
|
|
|
@ -103,14 +103,29 @@ var cdu = func{
|
|||
if (page == "PERF_INIT") {
|
||||
title = "PERF INIT";
|
||||
line1lt = "GR WT";
|
||||
line1l = sprintf("%3.1f", (getprop("/fdm/jsbsim/inertia/weight-lbs")/1000));
|
||||
line1rt = "CRZ ALT";
|
||||
line2lt = "FUEL";
|
||||
line2l = sprintf("%3.1f", (getprop("/fdm/jsbsim/propulsion/total-fuel-lbs")/1000));
|
||||
line3lt = "ZFW";
|
||||
line3l = sprintf("%3.1f", (getprop("/fdm/jsbsim/inertia/empty-weight-lbs")/1000));
|
||||
line6l = "<INDEX";
|
||||
line6r = "THRUST LIM>";
|
||||
if (getprop("/sim/flight-model") == "jsb") {
|
||||
line1l = sprintf("%3.1f", (getprop("/fdm/jsbsim/inertia/weight-lbs")/1000));
|
||||
line2l = sprintf("%3.1f", (getprop("/fdm/jsbsim/propulsion/total-fuel-lbs")/1000));
|
||||
line3l = sprintf("%3.1f", (getprop("/fdm/jsbsim/inertia/empty-weight-lbs")/1000));
|
||||
}
|
||||
elsif (getprop("/sim/flight-model") == "yasim") {
|
||||
line1l = sprintf("%3.1f", (getprop("/yasim/gross-weight-lbs")/1000));
|
||||
line2l = sprintf("%3.1f", (getprop("/consumables/fuel/total-fuel-lbs")/1000));
|
||||
|
||||
yasim_emptyweight = line1l;
|
||||
yasim_weights = props.globals.getNode("/sim").getChildren("weight");
|
||||
for (i = 0; i < size(yasim_weights); i += 1) {
|
||||
yasim_emptyweight -= yasim_weights[i].getValue();
|
||||
}
|
||||
yasim_emptyweight -= line2l;
|
||||
|
||||
line3l = sprintf("%3.1f", yasim_emptyweight/1000);
|
||||
}
|
||||
}
|
||||
if (page == "POS_INIT") {
|
||||
title = "POS INIT";
|
||||
|
@ -204,4 +219,4 @@ var cdu = func{
|
|||
setprop("/instrumentation/cdu/output/line6/right-title",line6rt);
|
||||
settimer(cdu,0.2);
|
||||
}
|
||||
_setlistener("/sim/signals/fdm-initialized", cdu);
|
||||
_setlistener("/sim/signals/fdm-initialized", cdu);
|
||||
|
|
Loading…
Add table
Reference in a new issue