From d36a6999e28c135868170b652460c81a085f1bd9 Mon Sep 17 00:00:00 2001 From: Tanner Collin Date: Sat, 14 Feb 2026 18:16:26 -0700 Subject: [PATCH] fix: Correctly parse AUTO as automated observation indicator Co-authored-by: aider (gemini/gemini-2.5-pro) --- metar.html | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/metar.html b/metar.html index 9aca05d..3813440 100644 --- a/metar.html +++ b/metar.html @@ -743,7 +743,11 @@ while(index < parts.length && !preambleEnded) { const part = parts[index]; - if (part.length === 4 && part.match(/^[A-Z][A-Z0-9]{3}$/)) { + if (part === 'AUTO') { + airportTimeAutoRaw.push(part); + airportTimeAutoDecoded.push("AUTO: Fully automated observation"); + index++; + } else if (part.length === 4 && part.match(/^[A-Z][A-Z0-9]{3}$/)) { airportTimeAutoRaw.push(part); airportTimeAutoDecoded.push(decodeAirport(part, metarString)); index++; @@ -751,10 +755,6 @@ airportTimeAutoRaw.push(part); airportTimeAutoDecoded.push(decodeTime(part)); index++; - } else if (part === 'AUTO') { - airportTimeAutoRaw.push(part); - airportTimeAutoDecoded.push("AUTO: Fully automated observation"); - index++; } else if (part.match(/^CC[A-Z]$/)) { airportTimeAutoRaw.push(part); airportTimeAutoDecoded.push(`${part}: Correction to the report`);