feat: Add support for ASOCTD, ALQDS, and HALO remark modifiers
Co-authored-by: aider (gemini/gemini-2.5-pro) <aider@aider.chat>
This commit is contained in:
+20
@@ -277,10 +277,16 @@
|
|||||||
decoded.push(` - ${decodeObscurationRemark(part)}`);
|
decoded.push(` - ${decodeObscurationRemark(part)}`);
|
||||||
} else if (part.match(/^([A-Z]{2}\d)+$/)) {
|
} else if (part.match(/^([A-Z]{2}\d)+$/)) {
|
||||||
decoded.push(` - ${decodeCloudTypesRemark(part, metarString)}`);
|
decoded.push(` - ${decodeCloudTypesRemark(part, metarString)}`);
|
||||||
|
} else if (part === 'VIRGA' && i + 1 < parts.length && parts[i+1] === 'ALQDS') {
|
||||||
|
decoded.push(` - VIRGA ALQDS: Virga in all quadrants`);
|
||||||
|
i++; // Consume ALQDS
|
||||||
} else if (part === 'VIRGA' && i + 1 < parts.length && directions[parts[i+1]]) {
|
} else if (part === 'VIRGA' && i + 1 < parts.length && directions[parts[i+1]]) {
|
||||||
const direction = directions[parts[i+1]];
|
const direction = directions[parts[i+1]];
|
||||||
decoded.push(` - VIRGA ${parts[i+1]}: Virga to the ${direction.toLowerCase()}`);
|
decoded.push(` - VIRGA ${parts[i+1]}: Virga to the ${direction.toLowerCase()}`);
|
||||||
i++; // Consume direction part
|
i++; // Consume direction part
|
||||||
|
} else if (part === 'TCU' && i + 1 < parts.length && parts[i+1] === 'ALQDS') {
|
||||||
|
decoded.push(` - TCU ALQDS: Towering cumulus in all quadrants`);
|
||||||
|
i++; // Consume ALQDS
|
||||||
} else if (part === 'TCU' && i + 2 < parts.length && parts[i+1] === 'DSNT' && directions[parts[i+2]]) {
|
} else if (part === 'TCU' && i + 2 < parts.length && parts[i+1] === 'DSNT' && directions[parts[i+2]]) {
|
||||||
const direction = directions[parts[i+2]];
|
const direction = directions[parts[i+2]];
|
||||||
decoded.push(` - TCU DSNT ${parts[i+2]}: Towering cumulus distant ${direction.toLowerCase()}`);
|
decoded.push(` - TCU DSNT ${parts[i+2]}: Towering cumulus distant ${direction.toLowerCase()}`);
|
||||||
@@ -301,6 +307,20 @@
|
|||||||
}
|
}
|
||||||
decoded.push(remark);
|
decoded.push(remark);
|
||||||
i += consumed;
|
i += consumed;
|
||||||
|
} else if (cloudTypes[part] && i + 1 < parts.length && parts[i+1] === 'ASOCTD') {
|
||||||
|
const cloudName = cloudTypes[part];
|
||||||
|
let remark = ` - ${part} ASOCTD: ${cloudName} associated`;
|
||||||
|
let consumed = 1;
|
||||||
|
if (i + 3 < parts.length && parts[i+2] === '/' && parts[i+3] === 'HALO') {
|
||||||
|
remark = ` - ${part} ASOCTD / HALO: ${cloudName} associated with Halo phenomenon`;
|
||||||
|
consumed = 3;
|
||||||
|
}
|
||||||
|
decoded.push(remark);
|
||||||
|
i += consumed;
|
||||||
|
} else if (cloudTypes[part] && i + 1 < parts.length && parts[i+1] === 'ALQDS') {
|
||||||
|
const cloudName = cloudTypes[part];
|
||||||
|
decoded.push(` - ${part} ALQDS: ${cloudName} in all quadrants`);
|
||||||
|
i++; // Consume ALQDS
|
||||||
} else if (specialRemarks[part]) {
|
} else if (specialRemarks[part]) {
|
||||||
decoded.push(` - ${part}: ${specialRemarks[part]}`);
|
decoded.push(` - ${part}: ${specialRemarks[part]}`);
|
||||||
} else if (cloudTypes[part] && i + 1 < parts.length && parts[i + 1] === 'TR') {
|
} else if (cloudTypes[part] && i + 1 < parts.length && parts[i + 1] === 'TR') {
|
||||||
|
|||||||
Reference in New Issue
Block a user