Question: which elevation gives the longest range, and how far is that from the 45 degrees of the vacuum parabola? (Wind, Coriolis and spin are switched off for this sweep; speed, mass, diameter and air come from the Setup tab.)
Equations used
Point mass, RK4 integration (dt = 4 ms, last step shortened to land exactly on the ground).
a = g + a_drag + a_Coriolis
a_drag = -(1/2) rho Cd(M) A / m * |v_rel| v_rel v_rel = v - v_wind
M = |v_rel| / c c = sqrt(gamma R T)
a_Coriolis = -2 Omega x v Omega = w (0, cos(lat), sin(lat)) [E,N,Up]
Vacuum check: R = v cos(th) (v sin(th) + sqrt(v^2 sin^2(th) + 2 g h)) / g, best angle th* = atan(v / sqrt(v^2 + 2 g h)) = 45 deg at h = 0.
Air, Mach and the transonic drag rise
Earth: ISA-style atmosphere with a 6.5 K/km lapse rate from the site temperature and altitude; rho = p / (R T). Speed of sound falls with temperature, so cold air makes the same speed a higher Mach number. Mars: rho = 0.020 exp(-h/11.1 km) kg/m3, c = 240 m/s. Moon: vacuum.
Cd(M) is a generic, smooth curve of a streamlined round: almost flat below Mach 0.8, a steep rise through Mach 1 as shock waves form, a peak near Mach 1.1, then a slow decline. It is a textbook shape, not a measured table of any real object. A projectile that starts supersonic and decelerates crosses the rise twice in terms of drag change, which shows up as a sudden loss of speed.
Wind, spin drift, Coriolis
Wind enters through the relative velocity, so a crosswind pushes sideways with the drag force (the classic lag-time rule: drift is about wind x (t - x / v0)). Spin drift uses the empirical rule of thumb 1.25 (Sg + 1.2) t^1.83 inches; it is only calibrated for flights of a few seconds, so beyond 5 s the curve is continued along its tangent, and it is scaled down with air density (none in vacuum). Coriolis is integrated exactly in the rotating frame; the lateral term is about 2 w sin(lat) times the downrange distance integrated over time, and the vertical (Eotvos) term changes the range for east-west flights. The Moon turns 27 times slower than Earth, so its effect is tiny.
Simplifications and notes
No lift, Magnus force, yaw dynamics, wind shear, Earth curvature or varying gravity. Flat ground at launch-site level; range is measured from the trunnion pivot. Plates are only range markers: the readout lists where the path is at that distance. This is a physics teaching model, not a tool for any real equipment.