Manual audit fixes A/E/F: fuel totalizer, Victor/Jet airways, TIME TO BOD

A — Fuel totalizer (SYSTEM key, renamed from ENGINE): DEC/INC/RST FUEL had no
handler. Now adjust the fuel_totalizer_sum_kg dataref (±1 gal, RST→max fuel) and
the EIS shows the calculated remaining/used. cdiSrc-style writable + demo echo.

E — AIRWAYS: was a single on/off. earth_awy.dat field 8 (airway layer) is now
parsed (1=Victor/low, 2=Jet/high; name-prefix fallback), the bbox returns it, and
the AIRWAYS softkey cycles off→all→Victor→Jet with an AIRWY-LO/-HI label.

F — CURRENT VNV PROFILE now shows TIME TO BOD (bottom of descent) once past the
top of descent, instead of only TIME TO TOD.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-06-04 00:59:00 +02:00
parent 502fa249a0
commit 5db22c85bc
7 changed files with 44 additions and 9 deletions
+5 -1
View File
@@ -167,9 +167,13 @@ async function parseAirways(file) {
const b = index.get((p[3] || '').toUpperCase());
if (!a || !b) continue; // endpoint not in our database
const name = p[p.length - 1];
// Field 8 (index 7) = airway layer: 1 = low/Victor, 2 = high/Jet (used by the
// MFD AIRWAYS key to show all / Victor-only / Jet-only). Fall back to the name
// prefix (V… = low, J… = high) if the field is missing.
const lyr = +p[7] === 1 ? 1 : +p[7] === 2 ? 2 : /^J/i.test(name) ? 2 : /^V/i.test(name) ? 1 : 0;
const k = `${Math.floor((a.lat + b.lat) / 2)},${Math.floor((a.lon + b.lon) / 2)}`;
let arr = awyCells.get(k); if (!arr) { arr = []; awyCells.set(k, arr); }
arr.push({ la1: a.lat, lo1: a.lon, la2: b.lat, lo2: b.lon, name });
arr.push({ la1: a.lat, lo1: a.lon, la2: b.lat, lo2: b.lon, name, lyr });
state.awy++;
}
}