Skip to content

Hoverslam simulation: normalized units, as PSG - #2791

Merged
lamont-granquist merged 1 commit into
devfrom
lcg/hoverslam-updates
Nov 22, 2026
Merged

lamont-granquist merged 1 commit into
devfrom
lcg/hoverslam-updates

Conversation

@lamont-granquist

Copy link
Copy Markdown
Collaborator

The simulation integrated in SI, where the Tsit5 Atol of 1e-6 is 1e-6 m, m/s and kg on every component: very tight on the components near zero (z in an equatorial orbit, the Dv at the start) while the Rtol governs the rest. It now runs in normalized units, like PSG's Problem: the manager takes and logs SI inputs, and Reconfigure builds a HoverslamProblem scaled by the target radius, the circular speed there and the starting mass (so mu is 1), and normalizes the phases. The results are reported back in SI. Rhs checks the phase is normalized.

Phase gets RescaleInPlace, for the hoverslam's pooled phases, which Rescale's copy would allocate on every cycle (MunLander's ShouldNotAllocate). Rescale is now a copy and RescaleInPlace.

Brent stops within 2 rtol max(|t|, 1), whose floor is now one unit of time (several hundred seconds), so its rtol is divided by the time scale to keep the 2e-6 s floor for an ignition near now. Away from now it is tighter than before: the landing radius ends within 1e-6 m of the target instead of a few cm, for about one more root solve iteration.

Over the 16 test scenarios a solve is 27% faster (38.3 to 28.0 ms), all of them faster. Against a 1e-10 tolerance reference, the ignition time stays within 2.5e-4 s, better in some scenarios and worse in others. Dv on Earth is looser, up to 0.014 m/s of 3,922 m/s, the velocity Atol being 1e-6 of 7.9 km/s.

VerticalDropApolloMoon15Km, EarthJustAfterLiftoff and FalconNineAtBecoIgnitesBeforeApoapsis are re-pinned; the largest move is 2.1e-4 s on the Falcon 9 ignition. MunLanderTwoStage loses a stale comment about ~0.2 m/s of Dv chatter, and its Dv is re-pinned at 1e-5 instead of 1e-3.

The simulation integrated in SI, where the Tsit5 Atol of 1e-6 is 1e-6 m,
m/s and kg on every component: very tight on the components near zero
(z in an equatorial orbit, the Dv at the start) while the Rtol governs
the rest. It now runs in normalized units, like PSG's Problem: the
manager takes and logs SI inputs, and Reconfigure builds a
HoverslamProblem scaled by the target radius, the circular speed there
and the starting mass (so mu is 1), and normalizes the phases. The
results are reported back in SI. Rhs checks the phase is normalized.

Phase gets RescaleInPlace, for the hoverslam's pooled phases, which
Rescale's copy would allocate on every cycle (MunLander's
ShouldNotAllocate). Rescale is now a copy and RescaleInPlace.

Brent stops within 2 rtol max(|t|, 1), whose floor is now one unit of
time (several hundred seconds), so its rtol is divided by the time scale
to keep the 2e-6 s floor for an ignition near now. Away from now it is
tighter than before: the landing radius ends within 1e-6 m of the
target instead of a few cm, for about one more root solve iteration.

Over the 16 test scenarios a solve is 27% faster (38.3 to 28.0 ms), all
of them faster. Against a 1e-10 tolerance reference, the ignition time
stays within 2.5e-4 s, better in some scenarios and worse in others.
Dv on Earth is looser, up to 0.014 m/s of 3,922 m/s, the velocity Atol
being 1e-6 of 7.9 km/s.

VerticalDropApolloMoon15Km, EarthJustAfterLiftoff and
FalconNineAtBecoIgnitesBeforeApoapsis are re-pinned; the largest move
is 2.1e-4 s on the Falcon 9 ignition. MunLanderTwoStage loses a stale
comment about ~0.2 m/s of Dv chatter, and its Dv is re-pinned at 1e-5
instead of 1e-3.
@github-actions

Copy link
Copy Markdown
Contributor

✅ Build Artifact 🚀

MechJeb2-0bec9cf.zip (built from d6b6ddd)

@lamont-granquist
lamont-granquist merged commit 23b530e into dev Nov 22, 2026
3 checks passed
@lamont-granquist
lamont-granquist deleted the lcg/hoverslam-updates branch November 22, 2026 00:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant