Collision Avoidance Maneuver design for conjunction assessment
README.md

cam #

Collision avoidance maneuver (CAM) design for satellite conjunctions.

When two objects in orbit are predicted to pass close to each other, the screening service sends the operator a conjunction data message (CDM) with the time of closest approach (TCA), the miss distance and the uncertainty of both positions. From these the operator computes the probability of collision (Pc) and, above a threshold, plans a small burn that moves the satellite out of the way. The threshold is an operational convention that each operator sets; 1e-4 is the value NASA's Conjunction Assessment Risk Analysis team and many operators use (NASA Spacecraft Conjunction Assessment and Collision Avoidance Best Practices Handbook, 2020). Cam sizes that burn. It evaluates a proposed impulsive maneuver, finds the smallest delta-v that brings Pc below a target, and compares several burn sizes. Delta-v is the change of velocity a burn gives the satellite, in m/s, and measures the fuel the maneuver costs. The Pc computation comes from the collision library, and the burned trajectory is propagated with kepler when the state vectors are known.

When only the miss vector at TCA is known, evaluate moves the satellite in a straight line: a burn of dv m/s made dt seconds before TCA shifts the miss component in the burn direction by dv × dt. In the example below, 0.01 m/s × 21,600 s moves the along-track miss by 216 m. This linear model understates a tangential burn over hours: in orbit, a tangential burn makes the along-track separation grow by about 3 × dv × t (the secular term of the Clohessy-Wiltshire equations), three times the straight-line figure. Given the satellite's position and velocity at the burn and the secondary's position at TCA, given as the conjunction's kepler states, evaluate propagates the burned Keplerian orbit instead.

Installation #

Install with opam:

$ opam install cam

If opam cannot find the package, it may not yet be released in the public opam-repository. Add the overlay repository, then install it:

$ opam repo add samoht https://tangled.org/gazagnaire.org/opam-overlay.git
$ opam update
$ opam install cam

Usage #

(* Evaluate a tangential burn 6 hours before TCA *)
let maneuver : Cam.maneuver =
  { dt = 21600.; dv = 0.01; direction = `Tangential }

let conjunction : Cam.conjunction =
  { miss_r = 50.; miss_t = 200.; miss_n = 0.;
    sigma_r = 30.; sigma_t = 100.; hbr = 10.; kepler = None }

let () =
  let result = Cam.evaluate conjunction maneuver in
  Printf.printf "Pc before: %e, after: %e\n"
    result.pc_before result.pc_after

(* Simple API: compute avoidance burn directly from a CDM *)
let avoid_from_cdm cdm =
  match Cam.avoid cdm ~dt:21600. with
  | Some (result : Cam.result) ->
      Printf.printf "Burn: %.4f m/s\n" result.delta_v
  | None -> print_endline "Already safe or no solution"

(* Find minimum delta-v to achieve target Pc *)
let () =
  match
    Cam.min_dv conjunction ~direction:`Tangential ~dt:21600. ~target_pc:1e-5
  with
  | Some dv -> Printf.printf "Min dv: %.6f m/s\n" dv
  | None -> print_endline "No solution"

API #

  • direction is the burn direction in the RTN frame: `Tangential, `Radial or `Normal. The RTN frame is centred on the satellite: R points away from the Earth's centre, N along the orbit's angular momentum (normal to the orbital plane), and T completes the triad, close to the direction of motion.
  • maneuver is an impulsive burn: its time before TCA dt in seconds, its size dv in m/s and its direction.
  • result holds the miss distances and the Pc before and after a maneuver, and its delta-v cost.
  • avoid finds the smallest burn for a CDM, and returns None when no burn reaches the target Pc.
  • conjunction is the miss components, the position sigmas, the hard-body radius and, optionally, the kepler states to propagate a burn with.
  • evaluate computes the effect of one maneuver on the conjunction.
  • min_dv finds the smallest delta-v in a direction that reaches a target Pc.
  • screen evaluates several maneuvers and sorts them by the Pc after each.

Miss distances, sigmas and the hard-body radius are in metres in a conjunction; avoid takes the hard-body radius in km. The hard-body radius is the radius of a sphere enclosing both objects: a collision is counted when the miss vector falls inside it.

Testing #

The interoperability tests in test/interop/gmat/ replay a tangential burn produced by NASA GMAT R2026a as an Orbit Ephemeris Message (OEM, CCSDS 502.0), a text file of time-tagged position and velocity vectors. An impulsive burn splits the OEM into two segments, one ending and one starting at the burn epoch with the same position and different velocities. The tests check the handling of that boundary, the velocity discontinuity (a 0.1 km/s delta-v with no change in position) and the raised orbit after the burn.

Licence #

ISC. See LICENSE.md.