@squawk
    Preparing search index...

    Function parseWindsAloft

    • Parses a raw FD winds-aloft forecast bulletin into a structured WindsAloftForecast object. Handles the AWC wire-format preamble ((Extracted from X) or a plain WMO header line), the fixed-width data table, light-and-variable winds (raw code 9900), high-speed wind encoding (direction codes 51-86 denoting speeds >= 100 kt), and implicit-negative temperatures above the TEMPS NEG ABV threshold.

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

      const forecast = parseWindsAloft(rawFdBulletin);
      console.log(forecast.altitudesFt); // [3000, 6000, 9000, 12000, 18000, 24000, 30000, 34000, 39000]
      console.log(forecast.stations[0]?.stationId); // "BDL"
      console.log(forecast.stations[0]?.levels[2]?.directionDeg); // 330

      Parameters

      • raw: string

        The raw FD bulletin text to parse.

      Returns WindsAloftForecast

      A parsed WindsAloftForecast object.

      If the input is not a recognizable FD bulletin.