Fixed weight calculation for YASim.
- Properties are below additional "weight-lb" branch. - Calculate empty weight based on lbs - not lbs/1000.
This commit is contained in:
parent
5ae5154a40
commit
44a4f82481
1 changed files with 4 additions and 4 deletions
|
@ -150,12 +150,12 @@ var cdu = func{
|
|||
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_emptyweight = getprop("/yasim/gross-weight-lbs");
|
||||
yasim_emptyweight -= getprop("/consumables/fuel/total-fuel-lbs");
|
||||
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 -= yasim_weights[i].getChild("weight-lb").getValue();
|
||||
}
|
||||
yasim_emptyweight -= line2l;
|
||||
|
||||
line3l = sprintf("%3.1f", yasim_emptyweight/1000);
|
||||
}
|
||||
|
@ -297,4 +297,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…
Reference in a new issue