CCSDS 502.0-B Orbit Parameter Message parser and serializer
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

OCaml 71.2%
Java 18.5%
Shell 1.3%
Dune 1.2%
Other 7.8%
21 1 0

Clone this repository

https://tangled.org/gazagnaire.org/ocaml-opm https://tangled.org/did:plc:jhift2vwcxhou52p3sewcrpx/ocaml-opm
git@git.recoil.org:gazagnaire.org/ocaml-opm git@git.recoil.org:did:plc:jhift2vwcxhou52p3sewcrpx/ocaml-opm

For self-hosted knots, clone URLs may differ based on your setup.

Download tar.gz
README.md

opm#

CCSDS 502.0-B Orbit Parameter Message parser and serializer.

Parses the KVN (Keyword=Value Notation) text format for orbit parameter data. Supports both Cartesian state vectors and Keplerian orbital elements, with optional spacecraft parameters and maneuver definitions.

Reference: CCSDS 502.0-B-3 Orbit Data Messages, Annex (OPM).

Installation#

Install with opam:

$ opam install opm

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 opm

Usage#

let report kvn_text =
  match Opm.of_string kvn_text with
  | Error e -> Fmt.epr "%a@." Opm.pp_error e
  | Ok opm -> (
      Fmt.pr "Object: %s@." opm.metadata.object_name;
      match opm.state with
      | Opm.Cartesian sv ->
          Fmt.pr "Position: (%.3f, %.3f, %.3f) km@." sv.x sv.y sv.z
      | Opm.Keplerian ke ->
          Fmt.pr "SMA: %.3f km, ecc: %.6f@." ke.semi_major_axis ke.eccentricity)

API Overview#

  • type t -- Complete OPM: header, metadata, state, optional maneuvers
  • type state -- Cartesian state vector or Keplerian elements
  • type maneuver -- Epoch, duration, delta-V components, reference frame
  • of_string, of_channel, of_file -- Parse KVN format
  • to_string -- Serialize back to KVN format

License#

ISC