viewingAltitudeKm

function viewingAltitudeKm
devtools/src/travel.ts:823
viewingAltitudeKm(body: Body) → number

A circular orbit that frames the body and stays put.

One radius up, so the center sits two radii away and the body subtends 2·asin(1/2) = 60° — just inside the 65° field of view the client uses. A quarter of a radius was the first guess and it is wrong in a way you only see on screen: the body subtends 106° and fills the frame edge to edge, so arriving somewhere new looks like a flat colored wall rather than a planet.

The clamp against the sphere of influence is the part that is not obvious: a "circular orbit" placed outside the SOI is reframed to the parent — stepFlight leaves at 1.05 × SOI — and what was a parking orbit becomes a hyperbolic departure, so the debug verb that promised to park you somewhere would instead fling you into the system. The margin below that threshold is thin on purpose. Half the SOI was the first attempt and it is too generous to be useful: Proxima Centauri I orbits at 0.005 AU, so half its SOI is 750 km inside its own surface and the clamp collapsed onto the floor, leaving you 10 km above the ground looking at an orange wall. A circular orbit does not drift, so the only headroom it needs is against the threshold itself.

bodyBody
Undocumented
Returnsnumber