Rolling out the spacecraft…
🛰 Autopilot controls
The science

Relative motion. In the rotating Hill frame of a circular orbit with mean motion n = √(μ/a³) the chaser obeys the Clohessy–Wiltshire equations x″ = 3n²x + 2n y′ + ax, y″ = −2n x′ + ay, z″ = −n²z + az (x radial, y along-track, z cross-track). Free drift is exact (closed-form transition matrix); without thrust a radial offset makes the chaser drift along-track, which is why you cannot just coast at a target ahead.

Autopilots. PD with cancellation commands a = −ω²r − 2ωv − fCW(r,v), so the closed loop is a critically damped double integrator r(t) = r0(1+ωt)e−ωt. Plain PD lets the orbital terms act as disturbances. The LQR sampled every 1 s minimises ∑ (q|r|² + qv|v|² + |a|²) by solving the discrete Riccati equation for the zero-order-hold CW system, with q chosen so that ω sets the bandwidth.

Fuel and contact. Δv = ∫|a| dt, propellant from the rocket equation mp = m0(1 − e−Δv/(g0 Isp)) with m0 = 8000 kg, Isp = 220 s. Contact is declared inside a 0.3 m capture radius; the speed there must be below the 0.1 m/s limit used in this model (an illustrative value, real ports have their own limits). Thrust is clipped to the limit you set; navigation noise is Gaussian on the measured state.

Honest simplifications. Point mass on a circular orbit, linear (small-separation) dynamics, perfect continuous thrusters, no attitude control, plume impingement, sensors beyond Gaussian noise, J2, drag, or collision avoidance; the 3D and 2D bodies are drawn larger than the numbers they represent. It is a guidance-concept model, not flight software.

Independent checks (run on load, same core as the 2D page):

running…

Docking run

Time-
Range to port-
Closing speed / total speed-
Thrust (of limit)-
Δv used / propellant-
Contact-
Orbit period / n-
range (log)speed (log)0.1 m/s limit
thrust / limitΔv
path in the Hill plane (along-track right, radial up)coast
-
Drag to orbit, pinch or scroll to zoom; View cycles chase, wide and port camera. Educational model, not flight software.
Made with 🟠 Blender · Three.js