Skip to content

Add procedures table with CIFP transition sequences - #31

Merged
apps4av merged 5 commits into
masterfrom
add-procedures-table
Jul 21, 2026
Merged

Add procedures table with CIFP transition sequences#31
apps4av merged 5 commits into
masterfrom
add-procedures-table

Conversation

@apps4av

@apps4av apps4av commented Jul 20, 2026

Copy link
Copy Markdown
Owner

Summary

  • Adds a new procedures table built from the FAA CIFP (FAACIFP18, ARINC 424-18). It expands SID/STAR/approach records into flyable transition sequences, so an approach with several IAFs becomes one sequence per starting point.
  • New root-level procedures.py (stdlib only) produces procedures.csv with columns: airport, procedure, initial_fix, sequence, fix, altitude.
  • Procedure names come from the d-TPP metafile: SIDs/STARs link via faanfd18; approaches are named by decoding/matching the CIFP identifier to the chart name (~100% match on the current cycle). Falls back to a synthesized name when the metafile is unavailable.

Details

  • common.make_data() now calls procedures.parse_procedures() right after cifp.parse_cifp(), so the CSV is regenerated for both the legacy and x database builds.
  • data.py does a best-effort download of the d-TPP metafile for the current cycle; wrapped in try/except so a not-yet-published metafile can't break the build.
  • legacy/importother.sql and x/importother.sql create and import the procedures table (same pattern as cifp_sid_star_app).
  • Field values are comma-stripped before writing, since the pipeline's .separator "," / .import does not handle quoted fields.

Output example (KBVY RNAV (GPS) RWY 09)

KBVY,RNAV (GPS) RWY 09,COLLE,1,COLLE,2000
KBVY,RNAV (GPS) RWY 09,COLLE,2,EXXRO,2000
KBVY,RNAV (GPS) RWY 09,COLLE,3,DIXNN,1800
KBVY,RNAV (GPS) RWY 09,COLLE,4,ZAPOB,700
KBVY,RNAV (GPS) RWY 09,COLLE,5,MEMAE,297
KBVY,RNAV (GPS) RWY 09,RIKAH,1,RIKAH,3000
...

Test plan

  • Ran procedures.py on the live cycle: 166,576 rows generated.
  • Imported procedures.csv into SQLite via the exact pipeline mechanism (.separator "," + .import): 166,576 rows, 0 column-alignment errors.
  • Verified KBVY RNAV (GPS) RWY 09 sequences match the expected output.
  • Verified graceful fallback to synthesized names when the metafile is absent.
  • py_compile passes for procedures.py, common.py, data.py.

Made with Cursor

apps4av and others added 5 commits July 20, 2026 17:31
Parse the FAA CIFP (FAACIFP18, ARINC 424-18) SID/STAR/approach records into
flyable transition sequences and load them into a new `procedures` table, so an
approach with several IAFs becomes one sequence per starting point.

- procedures.py: stdlib-only parser producing procedures.csv with columns
  airport, procedure, initial_fix, sequence, fix, altitude. Approach names are
  resolved from the d-TPP metafile (SIDs/STARs via faanfd18, approaches by
  decoding/matching the CIFP identifier), falling back to synthesized names.
- common.make_data(): generate procedures.csv alongside the existing CIFP CSV.
- data.py: best-effort download of the d-TPP metafile (non-fatal if missing).
- legacy/ and x/ importother.sql: create and import the procedures table.

Co-authored-by: Cursor <cursoragent@cursor.com>
@apps4av
apps4av merged commit 5292beb into master Jul 21, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant