@squawk
    Preparing search index...

    Function checkRouteAltitudes

    • Checks a parsed route's cruise altitude against the published airway altitudes: on each airway leg, the MEA for the direction flown and the equipment, and the MAA; at each airway fix, the MCA for the direction flown and the MRA.

      The altitude flown starts at options.altitudeFt, or else the route's opening speed/altitude group, and changes at each speed/altitude group attached to a later route point, from that point onward. A flight level counts as hundreds of feet. When no altitude is known anywhere the result is noAltitude with no legs or points.

      The applicable MEA is the lowest usable with any of the equipment (see NavigationEquipment). Where the conventional and GNSS MEAs differ by direction, the published direction closest to the leg's magnetic course applies. An MCA applies when its direction is within 67.5 deg of the course leaving the fix (or arriving at the airway's last fix), or in both directions when the two published values are equal. Falling below an MRA fails only for conventional-only equipment. Legs that span a published gap or run along an unusable segment fail as filed. Legs that are not airway segments (direct, coordinate and procedure legs) cannot be determined.

      Each leg also carries an advisory cruisingAltitude check against the east/west rule of 14 CFR 91.179(b), with RVSM levels from FL290 to FL410, which does not affect any status. The course is the airway segment's published magnetic course in the direction flown, or else the leg's initial great-circle true course converted to magnetic with the World Magnetic Model; SID and STAR legs are not checked.

      Below the applicable MEA, a leg at or above the segment's MOCA passes with a belowMeaAllowance when the equipment includes GNSS, or when it includes conventional navigation and every point of the leg is within 22 NM of the VOR it is navigated by (the nearest VOR along the airway behind and ahead, split at the published changeover point or else midway), under 14 CFR 91.177(a)(2)(ii) and FAA Order JO 7110.65 4-5-6a. Below the MOCA it fails. The 300 ft margin above controlled airspace and clearance below the MEA with radar service are not checked, and neither are procedure altitude constraints.

      import { createFlightplanResolver, checkRouteAltitudes } from '@squawk/flightplan';

      const resolver = createFlightplanResolver({ airports, navaids, fixes, airways });
      const route = resolver.parse('KBOS DCT BOS V16 JFK DCT KJFK');
      const result = checkRouteAltitudes(route, { altitudeFt: 7000, equipment: ['gnss'] });
      console.log(result.status);

      Parameters

      Returns RouteAltitudeCheckResult

      Per-leg and per-point altitude checks and the overall status.