Collision Avoidance Maneuver design for conjunction assessment
0
fork

Configure Feed

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

cam: fix README — add avoid (simple API), min_dv returns float option

+12 -4
+12 -4
README.md
··· 22 22 Printf.printf "Pc before: %e, after: %e\n" result.pc_before result.pc_after 23 23 24 24 (* Find minimum delta-v to achieve target Pc *) 25 - let dv = 26 - Cam.min_dv ~miss_r:50. ~miss_t:200. ~miss_n:0. ~sigma_r:30. ~sigma_t:100. 27 - ~hbr:10. ~dt:21600. ~target_pc:1e-5 25 + (* Simple API: compute avoidance burn directly from a CDM *) 26 + match Cam.avoid cdm ~dt:21600. with 27 + | Some result -> Printf.printf "Burn: %.4f km/s\n" result.dv 28 + | None -> print_endline "Already safe or no solution" 29 + 30 + (* Find minimum delta-v to achieve target Pc *) 31 + match Cam.min_dv ~miss_r:50. ~miss_t:200. ~miss_n:0. ~sigma_r:30. ~sigma_t:100. 32 + ~hbr:10. ~dt:21600. ~target_pc:1e-5 with 33 + | Some dv -> Printf.printf "Min dv: %.6f km/s\n" dv 34 + | None -> print_endline "No solution" 28 35 ``` 29 36 30 37 ## API Overview ··· 32 39 - **`type direction`** -- Burn direction: `` `Tangential ``, `` `Radial ``, `` `Normal `` 33 40 - **`type maneuver`** -- Impulsive maneuver: `dt`, `dv`, `direction` 34 41 - **`type result`** -- Evaluation output: miss distances, Pc before/after, delta-v cost 42 + - **`avoid`** -- Simple API: find minimum burn from a CDM (returns `result option`) 35 43 - **`evaluate`** -- Evaluate a proposed maneuver against conjunction geometry 36 - - **`min_dv`** -- Find minimum delta-v for a target Pc (bisection search) 44 + - **`min_dv`** -- Find minimum delta-v for a target Pc (returns `float option`) 37 45 - **`screen`** -- Evaluate multiple delta-v options, sorted by post-maneuver Pc 38 46 39 47 ## Testing