From 2477187dc7a62277bd922e7d33ff4ebc092188dd Mon Sep 17 00:00:00 2001 From: legoboyvdlp R Date: Fri, 4 Dec 2020 18:34:52 +0000 Subject: [PATCH] Lower ECAM: display of gross weight now comes from FMGC. So it is dashed in phase 1, and also in future will be inaccurate if you enter bad ZFW --- Models/Instruments/Lower-ECAM/Lower-ECAM.nas | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/Models/Instruments/Lower-ECAM/Lower-ECAM.nas b/Models/Instruments/Lower-ECAM/Lower-ECAM.nas index cfc1cc34..cbfddbc6 100644 --- a/Models/Instruments/Lower-ECAM/Lower-ECAM.nas +++ b/Models/Instruments/Lower-ECAM/Lower-ECAM.nas @@ -510,12 +510,21 @@ var canvas_lowerECAM_base = { me["UTCh"].setText(sprintf("%02d", hour.getValue())); me["UTCm"].setText(sprintf("%02d", minute.getValue())); - me.gwStore = pts.Fdm.JSBsim.Inertia.weightLbs.getValue(); + if (fmgc.FMGCInternal.fuelRequest and fmgc.FMGCInternal.blockConfirmed and !fmgc.FMGCInternal.fuelCalculating and ecam.phaseNode.getValue() != 1) { + if (acconfig_weight_kgs.getValue()) { + me["GW"].setText(sprintf("%s", math.round(fmgc.FMGCInternal.fuelPredGw * 1000 * LBS2KGS, 100))); + } else { + me["GW"].setText(sprintf("%s", math.round(fmgc.FMGCInternal.fuelPredGw * 1000, 100))); + } + me["GW"].setColor(0.0509,0.7529,0.2941); + } else { + me["GW"].setText(sprintf("%s", "-----")); + me["GW"].setColor(0.0901,0.6039,0.7176); + } + if (acconfig_weight_kgs.getValue()) { - me["GW"].setText(sprintf("%s", math.round(math.round(me.gwStore * LBS2KGS, 100)))); me["GW-weight-unit"].setText("KG"); } else { - me["GW"].setText(sprintf("%s", math.round(me.gwStore, 100))); me["GW-weight-unit"].setText("LBS"); } },