Skip to content

feat: NOTAM client + parser (M5a) - #12

Open
tomassasovsky wants to merge 1 commit into
feat/zone-provenance-validity-fieldsfrom
feat/notam-client-parser
Open

feat: NOTAM client + parser (M5a)#12
tomassasovsky wants to merge 1 commit into
feat/zone-provenance-validity-fieldsfrom
feat/notam-client-parser

Conversation

@tomassasovsky

Copy link
Copy Markdown
Owner

Summary

  • Adds NotamParser (zones_api_client): parses EANA's POST /notam/pib HTML table into time-bounded ZoneDataDesde:/Hasta: validity (UTC), COORD GEO DMS polygons, single-coordinate + RDO <n>NM circles, and vertical limits (GND, <n>FT AGL, FL<n>). source = notam with activeFrom/activeTo.
  • Tolerant by design: a NOTAM with no derivable geometry (point-only obstacle, VOR outage, airway-only reference) is surfaced in ungeocodable for review, never silently dropped.
  • Adds NotamClient: fetches per FIR code (-EF -CF -VF -MF -RR) via the site's session-cookie + AJAX-header flow (reverse-engineered from the live endpoint); fetchAllFirs merges and tolerates a single-FIR outage.

Plan

feat: complete, authoritative airspace zone coverageMilestone M5a (data layer; standalone, not wired into ingest — that's M5b). Depends on M1's validity fields.

Test plan

  • zones_api_client: dart test — parser tested against a real captured EANA fixture (test/fixtures/notam_ef_sample.html: 1 polygon, 2 circles, 2 un-geocodable). Asserts DMS→lat/lon, RDO→radius, FL/AGL limits, and UTC validity windows.
  • Mocked-HTTP client flow: session GET → POST indicador → parse; non-200 throws NotamException; fetchAllFirs skips a failing FIR.
  • dart analyze + dart format clean.

Notes

  • The fixture is a small real sample captured from EANA's public reference endpoint, used only to test the parser. EANA's page is reference-only with no published reuse license — M6 confirms attribution/terms and the data-sources page entry; this PR does not present it as an official PIB.
  • Base branch is feat/zone-provenance-validity-fields (M1). Endpoint is an undocumented scrape (HTML shape can change) — parsing is fixture-tested and tolerant per the plan's risk note.

🤖 Generated with Claude Code

Implements milestone M5a of the authoritative zone coverage plan
(data layer only; not wired into ingest yet).

- NotamParser parses the EANA POST /notam/pib HTML table into ZoneData:
  Desde/Hasta validity (UTC), COORD GEO DMS polygons, single-coord + RDO
  circles, and vertical limits (GND/FT AGL/FLxxx). Tolerant regex; a
  NOTAM with no derivable geometry surfaces in `ungeocodable`, never
  silently dropped. source = notam with activeFrom/activeTo.
- NotamClient fetches per FIR code (-EF -CF -VF -MF -RR) via the site's
  session-cookie + AJAX-header flow; fetchAllFirs merges and tolerates a
  single FIR outage.
- Tests run against a real captured EANA fixture (1 polygon, 2 circles,
  2 un-geocodable) plus a mocked-HTTP client flow.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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