Collision & Shadow Detection
Event detection keeps missions safe by flagging impacts and eclipse transitions during propagation.
Collision Detection
- Broad phase –
AltitudeCalculationServicechecks start/end altitudes for each integrator step. If both samples sit below the surface, the collision is recorded immediately. - Ellipsoidal intersection –
CollisionDetectortransforms 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 = 1fort ∈ [0, 1]. - Refinement –
CollisionRefinerbisects around the hit time using dense output from the integrator to recover the impact epoch and state. - 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
SimpleShadowModelprojects 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.