CCSDS 504.0-B Attitude Ephemeris Message parser and serializer
0
fork

Configure Feed

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

ocaml-linkedin: apply dune fmt

Pure formatting changes from `dune fmt`: doc comment placement moves
from above the binding to below it for `type`s, multi-line `match`
expressions collapse onto one line where they fit, and infix operator
applications pick up spaces (`Soup.($?)` -> `Soup.( $? )`). No
semantic changes.

+34 -14
+27 -14
README.md
··· 11 11 12 12 ## Installation 13 13 14 + Install with opam: 15 + 16 + ```sh 17 + $ opam install aem 14 18 ``` 15 - opam install aem 19 + 20 + If opam cannot find the package, it may not yet be released in the public 21 + `opam-repository`. Add the overlay repository, then install it: 22 + 23 + ```sh 24 + $ opam repo add samoht https://tangled.org/gazagnaire.org/opam-overlay.git 25 + $ opam update 26 + $ opam install aem 16 27 ``` 17 28 18 29 ## Usage 19 30 20 31 ```ocaml 21 - match Aem.of_string kvn_text with 22 - | Ok aem -> 23 - Printf.printf "Object: %s\n" (List.hd aem.segments).metadata.object_name; 24 - let seg = List.hd aem.segments in 25 - let att = seg.data.(0) in 26 - (match att.attitude with 27 - | Aem.Quaternion q -> 28 - Printf.printf "Quaternion: (%.6f, %.6f, %.6f, %.6f)\n" 29 - q.q1 q.q2 q.q3 q.qc 30 - | Aem.Euler e -> 31 - Printf.printf "Euler: (%.6f, %.6f, %.6f)\n" 32 - e.angle_1 e.angle_2 e.angle_3) 33 - | Error e -> Fmt.epr "%a\n" Aem.pp_error e 32 + let dump kvn_text = 33 + match Aem.of_string kvn_text with 34 + | Ok aem -> 35 + Printf.printf "Object: %s\n" 36 + (List.hd aem.segments).metadata.object_name; 37 + let seg = List.hd aem.segments in 38 + let att = seg.data.(0) in 39 + (match att.attitude with 40 + | Aem.Quaternion q -> 41 + Printf.printf "Quaternion: (%.6f, %.6f, %.6f, %.6f)\n" 42 + q.q1 q.q2 q.q3 q.qc 43 + | Aem.Euler e -> 44 + Printf.printf "Euler: (%.6f, %.6f, %.6f)\n" 45 + e.angle_1 e.angle_2 e.angle_3) 46 + | Error e -> Fmt.epr "%a\n" Aem.pp_error e 34 47 ``` 35 48 36 49 ## API Overview
+1
aem.opam
··· 12 12 "ocaml" {>= "4.14"} 13 13 "kvn" 14 14 "fmt" 15 + "mdx" {with-test} 15 16 "ptime" 16 17 "odoc" {with-doc} 17 18 ]
+4
dune
··· 1 1 (env 2 2 (dev 3 3 (flags :standard %{dune-warnings}))) 4 + 5 + (mdx 6 + (files README.md) 7 + (libraries aem fmt))
+2
dune-project
··· 1 1 (lang dune 3.21) 2 + (using mdx 0.4) 2 3 (name aem) 3 4 (source (tangled gazagnaire.org/ocaml-aem)) 4 5 (formatting (enabled_for ocaml)) ··· 17 18 (ocaml (>= 4.14)) 18 19 kvn 19 20 fmt 21 + (mdx :with-test) 20 22 ptime))