|
From: <fli...@li...> - 2025-05-06 05:27:50
|
Revision: 12100
http://sourceforge.net/p/flightgear/fgaddon/12100
Author: octal450
Date: 2025-05-06 05:27:32 +0000 (Tue, 06 May 2025)
Log Message:
-----------
2020.3: MD-11: FMS OAT F entry bugfix
Modified Paths:
--------------
branches/release-2020.3/Aircraft/MD-11/Nasal/FMS/FlightData.nas
branches/release-2020.3/Aircraft/MD-11/Nasal/MCDU/toappr.nas
Modified: branches/release-2020.3/Aircraft/MD-11/Nasal/FMS/FlightData.nas
===================================================================
--- branches/release-2020.3/Aircraft/MD-11/Nasal/FMS/FlightData.nas 2025-05-06 05:27:16 UTC (rev 12099)
+++ branches/release-2020.3/Aircraft/MD-11/Nasal/FMS/FlightData.nas 2025-05-06 05:27:32 UTC (rev 12100)
@@ -40,6 +40,7 @@
landFlaps: 35,
lastGwZfw: 1, # Which was entered last
oatC: -100,
+ oatF: -200,
oatUnit: 0,
taxiFuel: 1.5,
taxiFuelSet: 0,
Modified: branches/release-2020.3/Aircraft/MD-11/Nasal/MCDU/toappr.nas
===================================================================
--- branches/release-2020.3/Aircraft/MD-11/Nasal/MCDU/toappr.nas 2025-05-06 05:27:16 UTC (rev 12099)
+++ branches/release-2020.3/Aircraft/MD-11/Nasal/MCDU/toappr.nas 2025-05-06 05:27:32 UTC (rev 12100)
@@ -78,7 +78,7 @@
};
m.Value = {
- oatCEntry: 0,
+ oatEntry: 0,
pw: 0,
takeoffStabDeg: 0,
tocg: "",
@@ -247,7 +247,7 @@
if (fms.FlightData.oatC > -100) {
if (fms.FlightData.oatUnit) {
- me.Display.R3 = sprintf("%d", math.round((fms.FlightData.oatC * 1.8) + 32)) ~ "F";
+ me.Display.R3 = sprintf("%d", fms.FlightData.oatF) ~ "F";
} else {
me.Display.R3 = sprintf("%d", fms.FlightData.oatC) ~ "C";
}
@@ -503,9 +503,10 @@
if (mcdu.unit[me.id].stringLengthInRange(1, 5)) {
me.scratchpad = string.replace(me.scratchpad, "+", "");
if (mcdu.unit[me.id].stringContains("F")) {
- me.Value.oatCEntry = math.round((string.replace(me.scratchpad, "F", "") - 32) / 1.8);
- if (me.Value.oatCEntry > -100 and me.Value.oatCEntry < 100) {
- fms.FlightData.oatC = me.Value.oatCEntry;
+ me.Value.oatEntry = int(string.replace(me.scratchpad, "F", ""));
+ if (me.Value.oatEntry >= -147 and me.Value.oatEntry <= 211) {
+ fms.FlightData.oatC = math.round((string.replace(me.scratchpad, "F", "") - 32) / 1.8);
+ fms.FlightData.oatF = me.Value.oatEntry;
fms.FlightData.oatUnit = 1;
fms.EditFlightData.resetVspeeds();
mcdu.unit[me.id].scratchpadClear();
@@ -513,9 +514,10 @@
mcdu.unit[me.id].setMessage("ENTRY OUT OF RANGE");
}
} else if (mcdu.unit[me.id].stringContains("C")) {
- me.Value.oatCEntry = int(string.replace(me.scratchpad, "C", ""));
- if (me.Value.oatCEntry > -100 and me.Value.oatCEntry < 100) {
- fms.FlightData.oatC = me.Value.oatCEntry;
+ me.Value.oatEntry = int(string.replace(me.scratchpad, "C", ""));
+ if (me.Value.oatEntry >= -99 and me.Value.oatEntry <= 99) {
+ fms.FlightData.oatC = me.Value.oatEntry;
+ fms.FlightData.oatF = math.round((me.Value.oatEntry * 1.8) + 32);
fms.FlightData.oatUnit = 0;
fms.EditFlightData.resetVspeeds();
mcdu.unit[me.id].scratchpadClear();
|