package msts

  1. Overview
  2. Docs
Geocentric lunar ephemeris library

Install

dune-project
 Dependency

Authors

Maintainers

Sources

msts-0.1.0.tbz
sha256=b41551c4d48ec1ddffcf9127e6ea95abe813e3c844bb9da11f0d3cedf1a6f021
sha512=c2754d94314a7f0517ceb51308493ef799123b988eda3c8b29ac070a669183460d7376ae15c97b25a7380a6e472e5e4d0549655659303f20fac0342afe108e1c

Description

Dependency-free OCaml library that computes the Moon's geocentric ecliptic position and phase information from a Unix timestamp. Implements the Schlyter Keplerian algorithm with empirical perturbation corrections. Valid over 1900-01-01 through 2100-12-31.

Added to opam-repository:

README

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

Dependencies (2)

  1. ocaml >= "4.14"
  2. dune >= "3.17"

Dev Dependencies (1)

  1. odoc with-doc

Used by

None

Conflicts

None