Jump to content

[WIP][1.8.1, 1.9.1, 1.10.1, 1.11.0–2, 1.12.2–5] Principia—version ‎Канторович, released 2024-03-09—n-Body and Extended Body Gravitation


eggrobin

Recommended Posts

What does CTS in CTSGeometry mean?

From the list of acronyms in the OP:

CTS: Common Type System

All types in C# use the CTS. In C++/CLI, only types defined as value or ref are CTS. I switched to C++ mainly because of the added power of templates, typedefs (eventually performance concerns will become relevant, but for the moment the question is mostly one of language features).

Will N-body allow for small ships to orbit a far-out asteroid?

If I make asteroids massive, yes, but bear in mind that

The question is irrelevant. Remember the formula for speed (in a circular orbit)?

http://latex.codecogs.com/gif.download?v%3D%5Csqrt%7B%5Cfrac%7BGM%7D%7Br%7D%7D

Plug in the numbers for a 5000 ton asteroid (and that's a fairly big one, as I understand) and you'll get G×M = 3.337×10-4. Now, assume a close orbit of, say, 100m; your orbital speed will be 0.0018 m/s. One sneeze will give you escape velocity, basically.

In any case, exciting stuff like trojan and Hilda asteroids will be possible.

Ferram says that future versions of FAR could dump tables of aerodynamic coefficients vs. various parameters to a text file; this at "compile" time in the VAB, for now, I've asked him whether they could be recreated in flight on demand.

Do you think that could be enough to integrate flight trajectories with the simplifying assumptions made above? (i.e. following zero lift or maximum L/D or some other extremal point)?

I don't really know about aerodynamics yet, ferram4 told me he'd help when the time comes. I will do orbital decay (which is free molecular flow), so I will have to do at least some aerodynamical calculations myself.

EDIT:

Echoes from IRC:

Gravitational potentials from asteroids are a huge mess (dixit Scott Manley alias illectro).

Specifically, he mentioned http://trs-new.jpl.nasa.gov/dspace/bitstream/2014/37527/1/05-0170.pdf.

However, since


[00:22:03] <scott_manley> Interestingly asteroid gravity can be modelled by converting the body to a triangle mesh and computing gravity from a series of 3 sided pyramids
[00:22:47] <scott_manley> I would love to have proper orbit potentials around gilly
[00:22:54] <scott_manley> just to see the orbits

I might consider that when I'm done with the (easier :P) rest of the already pharaonic list of planned features.

Edited by eggrobin
Has no subject.
Link to comment
Share on other sites

Most universities in the west had stopped teaching Ada by 2000, but I had picked it up as a preparation for Uni the years prior. I miss Ada too, but at least I have VHDL....

Mine was certainly still teaching it in the early 2000s (1st/2nd years learned it as their introduction to programming). I remember playing with the 2D rocket package and wishing it was a full space sim...

So far, I have almost no understanding of this mod, I know very little about orbital physics and parameters. But, as soon as this is released, I will be first to download.

Same. I have two engineering degrees, but when reading the constructive posts in this thread I feel like a cat trying to learn long division.

On the plus side, I learned that "then why don't you try using double doubles?" isn't actually a sarcastic response to a problem with precision.

Good luck eggrobin, even if it looks like you have no need of it.

Link to comment
Share on other sites

I have realised that we have the

tag, and I have thus compactified the OP. I hope this makes it more readable.

How close are you to an actual playable N-body release?

To quote Supernovy on IRC, "the eigenreleases are unknown until the releasefunction is collapsed". I put the branch I'm currently working on in the OP though, so if you want to look at the commits and use that to estimate how far away I am from a playable release, feel free to do so.

So far, I have almost no understanding of this mod, I know very little about orbital physics and parameters. But, as soon as this is released, I will be first to download.

I really need to write some more explanatory posts. I also wanted to write a little bit of documentation (there is some overlap between the two), since the libraries I'm writing are not completely trivial and huge comment blocks only make the code less readable. In the meantime, Wikipedia can help.

Mine was certainly still teaching it in the early 2000s (1st/2nd years learned it as their introduction to programming). I remember playing with the 2D rocket package and wishing it was a full space sim...
Same. I have two engineering degrees, but when reading the constructive posts in this thread I feel like a cat trying to learn long division.

Try pressing more buttons!

On the plus side, I learned that "then why don't you try using double doubles?" isn't actually a sarcastic response to a problem with precision.

Yes, quads are a thing. Sadly, most modern processors don't support those (and I don't think KSP supports S/370). You can implement IEEE 754 binary128, but this is slow, or you can have pairs of doubles (double doubles) as previously mentioned.

Edited by eggrobin
Link to comment
Share on other sites

  • 2 weeks later...

I just spent an hour staring at the Jool system. Bop and Pol are oscillating a lot but poor Vall is Laythe and Tylo's ping-pong ball. Poor thing got thrown everywhere, in 60 days it went through Jool a couple times, hit Laythe at least 4 times and eventually almost got ejected. This mod needs to completely replace the stock orbit lines or change them to be simulations since they are completely useless and just distracting as they are now. Loading up RSS proved the mod works perfectly, everything is stable with Jupiter's moons. A big problem though is that Newtonian physics on the surface cause the ship to wobble around, making it impossible to stay still on the ground. I guess this is because the planet is moving constantly and some kind of workaround will have to be found (like forcing Kepler physics if active ship is landed).

Will this allow for sun-synchronous orbits (i.e. orbits around planets with constant sun)?

From Wikipedia:

But Venus, for example, is too spherical to have a satellite in sun-synchronous orbit.

It seems spherical objects won't work, aka any planet or moon in KSP.

Link to comment
Share on other sites

Sun-sync orbits won't be in the first release, since the planets will be point masses. Eggrobin said (somewhere in this thread) that he wants to work on it for a later release, though.

Link to comment
Share on other sites

can planets affect each other?

because if so, vall will be ejected from orbit in a few days-one week (what is vall's orbital period?)

- - - Updated - - -

can planets affect each other?

because if so, vall will be ejected from orbit in a few days-one week (what is vall's orbital period?)

Link to comment
Share on other sites

can planets affect each other?

because if so, vall will be ejected from orbit in a few days-one week (what is vall's orbital period?)

It's a known problem, as you can see from the video. If you read back through the thread, you'll see some discussion of it, including possible solutions. Noone has tried them yet, however.

Link to comment
Share on other sites

Yes they can affect each other. I looked at Jool's moons for about 80 days at 10k time warp (maximum without lag ATM) and. Vall didn't get ejected, but came really close. It's probably because when it collides with Laythe, the physics get rather screwed since they act as point masses.

Link to comment
Share on other sites

I'm back from vacation, time to answer some questions I guess.

Will this allow for sun-synchronous orbits (i.e. orbits around planets with constant sun)?

Once the mod becomes playable with N-body gravitation with point masses, the following effects should be relatively easy to add:

[...]

Gravitational moment (quadrupole) for planets, enabling such amusing things as Sun-synchronous orbits;

From Wikipedia:

It seems spherical objects won't work, aka any planet or moon in KSP.

By giving them higher moments we'll effectively model them as the ellipsoid they should be (uniquely determined by their rotation rate for planets and dwarf planets).

Eventually (but that's far, far away) I might want to handle the more complex gravitational fields of asteroids; Scott Manley (illectro) linked me some stuff about tetrahedron-based models.

I just spent an hour staring at the Jool system. Bop and Pol are oscillating a lot but poor Vall is Laythe and Tylo's ping-pong ball. Poor thing got thrown everywhere, in 60 days it went through Jool a couple times, hit Laythe at least 4 times and eventually almost got ejected. This mod needs to completely replace the stock orbit lines or change them to be simulations since they are completely useless and just distracting as they are now.

[if true then]

because if so, vall will be ejected from orbit in a few days-one week (what is vall's orbital period?)

- - - Updated - - -

It's a known problem, as you can see from the video. If you read back through the thread, you'll see some discussion of it, including possible solutions. Noone has tried them yet, however.

The barycenters will be fixed in order to stabilise the Jool system. Scott Manley (illectro)'s predictions indicate this will make it stable over at least 1_000 years (Pol was not part of those predictions, its stability remains to be determined).

Scott lost those results for some reason, but it works.

Loading up RSS proved the mod works perfectly, everything is stable with Jupiter's moons. A big problem though is that Newtonian physics on the surface cause the ship to wobble around, making it impossible to stay still on the ground. I guess this is because the planet is moving constantly and some kind of workaround will have to be found (like forcing Kepler physics if active ship is landed).

It works in RSS because I used body-centric elements for B1950.0 rather than barycentric elements in the overhaul of the orbits that introduced inclination.

Newtonian gravitation on the surface should be useless, so I don't think I'll do that. Even the lower atmosphere I don't really care about.

Is it possible to calculate stable orbits? And then how long would the calculations take?

I'm not sure what your question means. If you want to know what a particular orbit will do, prediction is planned to an extent equivalent to KSP's current behaviour (probably displayed differently as far as reference frames are concerned, but that's a different issue).

If you want to find an orbit that's provably stable for all time in a 20-body problem with the addition of orbital decay and higher moments, you cannot, however some heuristics apply, e.g., orbits that are low enough but not too low (e.g. geostationary) are pretty much Keplerian for longer than you could possibly care, Lissajoux orbits or Halo orbits can be stable for a while but really require stationkeeping to be safe, etc.

Also recall that stationkeeping is on the roadmap.

Link to comment
Share on other sites

If you want to find an orbit that's provably stable for all time in a 20-body problem with the addition of orbital decay and higher moments, you cannot....

That's more or less what I was curious about. Not for all time obviously. I'm not really following this thread because most of it is over my head, but I was just wondering if anyone would perform simulations of the Kerbol system to find orbits that stay stable for some determined amount of time... 1000 years or so, I don't know, that's a gameplay issue. I don't know how long in Kerbal time an average game takes.

Link to comment
Share on other sites

That's more or less what I was curious about. Not for all time obviously. I'm not really following this thread because most of it is over my head, but I was just wondering if anyone would perform simulations of the Kerbol system to find orbits that stay stable for some determined amount of time... 1000 years or so, I don't know, that's a gameplay issue. I don't know how long in Kerbal time an average game takes.

In its current state, the game clock bugs after 67 years because there is a signed int that contains seconds.

Link to comment
Share on other sites

Regarding the KSP fora

Do we have LATEX support? If that isn't the case, is it conceivable to have it in the foreseeable future?

This is compatible with the boards current software. Unlikely to remain compatible if they upgrade to the VB5 garbage.

Otherwise, it'll be MathJax.

Not sure who manages server-side installations, but given how long it took for a simple BB Code spoiler to be re-added, you might be waiting some time.

Would be good to have it implemented though.

Link to comment
Share on other sites

  • 2 weeks later...

Will this mod allow for "Interplanetary Transport Network" trajectories / weak stability boundary /low energy transfers, and if so, is that a result of a basic N-body model or does it need more flourishes?

It goes negative. It's a signed int...

Ah, OK, thanks.

Link to comment
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.

×
×
  • Create New...