···505505 let dv = vec3_sub cdm.obj2.state.vel cdm.obj1.state.vel in
506506 vec3_norm dv
507507 in
508508- { pc = pc_foster enc; pc_max = pc_max enc; miss_distance = miss;
509509- relative_velocity = vrel }
508508+ {
509509+ pc = pc_foster enc;
510510+ pc_max = pc_max enc;
511511+ miss_distance = miss;
512512+ relative_velocity = vrel;
513513+ }
510514511515type risk = Critical | High | Watch | Low
512516
+17-14
lib/collision.mli
···55 {[
66 (* Assess a CDM in one line *)
77 let a = Collision.assess cdm in
88- Printf.printf "Pc = %e, miss = %.0f m, risk = %s\n"
99- a.pc a.miss_distance (Collision.risk_level a)
88+ Printf.printf "Pc = %e, miss = %.0f m, risk = %s\n" a.pc a.miss_distance
99+ (Collision.risk_level a)
1010 ]}
11111212 {b References}:
···3232 [hbr] is the combined hard-body radius in km (default: 0.015 km = 15 m,
3333 typical for two LEO spacecraft). *)
34343535-type risk = Critical | High | Watch | Low
3636-(** Risk level based on Pc thresholds (NASA CARA standard):
3737- - [Critical]: Pc > 1e-4 — maneuver required
3838- - [High]: Pc > 1e-5 — active monitoring, maneuver likely
3939- - [Watch]: Pc > 1e-7 — monitor conjunction evolution
4040- - [Low]: Pc <= 1e-7 — no action needed *)
3535+type risk =
3636+ | Critical
3737+ | High
3838+ | Watch
3939+ | Low
4040+ (** Risk level based on Pc thresholds (NASA CARA standard):
4141+ - [Critical]: Pc > 1e-4 — maneuver required
4242+ - [High]: Pc > 1e-5 — active monitoring, maneuver likely
4343+ - [Watch]: Pc > 1e-7 — monitor conjunction evolution
4444+ - [Low]: Pc <= 1e-7 — no action needed *)
41454246val risk_level : assessment -> risk
4347(** [risk_level a] classifies the conjunction risk. *)
···6670 vel1:vec3 array ->
6771 vel2:vec3 array ->
6872 tca option
6969-(** [find_tca ~times ~pos1 ~pos2 ~vel1 ~vel2] finds the time of closest
7070- approach between two objects using quadratic refinement. Arrays must be the
7171- same length (synchronized time steps). Returns [None] if fewer than 3
7272- points. *)
7373+(** [find_tca ~times ~pos1 ~pos2 ~vel1 ~vel2] finds the time of closest approach
7474+ between two objects using quadratic refinement. Arrays must be the same
7575+ length (synchronized time steps). Returns [None] if fewer than 3 points. *)
73767477(** {1 Encounter geometry} *)
7578···8083 sigma_y : float; (** 1-sigma uncertainty along y-axis (km). *)
8184 hbr : float; (** Combined hard-body radius (km). *)
8285}
8383-(** Conjunction geometry projected onto the conjunction plane. Most users
8484- should use {!assess} instead of constructing this directly. *)
8686+(** Conjunction geometry projected onto the conjunction plane. Most users should
8787+ use {!assess} instead of constructing this directly. *)
85888689val encounter_of_cdm : hbr:float -> Cdm.t -> encounter
8790(** Project a CDM onto the conjunction plane. *)