@squawk
    Preparing search index...

    Function parsePirep

    • Parses a raw PIREP (Pilot Report) string into a structured Pirep object.

      PIREPs use a slash-delimited field format with standardized markers: /OV (location), /TM (time), /FL (flight level), /TP (aircraft type), /SK (sky condition), /WX (weather/visibility), /TA (temperature), /WV (wind), /TB (turbulence), /IC (icing), /RM (remarks).

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

      const pirep = parsePirep('UA /OV OKC 063015/TM 1522/FL085/TP C172/SK BKN065-TOP090/TB LGT/RM SMOOTH');
      console.log(pirep.type); // "UA"
      console.log(pirep.altitudeFtMsl); // 8500
      console.log(pirep.aircraftType); // "C172"

      Parameters

      • raw: string

        The raw PIREP string to parse.

      Returns Pirep

      The parsed PIREP object.