1
0
Fork 0

Fix block fuel if using auto-start

This commit is contained in:
Matthew Maring 2020-05-26 15:45:07 -04:00
parent 6f698bf473
commit ebe67398a2

View file

@ -151,6 +151,14 @@ var fuelPredInput = func(key, i) {
var zfw = getprop("/fdm/jsbsim/inertia/weight-lbs") - getprop("/consumables/fuel/total-fuel-lbs");
setprop("/FMGC/internal/zfw", sprintf("%3.1f", math.round(zfw / 1000, 0.1)));
setprop("/FMGC/internal/zfw-set", 1);
if (getprop("/FMGC/internal/block-set") != 1) {
setprop("/FMGC/internal/block", num(getprop("consumables/fuel/total-fuel-lbs") / 1000));
setprop("/FMGC/internal/block-set", 1);
setprop("/FMGC/internal/fuel-request-set", 1);
setprop("/FMGC/internal/fuel-calculating", 1);
setprop("/FMGC/internal/block-calculating", 0);
setprop("/FMGC/internal/block-confirmed", 1);
}
} else if (tfs >= 2 and tfs <= 11 and find("/", scratchpad) != -1) {
var zfwi = split("/", scratchpad);
var zfwcg = num(zfwi[0]);