fix: Handle HALO remarks and ignore '/' separator in METAR

Co-authored-by: aider (gemini/gemini-2.5-pro) <aider@aider.chat>
This commit is contained in:
2026-02-14 15:56:22 -07:00
parent 5c3550189a
commit 1c216d5761
+4 -1
View File
@@ -262,7 +262,8 @@
const specialRemarks = { const specialRemarks = {
'FROIN': 'Frontal passage in vicinity', 'FROIN': 'Frontal passage in vicinity',
'CONTRAILS': 'Contrails observed', 'CONTRAILS': 'Contrails observed',
'VIRGA': 'Virga (precipitation not reaching the ground)' 'VIRGA': 'Virga (precipitation not reaching the ground)',
'HALO': 'Halo phenomenon observed'
}; };
const directions = { const directions = {
'N': 'North', 'NE': 'Northeast', 'E': 'East', 'SE': 'Southeast', 'N': 'North', 'NE': 'Northeast', 'E': 'East', 'SE': 'Southeast',
@@ -335,6 +336,8 @@
decoded.push(` - ${decodeWeather(part, metarString)}`); decoded.push(` - ${decodeWeather(part, metarString)}`);
} else if (part.match(/^(AC|CI|CC)/)) { } else if (part.match(/^(AC|CI|CC)/)) {
decoded.push(` - ${part}: Cloud types and coverage details`); decoded.push(` - ${part}: Cloud types and coverage details`);
} else if (part === '/') {
// separator, ignore
} else { } else {
console.log(`Other remark: ${part} in METAR: ${metarString}`); console.log(`Other remark: ${part} in METAR: ${metarString}`);
decoded.push(` - ${part}: Other remark`); decoded.push(` - ${part}: Other remark`);