@squawk
    Preparing search index...

    Function parseSigmetBulletin

    • Recommended entry point for SIGMET parsing. Handles both single SIGMET records and multi-SIGMET bulletins, always returning an array.

      Consumers do not need to know whether their input is a single record or a bulletin - this function handles both transparently. Real-world convective SIGMET bulletins from AWC often contain multiple individually numbered SIGMETs for a region, followed by a shared outlook section. This function splits the bulletin, parses each SIGMET, and attaches the shared outlook to each convective SIGMET.

      For non-convective and international SIGMETs (which are typically single messages), this returns an array with one element.

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

      const sigmets = parseSigmetBulletin(rawBulletin);
      for (const sigmet of sigmets) {
      console.log(sigmet.format, sigmet.raw);
      }

      Parameters

      • raw: string

        The raw SIGMET bulletin string, possibly containing multiple SIGMETs.

      Returns Sigmet[]

      An array of parsed Sigmet objects.

      If no valid SIGMETs can be parsed from the bulletin.