eggrobin

[WIP][1.5.1, 1.6.1, 1.7.x] Principia—version del Ferro, released 2019-08-30—n-Body and Extended Body Gravitation, axial tilt

Recommended Posts

How far from completion do you think you are?

Gravity wave? General relativity?

Share this post


Link to post
Share on other sites

This is so exciting. Thank you for working on this and for publishing the math crib notes. It's revitalized my interest in mathematics! I've been watching some khan academy stuff about partial differential equations, which is shocking because I've never liked math before!

Wonderful and meaningful work!

Share this post


Link to post
Share on other sites

I'll be honest, I'm not sure if this is fully implementable. Even if it is, I'm not sure KSP's feeble memory can ahndle it. If it can though,... this will be officially the greatest change in the history of KSP, ever. EVER.

Share this post


Link to post
Share on other sites

Status update:

Bourbaki is out, you can get it by asking on IRC (#principia on EsperNet), as usual.

Please bear in mind that the channel operators may be away from keyboard, so you should wait until you're noticed (it also helps to say the name of the channel operators since that pings them).

As of 2015-08-16T15:38Z, the build for Win32 is ready, we're waiting for Norgg and armed_troop for the Linux and Macintosh builds respectively.

Note that you should read the FAQ before installing principia.

Rough changelog:

  • Reimplemented integrators: the symplectic Runge-Kutta-Nyström integrator was reimplemented more cleanly, an embedded explicit Runge-Kutta-Nyström integrator was implemented. Abstractions for differential equations were created.
  • Ephemeris: the celestial bodies are integrated on their own, with their own (much larger) timestep (45 min);
    their trajectories are then fitted using çõñышёò series, yielding continuous trajectories. This means that when there are no vessels (including asteroids, see the FAQ), timewarp at very high speed (6'000'000x was tested in RSS) is smooth.
  • The predictions are computed using an adaptive step size, so they're faster and less fiddly (you still get a tolerance setting, but it doesn't need as much attention as the step size setting; the step size will shorten near periapsis and lengthen near apoapsis on its own). The histories are still in fixed steps of 10 s, that will likely change in Brouwer, since it is one of the biggest performance costs now.
  • There is an initial configuration for Real Solar System: the planets will start in the right places as given by the JPL HORIZONS service, and they are given gravity models using the freshest data available (Vesta's model is from Dawn data, some Cassini data gets used). Please note the RSS-specific recommendations in the FAQ.
    A side effect of that is that the moon becomes far more accurate: since the motion of the moon is very much a 3-body problem, it cannot be accurately represented in RSS alone. In particular, real-life eclipses can be observed in principia + RSS (please note the unexpected inaccuracy mentioned in the FAQ).
  • This initial configuration also includes J2 for the Sun, the planets, the Moon, and Vesta, so the resulting effects are felt (precession of Earth orbits, the possibility of heliosynchronous orbits, etc.).

Bourbaki is save-compatible with Borel, for RSS users, please note that unless you reset the plugin, the new initial state and gravity model configuration files will not be taken into account.

Share this post


Link to post
Share on other sites

eggrobin, can we wait for Stock and 6.4x-Stock size configs for Principia?

Later edit: sorry, I must had read at least some last pages first.:(

Edited by Lexx Thai

Share this post


Link to post
Share on other sites
eggrobin, can we wait for Stock and 6.4x-Stock size configs for Principia?

Later edit: sorry, I must had read at least some last pages first.:(

To clarify, initial state and gravity model configs are not needed, if there are none we'll use the gravitational parameters, positions, and velocities given by KSP when the plugin starts.

They are needed if you wish to get oblateness (KSP has no concept of this, so I do not have this information), or to use a very accurate initial state (the initial configs are directly fed into the plugin, without going through KSP's orbital calculations).

Share this post


Link to post
Share on other sites
Thanks for answer. But after "slow" reading the OP, I think I'm not so expirienced for this mod.

You don't need to understand the technical details discussed in the OP to use the mod, much like you don't need to understand control theory to use MechJeb; these details are just there for people interested in what happens behind the scenes (this is a development thread after all).

Share this post


Link to post
Share on other sites

Question, why don't you offer the Mod as a download. Are you afraid of something?

Also any plans to integrate this mod with LEO orbital decay?

Share this post


Link to post
Share on other sites
Are you afraid of something?

That comes off kinda rude.

Meanwhile, there are a number of possible reasons for why a developer may not care to release their work fully. First and foremost, if they do not think it ready for public consumption and don't want to deal with the ensuing storm of complaints from people who do not read the documentation, do not understand if a project is anywhere short of perfectly tested and functional, and seem to consider it a personal affront if they can't pick it up immediately. Restricting access to testing builds to those who have the sense to follow moderately complex directions is effective at limiting the problems mentioned. "Log on to IRC and ask" is a suitably simple test of reading comprehension to be effective, I think.

Share this post


Link to post
Share on other sites

Well my intention was not to be rude. I understand this mod is not fit for gaming. As a developer myself I only wish to know what effect it would have on the mods I'm developing myself, specificly engine accelation durring timewarp for very high ISP engines.

Share this post


Link to post
Share on other sites
Question, why don't you offer the Mod as a download.

I do offer the mod as a download, just go on the IRC channel and ask for it. :)

You're probably asking why I don't simply put the link on the forum though.

Are you afraid of something?

Well, this:

people who do not read the documentation

In particular, there are some atypical considerations (bugreporting is different than for other mods, we have our own logs and our main failure mode is crashing, you need different builds for different platforms, you need to have the proper C++ runtime for your build).

More generally, I'm afraid of this place turning into the FAR or MechJeb thread while this mod is under heavy development; I'd rather spend my time writing the mod than managing a messy forum thread, especially since it tends to take me a while to write a post (this one took me 25 min).

Also any plans to integrate this mod with LEO orbital decay?

Drag is mentioned in the OP, in the "Further modding" section, however it will be a while before we add that. When using RSS with Bourbaki, you already get interesting precession of low or medium Earth orbits due to oblateness, which requires you to either correct every now and then, or to pick stable orbits (üþûýøѠorbits are fun!).

Edit:

I understand this mod is not fit for gaming.

Oh, I had entirely forgotten this "prototype useless for gaming purposes" thing. I wrote that back in the days of the C# prototype in February 2014, that plugin ignored thrust (and was ridiculously slow)...

I should probably remove that, considering I always play with principia. :P

Edited by eggrobin

Share this post


Link to post
Share on other sites

Oh dear. You actually got this working! :)

I really have to reinstall KSP now (Yes, I threw the towel because of the horror that is OSX KSP right now. Hopefully 1.1 will solve the RAM problems).

And you even implemented the multipolar expansion of gravity fields, man you are crazy :D What does it look like around Gilly?

(By the way, since you are talking about precession etc., is automatic stationkeeping still on the cards for someday?)

Share this post


Link to post
Share on other sites
Oh dear. You actually got this working! :)

I really have to reinstall KSP now (Yes, I threw the towel because of the horror that is OSX KSP right now. Hopefully 1.1 will solve the RAM problems).

And you even implemented the multipolar expansion of gravity fields, man you are crazy :D What does it look like around Gilly?

Only J2 at the moment, so that's just the quadrupole. We only added oblateness for bodies where we had readily-available data, so the sun, the planets, the Moon, and Vesta, in our real solar system (it turns out that JPL doesn't have SPICE kernels for the Kerbin system :P).

It's in config files, so it could be added, but you'd need to add a Cartesian initial state too.

(By the way, since you are talking about precession etc., is automatic stationkeeping still on the cards for someday?)

Yes, but it won't be soon. On the other hand, I'm working on manœuvre nodes right now. This first cut of manœuvre nodes will use extended burns (rather than instant burns like stock), but inertially guided (following some fixed inertial direction, rather than tied to the prograde vector; in order to make the interface palatable, we'll enable specification of that direction with respect to the prograde vector at the start of the burn, but it won't track), and constant-thrust (so the fancy SRBs from Realism Overhaul won't be accurately predicted).

Other things on the roadmap for Brouwer include new plotting frames: surface frame, two-body frame centred on one body rather than on the barycentre, enabling this sort of plot, or better visualization of heliosynchronous orbits (the barycentre frame is nice for Lagrange points or transfers, but with even mildly eccentric orbits it's not pretty for orbits around either body).

Edited by eggrobin

Share this post


Link to post
Share on other sites

Can't the oblateness of a body in hydrostatic equilibrium be "easily" "calculated" from the radius, rotation period and density curve of a body? e.g. I think you can safely assume scaled earth-/mars-/jupiter-like density profiles for Kerbin/Duna/Jool.

I once did an experimented where I placed a ship at 45 deg N on Kerbin and watched it drift towards the equator at 7mm/s due to the forces caused by Kerbin's spherical nature.

Share this post


Link to post
Share on other sites
Can't the oblateness of a body in hydrostatic equilibrium be "easily" "calculated" from the radius, rotation period and density curve of a body? e.g. I think you can safely assume scaled earth-/mars-/jupiter-like density profiles for Kerbin/Duna/Jool.

Yes, but that requires physical assumptions about the bodies (and in practice, it's a really bad way to get this number for planets). Considering the impossibly-dense material the Kerbin system is made of, we will leave the design of its physical properties to people who design solar systems (they might want to add fjords :)).

I once did an experimented where I placed a ship at 45 deg N on Kerbin and watched it drift towards the equator at 7mm/s due to the forces caused by Kerbin's spherical nature.

Surely you mean oblate, the gravitational field from a homogeneous sphere is that of a point mass.

Share this post


Link to post
Share on other sites
Yes, but that requires physical assumptions about the bodies (and in practice, it's a really bad way to get this number for planets

I'm just saying, maybe a wild guess/downscale from RSS might be better than not having any gravitational quadrupoles in the Kerbol system at all.

Surely you mean oblate, the gravitational field from a homogeneous sphere is that of a point mass.

Nope :P. You've spent so much time doing gravity stuff in inertial reference systems that you totally forgot about the rules that apply on the surface of rotating bodies (no offense :)). Kerbin should be oblate because it's rotating, but it is not because SQUAD simplified things. In real-life, if Earth was suddenly spherical, all oceans would flow towards the equator until Earth has returned to its proper oblate shape. This effect can be measured in-game, because the centrifugal force is simulated properly by the engine. At 45 deg N on a sphere it has equal upwards and southwards components, so the effective gravity vector is not perpendicular to the surface.

Edited by mic_e

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.