Skip to content

Collision & Shadow Detection

Event detection keeps missions safe by flagging impacts and eclipse transitions during propagation.

Collision Detection

  1. Broad phaseAltitudeCalculationService checks start/end altitudes for each integrator step. If both samples sit below the surface, the collision is recorded immediately.
  2. Ellipsoidal intersectionCollisionDetector transforms the trajectory segment into the body-fixed frame, scales by the ellipsoid radii (r_x, r_y, r_z), and solves ||p_0 + t d||^2 = 1 for t ∈ [0, 1].
  3. RefinementCollisionRefiner bisects around the hit time using dense output from the integrator to recover the impact epoch and state.
  4. Validation – Impact altitude is rechecked before events are emitted to avoid false positives from numerical noise.

Collision markers surface in the 3D scene, groundtrack overlays, and analytics exports so you can review approach vectors and redesign trajectories quickly.

Shadow / Eclipse Detection

  • SimpleShadowModel projects spacecraft line-of-sight against the Sun vector, accounting for body radii to detect umbra and penumbra ingress/egress.
  • The same geometric tooling used for collision detection determines crossing times to sub-step resolution.
  • Resulting events feed the boundary bus, timeline, and spacecraft inspectors. Solar radiation pressure automatically suspends during umbra periods.

Tune collision meshes and eclipse behaviours per body in CelestialBodyRegistry when you introduce non-spherical primaries or artificial obstacles.

Built with VitePress