Parses a single SIGMET record into a structured Sigmet object.
For general use, prefer parseSigmetBulletin which handles both
single records and multi-SIGMET bulletins transparently.
Automatically detects the SIGMET format (convective, non-convective, or
international ICAO) from the content and returns the appropriate variant
of the discriminated union.
Accepts both raw WMO-wrapped messages (with header lines like WSUS32 KKCI)
and body-only messages.
import { parseSigmet } from'@squawk/weather';
constsigmet = parseSigmet('SIGMET NOVEMBER 3 VALID UNTIL 050200Z\n...'); if (sigmet.format === 'NONCONVECTIVE') { console.log(sigmet.seriesName, sigmet.hazards[0].hazardType); }
Parses a single SIGMET record into a structured Sigmet object.
For general use, prefer parseSigmetBulletin which handles both single records and multi-SIGMET bulletins transparently.
Automatically detects the SIGMET format (convective, non-convective, or international ICAO) from the content and returns the appropriate variant of the discriminated union.
Accepts both raw WMO-wrapped messages (with header lines like WSUS32 KKCI) and body-only messages.