# Flight globe ## What this builds A globe and a small chart of a person's (or a sample) flying. Routes are great-circle arcs between airports in a shipped list. Hours and distances come from a fixture log, not from a live aviation API. The sample log is fictional. The person can filter by year and click a route. Read `spekkr.inputs.json` first. `title` sits over the globe. `year` filters the log. `log` chooses the fixture. `arcs` and `chart` change the picture. ## Out of scope - A live airline, ADS-B, or tracking API in the checks. - A real person's private log unless they later load one locally. - A claim of official hours. ## Requirements Each requirement has an id. Checks name the id they cover. ### R1. Projection and distance - Airports are in `fixtures/airports.json` with lat, lon, and id. - A great-circle distance uses the haversine formula and a radius of 6371 km. Fixture pairs in `design.md` match to 1 km. - A log row with from, to, date, and duration projects to the documented arc endpoints. Accept when: every distance fixture matches to 1 km, and every sample-year row projects to the listed endpoints. ### R2. Filters and hooks - `year` 2025 on `sample-year` leaves the set in `fixtures/log-2025.json`. `all` leaves every row. - A fetch hook fails if a known aviation or map-tile host is contacted. - The hours chart, if on, sums duration by month and matches `fixtures/hours-2025.json` for that filter. Accept when: the filter and the month sums match, and the hook stays quiet. ### R3. Frames and files - Goldens: the globe with all sample-year arcs, a close arc, the hours chart, and the 2025-filtered globe. - One command runs distances, filters, the hook, and writes the frames. No network. Accept when: the command passes for both logs, and the frames match the goldens. ### R4. Inputs - The build reads `spekkr.inputs.json`. Settings label the UI, options turn features on or off, and a swap must be one of its choices. - A value outside a stated range, or a swap that is not one of its choices, is refused before the app starts its checks, with a message that names the key. Accept when: the default inputs render, an illegal swap is refused by name, and changing a visible setting (for example the title) shows up in a later check. ## Verification Fixture flight logs project to documented coordinates and haversine distances, to 1 km. A year filter and a hours-by-month chart match shipped files. Golden globe and chart views are checked. A fetch hook fails if a live aviation API is contacted. ## Definition of done - Every acceptance check above runs from one command, and all pass at the person's inputs. - A README says how to load a local log later, how the sample log is fictional, and how to run the checks.