Jump to content

Apoapsis and periapsis randomly shifted


Proterus

Recommended Posts

So I was sitting there getting started on some math calculating my semi major axis and stuff and my periapsis shifted a little bit from 76023 to 76018.  So I looked and saw my throttle wasn't up or anything and I shutdown my engine just to be sure.  So I'm going to recalculate my semi major axis and I see my apoapsis shift 7 meters from 365093 to 365100 right before my eyes and I'm out of the atmosphere completely.  What the heck so much for being "on rails".  No rcs or anything either.  It's a very basic ship with just a single engine I'm just using to test out some orbital mechanics equations.

 

Does anyone know what's up with this?  Is it just the physics engine recalculating things or something?

Link to comment
Share on other sites

1 hour ago, Proterus said:

So I was sitting there getting started on some math calculating my semi major axis and stuff and my periapsis shifted a little bit from 76023 to 76018.  So I looked and saw my throttle wasn't up or anything and I shutdown my engine just to be sure.  So I'm going to recalculate my semi major axis and I see my apoapsis shift 7 meters from 365093 to 365100 right before my eyes and I'm out of the atmosphere completely.  What the heck so much for being "on rails".  No rcs or anything either.  It's a very basic ship with just a single engine I'm just using to test out some orbital mechanics equations.

 

Does anyone know what's up with this?  Is it just the physics engine recalculating things or something?

I'm no wizz in this category, but as I understand it: it's floating points at their finest. 

EDIT: link removed. Not the one I thought it was, and now I've lost the other.... Dammit. 

Edited by DrunkenKerbalnaut
Link to comment
Share on other sites

A, you're only on-rails if you're timewarping or not the active vessel. Without being on-rails, there'll be very small perturbations caused by both micro-stutters in the vessel parts and imperfect calculation of the force of gravity. There has been efforts to try to reduce these effects, but nothing is perfect. It doesn't help that most of this math is being calculated with single-precision floating point numbers, which are only accurate to about 1 part in 10 million.

B, even when on-rails, there's slight stutters caused by machine precision and the patched-conics solver; the double-precision floating point math used for on-rails calculations is still only accurate to about 1 part in 10^14. Granted, this is more accuracy than NASA expects*, so the on-rails calculations are rather good.

*NASA's biggest issue isn't the accuracy of its floating-point math, it's experimental uncertainty in measuring the positions, velocities, and masses of all the very, very many objects in the Solar System (plus solar wind, etc).

Link to comment
Share on other sites

1 minute ago, Starman4308 said:

B, even when on-rails, there's slight stutters caused by machine precision and the patched-conics solver; the double-precision floating point math used for on-rails calculations is still only accurate to about 1 part in 10^14. Granted, this is more accuracy than NASA expects*, so the on-rails calculations are rather good.

*NASA's biggest issue isn't the accuracy of its floating-point math, it's experimental uncertainty in measuring the positions, velocities, and masses of all the very, very many objects in the Solar System (plus solar wind, etc).

Believe it or not, NASA's space probes (especially the earlier ones without a lot of maneuvering capability) had to take solar wind and even photon pressure into account to ensure their trajectories were correct. The Mercury probes were especially vulnerable to this, and would have missed the planet completely if they didn't adjust the angle of their solar cells to perform very slight corrections. 

On the other side, the Voyager II probe was launched so accurately towards Neptune that it was the equivalent of passing through the eye of a needle from 400km away. 

Probes are serious business - Kerbal style doesn't cut it (although it is much more fun!).

Link to comment
Share on other sites

1 minute ago, MaxL_1023 said:

Believe it or not, NASA's space probes (especially the earlier ones without a lot of maneuvering capability) had to take solar wind and even photon pressure into account to ensure their trajectories were correct. The Mercury probes were especially vulnerable to this, and would have missed the planet completely if they didn't adjust the angle of their solar cells to perform very slight corrections. 

On the other side, the Voyager II probe was launched so accurately towards Neptune that it was the equivalent of passing through the eye of a needle from 400km away. 

Probes are serious business - Kerbal style doesn't cut it (although it is much more fun!).

I think the magnitude of the Pioneer anomaly and NASA's new micro-thrusters adequately sum up the amount of insanity NASA, the ESA, Roscosmos, etc. have to deal with. Fortunately for these agencies' states of mind, usually correction burns aren't too onerous.

Link to comment
Share on other sites

This makes sense, I've programmed stuff before and had it spit out calculated numbers into the command prompt and when you use doubles and floats you get weird exponentials when you're supposed to get zero and these numbers will only approximate zero.  I guess I should have thought about it more I was just thinking okay there isn't any thrust so it should just stop calculating but I guess it doesn't work that way.  I do enjoy the history you guys are talking about, good stuff.

Link to comment
Share on other sites

14 hours ago, Proterus said:

...

Does anyone know what's up with this?  Is it just the physics engine recalculating things or something?

Your ship rotates round its Centre of Mass (CoG). If you rotate your ship, at some points the root part will move faster and at others it will move slower than the CoG. And since the orbit is calculated from the root part your Ap, Pe and inclination may shift slightly. On craft where the root and CoG are very close together you will barely notice anything. But the further they are apart the bigger the errors.
Over the past few versions Squad has made significant progress in reducing these oscillations. Combined with the already mentioned floating point errors no orbit will always be perfectly stable.

Edited by Tex_NL
Link to comment
Share on other sites

2 minutes ago, Tex_NL said:

Your ship rotates round its Centre of Mass (CoG). If you rotate your ship, at some points the root part will move faster and at others it will move slower than the CoG. And since the orbit is calculated from the root part your Ap, Pe and inclination may shift slightly. On craft where the root and CoG are very close together you will barely notice anything. But the further they are apart the bigger the errors.

Does this effect a ship oriented normal/anti-normal? 

Link to comment
Share on other sites

Just now, DrunkenKerbalnaut said:

Does this effect a ship oriented normal/anti-normal? 

Of course it does. Any movement that puts the root in an ever so slightly different orbit than the CoG can ever so slightly change the Ap, Pe and inclination.

Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

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...