feat: Add decoding for density altitude and lenticular cloud remarks
Co-authored-by: aider (gemini/gemini-2.5-pro) <aider@aider.chat>
This commit is contained in:
+16
@@ -285,6 +285,22 @@
|
||||
const direction = directions[parts[i+2]];
|
||||
decoded.push(` - TCU DSNT ${parts[i+2]}: Towering cumulus distant ${direction.toLowerCase()}`);
|
||||
i += 2; // Consume DSNT and direction
|
||||
} else if (part === 'DENSITY' && i + 2 < parts.length && parts[i+1] === 'ALT' && parts[i+2].endsWith('FT')) {
|
||||
const altFeet = parts[i+2];
|
||||
const altitude = parseInt(altFeet.replace('FT', '')).toLocaleString();
|
||||
decoded.push(` - DENSITY ALT ${altFeet}: Density altitude ${altitude} feet`);
|
||||
i += 2; // consume ALT and altFeet
|
||||
} else if (cloudTypes[part] && i + 1 < parts.length && parts[i+1] === 'LENT') {
|
||||
const cloudName = cloudTypes[part];
|
||||
let remark = ` - ${part} LENT: ${cloudName} lenticularis`;
|
||||
let consumed = 1;
|
||||
if (i + 2 < parts.length && directions[parts[i+2]]) {
|
||||
const direction = directions[parts[i+2]];
|
||||
remark = ` - ${part} LENT ${parts[i+2]}: ${cloudName} lenticularis to the ${direction.toLowerCase()}`;
|
||||
consumed = 2;
|
||||
}
|
||||
decoded.push(remark);
|
||||
i += consumed;
|
||||
} else if (specialRemarks[part]) {
|
||||
decoded.push(` - ${part}: ${specialRemarks[part]}`);
|
||||
} else if (cloudTypes[part] && i + 1 < parts.length && parts[i + 1] === 'TR') {
|
||||
|
||||
Reference in New Issue
Block a user