@squawk
    Preparing search index...

    Function parseAirmet

    • Parses an AIRMET bulletin string into a structured Airmet object.

      Accepts both raw WMO-wrapped bulletins (with header lines like WAUS41 KKCI) and body-only bulletins starting with "AIRMET SIERRA/TANGO/ZULU".

      A single bulletin contains a header with series, validity, and purpose information, followed by one or more hazard areas separated by . lines. Zulu bulletins may also include freezing level sections and outlook areas.

      import { parseAirmet } from '@squawk/weather';

      const airmet = parseAirmet(rawBulletin);
      console.log(airmet.series, airmet.hazards.length);
      for (const hazard of airmet.hazards) {
      console.log(hazard.hazardType, hazard.states);
      }

      Parameters

      • raw: string

        The raw AIRMET bulletin string to parse.

      Returns Airmet

      A parsed Airmet object.

      If the string cannot be parsed as a valid AIRMET bulletin.