Parses a raw ICAO-format NOTAM string into a structured Notam object.
Handles NOTAMN (new), NOTAMR (replacement), and NOTAMC (cancellation) action types. Parses the Q-line qualifier (FIR, NOTAM code, traffic type, purpose, scope, altitude limits, coordinates/radius) and items A through G (location, effective period, schedule, free-text description, altitude limits).
import { parseNotam } from '@squawk/notams';const notam = parseNotam(rawNotamString);console.log(notam.id); // "A1242/24"console.log(notam.action); // "NEW"console.log(notam.qualifier?.fir); // "KZNY"console.log(notam.locationCodes); // ["KJFK"]console.log(notam.text); // "RWY 09L/27R CLSD DUE TO RESURFACING" Copy
import { parseNotam } from '@squawk/notams';const notam = parseNotam(rawNotamString);console.log(notam.id); // "A1242/24"console.log(notam.action); // "NEW"console.log(notam.qualifier?.fir); // "KZNY"console.log(notam.locationCodes); // ["KJFK"]console.log(notam.text); // "RWY 09L/27R CLSD DUE TO RESURFACING"
The raw NOTAM string to parse.
A parsed Notam object.
If the string cannot be parsed as a valid NOTAM.
Parses a raw ICAO-format NOTAM string into a structured Notam object.
Handles NOTAMN (new), NOTAMR (replacement), and NOTAMC (cancellation) action types. Parses the Q-line qualifier (FIR, NOTAM code, traffic type, purpose, scope, altitude limits, coordinates/radius) and items A through G (location, effective period, schedule, free-text description, altitude limits).