@squawk
    Preparing search index...

    Interface Pirep

    A parsed Pilot Report (PIREP).

    PIREPs are filed by pilots to report weather conditions encountered in flight. They use a slash-delimited field format with standardized field markers (e.g. /OV, /TM, /FL, /TP, /SK, /WX, /TA, /WV, /TB, /IC, /RM).

    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.location); // { locationType: 'station', point: { identifier: 'OKC', radialDeg: 63, distanceNm: 15 } }
    console.log(pirep.altitudeFtMsl); // 8500
    console.log(pirep.aircraftType); // "C172"
    interface Pirep {
        aircraftType?: string;
        altitudeFtMsl?: number;
        altitudeQualifier?: "UNKN" | "DURD" | "DURC";
        icing?: PirepIcing[];
        location?: PirepLocation;
        raw: string;
        remarks?: string;
        skyCondition?: PirepCloudLayer[];
        temperatureC?: number;
        time?: DayTime;
        turbulence?: PirepTurbulence[];
        type: PirepType;
        visibility?: Visibility;
        weatherPhenomena?: WeatherPhenomenon[];
        wind?: PirepWind;
    }
    Index

    Properties

    aircraftType?: string

    ICAO aircraft type designator (from /TP field, e.g. "C172", "B738").

    altitudeFtMsl?: number

    Flight level or altitude in feet MSL (from /FL field). FL085 = 8500 ft.

    altitudeQualifier?: "UNKN" | "DURD" | "DURC"

    Qualifier for special altitude values in the /FL field.

    • UNKN - altitude unknown
    • DURD - during descent
    • DURC - during climb
    icing?: PirepIcing[]

    Icing reports, one per layer (from /IC field).

    location?: PirepLocation

    Location of the observation (from /OV field).

    raw: string

    The original raw PIREP string as provided to the parser.

    remarks?: string

    Free-text remarks (from /RM field).

    skyCondition?: PirepCloudLayer[]

    Sky condition cloud layers (from /SK field).

    temperatureC?: number

    Outside air temperature in degrees Celsius (from /TA field).

    time?: DayTime

    Time of the observation in UTC (from /TM field).

    turbulence?: PirepTurbulence[]

    Turbulence reports, one per layer (from /TB field).

    type: PirepType

    Type of pilot report (routine or urgent).

    visibility?: Visibility

    Flight visibility (from /WX field).

    weatherPhenomena?: WeatherPhenomenon[]

    Weather phenomena observed (from /WX field).

    wind?: PirepWind

    Wind direction and speed (from /WV field, direction is magnetic).