The nav-data-generator command-line tool that builds the SF50 TOLD
navigation database for a given AIRAC cycle.
This package ports the app's in-process nav-data pipeline into a standalone Swift executable so it can run headlessly in Linux CI, publishing per-cycle data files without requiring an Apple platform build.
For a requested NASR cycle, the generator:
- Initializes a timezone lookup database.
- Downloads and parses FAA NASR airport/runway/ILS data (SwiftNASR).
- Downloads and parses OurAirports CSV data for international airports (StreamingCSV).
- Downloads and parses FAA CIFP procedure data (SwiftCIFP).
- Downloads and parses the FAA d-TPP metafile for official procedure names,
joining it with NASR
STARDPrecords so approaches and departures carry their published chart titles. - Downloads and parses the FAA Digital Obstacle File (SwiftDOF).
- Downloads and parses the supplementary sources for the AIRAC cycle (SwiftAIXM): open flightmaps aerodromes for Europe and southern Africa, the UK AIP and obstacle data sets published by NATS, LFV's threshold points and obstacles for Sweden, and the Austro Control and Swiss FOCA obstacle data sets. Each is optional; one that fails to load is logged and left out.
- Resolves every source's records into one record per airport. Records are
matched by ICAO indicator, national code, or position and shared runway; each
airport is keyed by its most authoritative identifier (
FAA:<site number>,ICAO:<indicator>,LOC:<country>:<code>,OA:<OurAirports id>, orOFM:<region>:<code>), with its other identifiers as aliases; and each value comes from the highest-priority source that has it (NASR, then national AIP data, then open flightmaps, then OurAirports). - Writes the result into the shared
NavDataschema as a binary property list, then compresses it with StreamingLZMA's XZ container format — byte-compatible with the app'sNSData.decompressed(using: .lzma).
Why the European official sources stop at these, and what using the others would take, is in docs/data-permissions.md.
swift run nav-data-generator --cycle current --output ./out| Option | Description | Default |
|---|---|---|
--cycle |
current, next, or a specific date (YYYY-MM-DD) |
current |
--output |
Directory to write <cycle>.plist and <cycle>.plist.lzma to |
current directory |
--print-cycle |
Print the resolved cycle identifier and exit, without running the pipeline | (off) |
--print-cycle is intended for CI, so a workflow can cheaply compute the target cycle
identifier before deciding whether to run the (expensive) full pipeline.
This package only builds the generator tool. The compressed data files it produces are published as GitHub Release assets by CI, not committed here.