Collision probability computation for conjunction assessment
0
fork

Configure Feed

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

add x-quality metadata to 171 packages, fix sse build

Generate .opam.template files with x-quality-* fields based on
detected package features:
- x-quality-build: has lib/ with .ml files
- x-quality-test: has test/ with .ml files
- x-quality-fuzz: has fuzz/ with .ml files
- x-quality-interop: has test/interop/ directory
- x-quality-cram: has test/*.t/ directories

These fields are picked up by dune's opam generation and will be
checked by merlint E910 for consistency.

Also: add fmt dep to ocaml-sse/lib/dune (Fmt.pf used without dep).

+11 -4
+4
collision.opam.template
··· 1 + x-quality-build: "2026-04-15" 2 + x-quality-fuzz: "2026-04-15" 3 + x-quality-interop: "2026-04-15" 4 + x-quality-test: "2026-04-15"
+7 -4
lib/collision.ml
··· 438 438 let b = 439 439 ((h0 *. h0 *. (y2 -. y1)) -. (h2 *. h2 *. (y0 -. y1))) /. denom 440 440 in 441 - if a <= 0.0 then 442 - Some (tca_at_index times pos1 pos2 vel1 vel2 i !min_d2) 441 + if a <= 0.0 then Some (tca_at_index times pos1 pos2 vel1 vel2 i !min_d2) 443 442 else 444 443 let dt = -.b /. (2.0 *. a) in 445 444 let t_star = Float.max t0 (Float.min t2 (t1 +. dt)) in 446 445 let dt_c = t_star -. t1 in 447 - let d_star = sqrt (Float.max 0.0 ((a *. dt_c *. dt_c) +. (b *. dt_c) +. y1)) in 448 - let frac = Float.max 0.0 (Float.min 1.0 ((t_star -. t0) /. (t2 -. t0))) in 446 + let d_star = 447 + sqrt (Float.max 0.0 ((a *. dt_c *. dt_c) +. (b *. dt_c) +. y1)) 448 + in 449 + let frac = 450 + Float.max 0.0 (Float.min 1.0 ((t_star -. t0) /. (t2 -. t0))) 451 + in 449 452 let dv_lo = Vec3.length (Vec3.sub vel1.(i - 1) vel2.(i - 1)) in 450 453 let dv_hi = Vec3.length (Vec3.sub vel1.(i + 1) vel2.(i + 1)) in 451 454 let dv = dv_lo +. (frac *. (dv_hi -. dv_lo)) in