Executive summary
astro-nav-int implements the computation between a sextant reading and a position fix without floating-point operations in the shipping library or command-line program. It includes altitude corrections, three sight-reduction methods, exact two-body circle intersections, overdetermined fixes, running fixes, and built-in star, Sun, and Moon calculations. The project is both a celestial-navigation experiment and a compact exercise in deterministic embedded mathematics. It documents accuracy against independent ephemerides, printed references, and published observation logs, while explicitly remaining an experimental library rather than a navigation instrument.
Problem and context
Traditional celestial navigation combines an almanac, corrections, spherical trigonometry, and either plotted lines of position or a numerical fix. The project explores how that full chain can look on hardware where floating point is unavailable or undesirable, without reducing the work to a toy formula.
Its framing is deliberately counterfactual: fixed-point arithmetic is the constraint being studied, not a claim that it should replace modern floating point on a phone or laptop.
What was built
- A single-library C99 implementation with fixed-point trigonometry and portable
- Sextant corrections for index error, dip, refraction, parallax, and
- Three sight-reduction paths and direct two-body and multi-body position fixes.
- Running-fix advancement, repeated-sight averaging, and Bris-sextant workflows.
- An 18-star vector catalog plus integer Sun and Moon ephemerides.
- Hosted, QEMU, and physical-board validation profiles.
wide-integer arithmetic.
semidiameter.
How it works
Runtime math uses signed Q16.48 values. The primary reduction method evaluates spherical trigonometry with CORDIC rotation and vectoring. A second method maps the local north/east direction to a square-perimeter key before converting it back to an azimuth. A third keeps the almanac body as an earth-fixed integer unit vector and performs the hot path with dot and cross products.
Two corrected sights are treated as planes intersecting the observer sphere. This produces the two exact circle-intersection candidates directly, while three or more sights use a weighted least-squares fix.
Evidence and validation
The README reports altitude and primary-method azimuth results within 0.30 arcminute of the double-precision reference. The validation suite also gates star, Sun, and Moon outputs against Skyfield/DE421, printed almanac material, USNO data, other implementation lineages, and published observation scenarios.
Determinism checks cover both native and portable wide-integer backends. The repository records profile hashes on physical microcontroller targets; those hardware runs verify deterministic execution, not an author-run sextant field trial.
Boundaries
The built-in almanac intentionally omits some higher-order effects and carries a documented error budget. Planet ephemerides, star identification, plate solving, camera calibration, sensor fusion, and formal uncertainty propagation are out of scope. The repository advises carrying established navigation references and does not present the software as a certified or operational navigation device.
Repository map and first run
make check
make determinism
make determinism-portable
make lib
Start with docs/WORKFLOW.md for one end-to-end observation chain and docs/HOWTO.md for CLI modes and the error budget. embedded/README.md records the embedded targets, while examples/consumer.c shows how to link the library.