My own corner of monopam
2
fork

Configure Feed

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

ocaml-coordinate: fix README usage example

The example referenced unbound [unix_time] / [teme_pos] values and
didn't list [vec3] / [fmt] in mdx libraries. Wrap as a
[report_position] function with explicit [Vec3.t] / [unix_time]
arguments and add the missing libraries.

+8 -10
+6 -6
ocaml-coordinate/README.md
··· 26 26 ## Usage 27 27 28 28 ```ocaml 29 - (* Convert SGP4 TEME output to geodetic coordinates *) 30 - let gmst = Coordinate.gmst_of_unix unix_time 31 - let ecef = Coordinate.teme_to_ecef ~gmst teme_pos 32 - let geo = Coordinate.ecef_to_geodetic ecef 33 - let () = 34 - Printf.printf "Lat: %.4f Lon: %.4f Alt: %.1f km\n" 29 + (* Convert SGP4 TEME output to geodetic coordinates. *) 30 + let report_position ~unix_time (teme_pos : Vec3.t) = 31 + let gmst = Coordinate.gmst_of_unix unix_time in 32 + let ecef = Coordinate.teme_to_ecef ~gmst teme_pos in 33 + let geo = Coordinate.ecef_to_geodetic ecef in 34 + Fmt.pr "Lat: %.4f Lon: %.4f Alt: %.1f km@." 35 35 geo.lat geo.lon geo.alt 36 36 ``` 37 37
+2 -4
ocaml-coordinate/dune
··· 3 3 (flags :standard %{dune-warnings}))) 4 4 5 5 (mdx 6 - (files 7 - README.md 8 - ) 9 - (libraries coordinate)) 6 + (files README.md) 7 + (libraries coordinate vec3 fmt))