All projects

Integer & embedded · Active

astro-nav-int

Celestial sight reduction, altitude correction, ephemerides, and multi-sight position fixes in fixed-point C99.

At a glance

Evidence and scope

Repository measurements and recorded project results. Test and benchmark claims were inspected, not rerun during this catalog refresh. Physical line counts use the stated file scopes.

Accuracy gate
≤0.30 arcminuteAltitude and primary-method azimuth against the double-precision reference.
Independent references
5 classesSkyfield/DE421, printed almanac material, USNO data, other lineages, and published observations.
Runtime arithmetic
No floating pointThe shipping C99 library and CLI use Q16.48 fixed-point computation.
Target coverage
Native → MCUHosted, QEMU, portable-wide, and physical-board profiles check deterministic execution.
Reviewed sources · 2026-10-15 · 8e9d94791864

118 tracked files · 24 documentation files · 1 workflow files. Inventory includes data and vendored or generated files; workflow presence does not establish a passing run.

Download inventory and line-count file scopes

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
  • wide-integer arithmetic.

  • Sextant corrections for index error, dip, refraction, parallax, and
  • semidiameter.

  • 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.

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.