oem#
CCSDS 502.0-B-3 Orbit Ephemeris Message parser and interpolator.
Parses the KVN (Keyword=Value Notation) text format for orbit ephemeris data. Provides Hermite interpolation between state vectors for smooth position queries at arbitrary times.
Installation#
Install with opam:
$ opam install oem
If opam cannot find the package, it may not yet be released in the public
opam-repository. Add the overlay repository, then install it:
$ opam repo add samoht https://tangled.org/gazagnaire.org/opam-overlay.git
$ opam update
$ opam install oem
Usage#
let report ~path ~at =
match Oem.of_file path with
| Error e -> Fmt.epr "%a@." Oem.pp_error e
| Ok oem ->
Fmt.pr "Object: %s@." (Oem.object_name oem);
let start, stop = Oem.time_range oem in
Fmt.pr "Range: %a -> %a@." Ptime.pp start Ptime.pp stop;
(* Interpolate at a specific time. *)
(match Oem.interpolate_all oem at with
| Some sv -> Fmt.pr "Position: %a@." Vec3.pp sv.pos
| None -> Fmt.pr "Time out of range@.")
API Overview#
type t-- Complete OEM file: header + segment listtype segment-- Metadata, state vector array, optional covariance listtype state_vector--epoch : Ptime.t,pos : vec3,vel : vec3type covariance-- Epoch, reference frame, upper-triangle matrix (21 elements)of_string,of_channel,of_file-- Parse KVN formatinterpolate-- Hermite interpolation within a segmentinterpolate_all-- Search all segments and interpolatetime_range-- Start/stop time spanning all segmentsobject_name,object_id-- Accessors
License#
ISC