Geocentric lunar ephemeris library
https://msts.vercel.app/
| bin | v0.1.0 | |
| lib | v0.1.0 | |
| man | v0.1.0 | |
| test | v0.1.0 | |
| .gitignore | v0.1.0 | |
| CHANGES.md | v0.1.0 | |
| dune-project | v0.1.0 | |
| LICENSE | v0.1.0 | |
| msts.opam | v0.1.0 | |
| README.md | v0.1.0 | |
msts
Geocentric lunar ephemeris library for OCaml.
Computes the Moon's ecliptic position and phase from a Unix timestamp.
No dependencies beyond the OCaml standard library.
Valid over 1900–2100, validated against JPL Horizons (DE441).
Requirements
- OCaml ≥ 4.14
- dune ≥ 3.17
Install
opam install msts
Use
let e = Msts.compute (Unix.gettimeofday ()) in
Printf.printf "%s %.1f%% %.0f km\n"
(Msts.phase_name_to_string e.Msts.phase.Msts.name)
(e.Msts.phase.Msts.illuminated_fraction *. 100.0)
e.Msts.position.Msts.distance_km
Add to your dune file:
(libraries msts)
See man 3 msts for the full API reference.
License
ISC