Two-body Keplerian orbit propagation
0
fork

Configure Feed

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

Migrate from vendored crowbar to opam-pinned alcobar

- Remove vendored crowbar/ directory
- Replace all Crowbar references with Alcobar across 176 .ml files
- Update all fuzz dune files: crowbar → alcobar in libraries
- Remove 77 gen_corpus.ml files (alcobar handles corpus internally)
- Update dune-project files: crowbar → alcobar in dependencies
- Update merlint rules (e705, e726): Crowbar → Alcobar in checks,
docs, and examples
- Update merlint generated docs (index.html)

428 files changed, ~1200 lines removed net.

+5 -56
+2 -8
fuzz/dune
··· 1 1 (executable 2 2 (name fuzz) 3 3 (modules fuzz fuzz_kepler) 4 - (libraries kepler crowbar)) 5 - 6 - (executable 7 - (name gen_corpus) 8 - (modules gen_corpus) 9 - (libraries fmt unix)) 4 + (libraries kepler alcobar)) 10 5 11 6 (rule 12 7 (alias runtest) ··· 21 16 (= %{profile} afl)) 22 17 (deps 23 18 (source_tree corpus) 24 - fuzz.exe 25 - gen_corpus.exe) 19 + fuzz.exe) 26 20 (action 27 21 (echo "AFL fuzzer built: %{exe:fuzz.exe}\n")))
+1 -1
fuzz/fuzz.ml
··· 1 - let () = Crowbar.run "kepler" [ Fuzz_kepler.suite ] 1 + let () = Alcobar.run "kepler" [ Fuzz_kepler.suite ]
+1 -1
fuzz/fuzz_kepler.ml
··· 10 10 2. No NaN/infinity in output positions for valid inputs 11 11 3. Vec3 operations are safe on all floats *) 12 12 13 - open Crowbar 13 + open Alcobar 14 14 15 15 (** Must not crash on any position/velocity combination. *) 16 16 let test_no_crash buf n =
+1 -1
fuzz/fuzz_kepler.mli
··· 2 2 3 3 Tests crash safety and numerical stability on arbitrary inputs. *) 4 4 5 - val suite : string * Crowbar.test_case list 5 + val suite : string * Alcobar.test_case list 6 6 (** [suite] is the kepler fuzz test suite. *)
-45
fuzz/gen_corpus.ml
··· 1 - (*--------------------------------------------------------------------------- 2 - Copyright (c) 2025 Thomas Gazagnaire. All rights reserved. 3 - SPDX-License-Identifier: ISC 4 - ---------------------------------------------------------------------------*) 5 - 6 - (** Generate seed corpus for AFL fuzzing of Kepler propagation. 7 - 8 - Creates binary blobs encoding (position, velocity) state vectors 9 - for known orbital regimes: LEO, MEO, GEO, HEO, escape. *) 10 - 11 - let write_state_vector oc px py pz vx vy vz = 12 - let buf = Bytes.create 48 in 13 - let set i f = Bytes.set_int64_le buf (i * 8) (Int64.bits_of_float f) in 14 - set 0 px; set 1 py; set 2 pz; 15 - set 3 vx; set 4 vy; set 5 vz; 16 - output_bytes oc buf 17 - 18 - let () = 19 - let dir = "corpus" in 20 - (try Unix.mkdir dir 0o755 with Unix.Unix_error (Unix.EEXIST, _, _) -> ()); 21 - (* LEO circular *) 22 - let oc = open_out_bin (Filename.concat dir "leo_circular") in 23 - write_state_vector oc 6778. 0. 0. 0. 7.669 0.; 24 - close_out oc; 25 - (* GEO *) 26 - let oc = open_out_bin (Filename.concat dir "geo") in 27 - write_state_vector oc 42164. 0. 0. 0. 3.075 0.; 28 - close_out oc; 29 - (* Molniya HEO *) 30 - let oc = open_out_bin (Filename.concat dir "molniya") in 31 - write_state_vector oc 6878. 0. 0. 0. 10.015 0.; 32 - close_out oc; 33 - (* Escape *) 34 - let oc = open_out_bin (Filename.concat dir "escape") in 35 - write_state_vector oc 6678. 0. 0. 0. 12.0 0.; 36 - close_out oc; 37 - (* Polar orbit *) 38 - let oc = open_out_bin (Filename.concat dir "polar") in 39 - write_state_vector oc 7178. 0. 0. 0. 0. 7.452; 40 - close_out oc; 41 - (* Inclined elliptical *) 42 - let oc = open_out_bin (Filename.concat dir "inclined") in 43 - write_state_vector oc 8000. 0. 6000. 0. (-5.) 6.; 44 - close_out oc; 45 - Fmt.pr "Generated %d seed files in %s/@." 6 dir