Remix.run Logo
▲ westurner a day ago

How do KSP and e.g. JPL SPICE model gravity?

Does KSP model perihelion of Mercury (as measured by MESSENGER after its orbital maneuvers) or orbital resonances like the 1.5PN post-Newtonian expansion of the GR (General Relativity) metric tensor?

KSP could simulate N-body gravity and 2.5PN gravitational waves with any of a number of models: Cachazo's over Witten's SU(4) twistor string theory, QED scattering gravity, GrC(2,4)•GrC(2,4)^V gravity (with the Caret Wedge)

KSP2 unfortunately won't run in WASM in a browser tab with localstorage/sqlite for students without login.

▲TeMPOraL a day ago | parent | next [-]

I was addressing the trajectory planning bits - to get the major point of the difficulty you don't need anything beyond the stock KSP's model: it's enough to make you feel the Δv requirements for getting there directly vs. with gravity assists, and understand the basics of orbital mechanics on a visceral level.

As for more complex gravity models - there are mods. Specifically, I know of Principia [0], which adds "N-body and extended body gravitation". Never got around to testing it, so I don't how well it could model the aspects of gravity they had to account for in the real mission, but it should be enough for the major factors.

--

[0] - https://github.com/mockingbirdnest/Principia

▲westurner a day ago | parent [-]

There are no real observations with which to attempt to calibrate or score the Kerbal Space program or Principal mod gravity models.

Principia could add a solar system model that there is real test data for, and then measure E_rel (relative error) against 1.5PN and 2.5PN gravity.

I have a rudimentary "error compared to GR" UI feature that shows how wrong Newtonian orbital predictions are compared to GR and multiple concordant non-GR models after a number of Earth cycles, but haven't solved for visual comparisons of significantly-different model predictions.

▲Sharlin a day ago | parent | prev | next [-]

KSP's model of orbital mechanics is much simpler than what they use in the real world.

And in the real world, they use a simple Newtonian finite element model that just ignores any less-than-planetary bodies. Any relativistic corrections, never mind corrections from asteroids and so on are infinitesimal relative to the precision needed to move stuff around the Solar System. This is engineering, not science, so you just budget for a few kg of propellant for minor trajectory corrections along the way and call it a day.

▲westurner a day ago | parent [-]

But then how to validate any model of gravity?

I just looked this up because we used MESSENGER data to validate our model of gravity; just like they used the 43 arcsecond perihelion of mercury to validate General Relativity.

"Use of MESSENGER radioscience data to improve planetary ephemeris and to test general relativity" (2013) [1306.5569] https://arxiv.org/abs/1306.5569

"Precession of Mercury’s Perihelion from Ranging to the MESSENGER Spacecraft" (2017) https://iopscience.iop.org/article/10.3847/1538-3881/aa5be2

SPICE (observation geometry system) https://en.wikipedia.org/wiki/SPICE_(observation_geometry_sy... doesn't describe the physics model implemented by e.g. the SPK kernel.

The PDS data might be useful for model validation.

NASA JPL NAIF: Navigation and Ancillary Information Facility hosts SPICE toolkit: https://naif.jpl.nasa.gov/naif/

TIL about WebGeocalc for professionals.

But how does Kerbal Space Program model gravity? From Gemini succinctly:

> [KSP models gravity with] Newtonian dynamics and patched conic approximations, simulating spacecraft trajectories around one celestial body at a time inside discrete Spheres of Influence (SOI) rather than solving multi-body gravitational interactions simultaneously

SOI: "Sphere of influence" - Kerbal Space Program Wiki https://wiki.kerbalspaceprogram.com/wiki/Sphere_of_influence

Sphere of influence (astrodynamics) https://en.wikipedia.org/wiki/Sphere_of_influence_(astrodyna...

Patched conic approximation: https://en.wikipedia.org/wiki/Patched_conic_approximation

IDK if that's faster or slower than our models because I don't have an implementation of same in Rust/WASM to compare.

"Grassmannian Gravity from QED & Gauge Scattering Amplitudes: Complex \(Gr_{\mathbb{C}}(2,4)\) Orbital Precession, Mercury’s Perihelion, \(N\)-Body Dynamics, and Dilatant Dark Fluid (DDF) Unification in Lean 4" > "4. -Body Sink Superposition on ⁡ℂ⁡(2,+2) & Conservative Action vs. Stokes-Drag Critique" (2026-10) https://westurner.github.io/sustainablefactory/grassmannian-...

But then last week we corrected our gravity model to also cover celestial holography per Toupin (2025),

"Celestial Holography, the Canonical Dictionary (\(\Delta = 2s\)), Plancherel–Unruh Graviton Loop Weights (\(M_1 = 1/8, M_2 = 1/90\)), and Integrated Turner Models 15a & 15b for Gravitons and Riemann Spectral Bridges in Lean 4, Rust/PyO3, and SymPy" > "4.1 How Gravitons Are Modeled Across All 15 Frameworks in src/signals" (2026-11) https://westurner.github.io/sustainablefactory/grassmannian-...

I'm interested to see which model of N-body gravitational dynamics has the best time-cost performance as implemented. Instead, we've pressed on to N-Soliton dynamics for quantum circuit simulation applications; but N-Soliton dynamics is apparently also relevant to modeling gravitational waves from N-body gravitational orbits.

Modeling electrodynamics and gravity separately doesn't make sense if gravity follows from QED scattering. But is it necessary to model rotation and electrodynamics for orbital trajectory modeling in normal systems without neutron stars or black holes with topology?

▲teamonkey a day ago | parent | next [-]

Measuring minuscule variations in an orbit is possible without those variations having any practical impact on the orbit itself. For orbital dynamics Newtonian physics is good enough.

▲westurner a day ago | parent [-]

But why develop a different gauge for gravity as for superposition of photons and electrons if there is a unified model that's more accurate?

▲whatshisface 21 hours ago | parent [-]

The LLM you are chatting with is not working, that is not correct.

▲westurner 7 hours ago | parent [-]

But have you supported your argument with check figures or tests?

▲Sharlin a day ago | parent | prev | next [-]

Umm... been chatting with LLMs?

▲westurner a day ago | parent [-]

Do you have a question about the math or the check figures or the tests?

▲qlte 21 hours ago | parent | prev [-]

  > But then last week we corrected our gravity model to also cover celestial holography per Toupin (2025),
Who is we? I clicked your link and it's a wiki knowledge base planning some kind of ... automated fab or factory on Mars? With a bit of quantum computing involved for good measure?

There's too much content for any human to read but a quick skim is giving some AI psychosis vibes...

https://westurner.github.io/sustainablefactory/index.html

▲ 6 hours ago | parent | next [-]
[deleted]
▲westurner 7 hours ago | parent | prev [-]

> AI psychosis

Is that your professional opinion?

> who is we

/? Use of the term we in scholarly articles https://www.google.com/search?q=Use+of+the+term+we+in+schola...

How do you think that the (multiple) foundation models should be credited and cited?

But I don't need that from you

Have you validated the mathematical argument in any way?

▲CDSlice a day ago | parent | prev | next [-]

KSP uses a very simplified model where the planets are all on rails and your spacecraft is only affected by the gravity of whatever object you are orbiting. It also doesn’t use the real solar system and instead a much smaller and simpler system that is a lot easier to travel between. There are mods you can install to get the real solar system and N-body physics but I haven’t messed with them very much.

▲itintheory a day ago | parent | prev [-]

I heard KSP2 wasn't very good unfortunately. But I'm curious about a WASM KSP. Is that a thing?

Thanks,

▲wafflemaker a day ago | parent | next [-]

True, KSP2 is a forever beta early access scam. Sad but true. Team was disbanded before game was finished. I believe it should be illegal to have games in forever early access, maybe Gabe will read it and agree. The studio did it (early access launch then disband) with premeditation.

And the mods those people are talking about up the difficulty level significantly, and are difficult to run, while KSP runs out of the box on Linux.

Vanilla KSP alone is quite hard on realistic difficulty level (when you need to put radio retransmitters in space to contact far away probes) and gives a true sense of accomplishment every time you move the goalpost of how far you can get.

And it's simplified conic sections and Sphere of Influence gravity model is the same that was used to get to noon in 60s.

▲Tuna-Fish 18 hours ago | parent | next [-]

The company that owned the rights to the brand solicited bids for developers to make KSP2. They got two:

1. The developers of KSP1, + some modders, with a plan that was rooted in experience with the first game and not particularly flashy.

2. Outsiders with a lot of nice presentation but little understanding of the first game.

The second team got picked, shat the bed, and the game was abandoned. The first team is now developing "Kitten Space Agency" independently.

▲TeMPOraL 11 hours ago | parent [-]

> The first team is now developing "Kitten Space Agency" independently.

That's the key information I've been missing that changed my perspective on KSA from "oh, some clone trying to fill in the vacuum, probably KSP2 again, maybe check out later" to "OMG need to check it out NOW". Thank you!

▲Tuna-Fish 8 hours ago | parent [-]

The caveat is that if you are expecting a polished game on a reasonable schedule, KSA is not that. The dev team is deliberately spending time in that pre-alpha phase where they experiment and play around with mechanics, because they felt that the "game" parts of KSP that got bolted on top of the simulation were rushed and many of them were mistakes, and they chose to try to not repeat it.

▲TeMPOraL 7 hours ago | parent [-]

Why does this smell like the modding community divide that happened around when KSP devs wanted to get some modders on-board to make simplified version of popular mods into first-party features?

▲westurner a day ago | parent | prev [-]

People would probably optimize it if they open source the incomplete KSP2 and continue to sell the closed source version?

Performance in Proton WINE is important now because Steam Deck.

▲westurner a day ago | parent | prev [-]

FWIU teh KSP team was disbanded?

DirectX in WASM with WebGL might already be doable?

I have gravity in Lean->Rust/WASM in one project but haven't yet integrated the new models with the ThreeJS UI in another project, but no gameplay for an orbit planning space launch with EVA web game with accessible physics instruction in HTML with Linked Data yet.

Tauri-web with WGPU and WGSL WebGPU Shader Language for tensor/twistor ops might work instead of ThreeJS, but would the tokens be better spent on implementing CubeCL and optimization and verification.