• 0
Sign in to follow this  
vwr0527

Orbits unstable, drift and decay gradually

Question

Posted (edited)

I'm not sure if it used to do this, but I began noticing it after the update. I'm noticing that my orbit is changing very slightly over time. The orbit is outside of the atmosphere, and the option "Orbital Drift Compensation" is checked, but my orbit still changes gradually over time. The tendency is to lower both Apoapsis and Periapsis, but on occasion I have seen one or the other raised slightly. I have removed all mods and DLC, and I'm still getting this. So it's not being caused by mods.

Over the course of 20 minutes, I saw my space station orbit go from 

72.6998 km, 72.6686 km | time 1:01
72.6985 km, 72.6684 km | time 1:21

I'll also note that when I started noticing this effect, the space station had an Apoapsis of 72.706 km. 

Of course, when the vessel isn't being actively watched, it doesn't change, which is expected.

When I have Kerbal Engineer, I can see this effect in much more detail. The Semi Major Axis is dropping in a herky, jerky manner. It drops a bunch when you switch in and out of map mode. Of course, I can't be sure if Kerbal Engineer is making the effect worse, but nevertheless, the effect is there without it.

Admittedly, it's a very minor effect. But it makes me not want to switch to my relay satellites as they're flying in a very precise orbital formation.

Does anyone else see this? Has this always been there? Has it been made worse by a recent update?

EDIT: On closer observation, the periapsis dipped and went back up. The lowest point was:

72.6996 km, 72.6682 km | time 1:08

EDIT 2: Using scatterer causes the Semi Major Axis to drop much faster. But a complex vessel with lots of parts that makes it run at a lower frame rate, doesn't change the rate at which the SMA drops.

Satellites that are far away from their parent body are unaffected. Strangely, my Gilly satellites are having their SMA raised. Maybe because they are orbiting slower than Gilly is rotating?

Another curious observation: My Eve vessel that is in low, circular, polar orbit, has a Ap of 90530 and a Pe of 90520. So nearly circular. The really weird thing is that the Pe and Ap are advancing forward in orbit faster than my ship is orbiting. So the time to Periapsis is constantly increasing, and same for the Apoapsis. The SMA is changing very little, but the point of Apoapsis and Periapsis are moving rapidly.

On closer observation, for my Eve vessel, when it's closer to Apoapsis, the Apoapsis rapidly lowers and the Periapsis raises. When it's closer to Periapsis, the Periapsis rapidly lowers and the Apoapsis raises. Physical time warp makes the orbit change extremely rapidly. Within a few seconds of maximum physics warp, my orbit changed to something like 90730 to 90320.

OK, simply by quickly switching physics warp from 1x to 4x back to 1x, my orbit drastically changed. It went from 90500 90500 to something like 90700 90300 in one iteration. By doing multiple iterations of this, I managed to raise my Apoapsis to 92000 and lower my periapsis to 88000. I'm pretty sure it wasn't this bad before.

A few more iterations and I changed my orbit to 98200 82900. Just by messing with physics warp. Without using any thrust. This is absurd. Can someone please try this and tell me if it's just me?

EDIT 3:

Started a new sandbox mode, put a simple spacecraft in a similar orbit of Eve, and tried it. No more orbital drifting. No problems whatsoever. I'm wondering if it's because I'm in year 20 of my career mode in my main save? Maybe some part is causing it?

Ah, it has nothing to do with the time. I warped until it was 19 years in the sandbox mode. Still no orbit drifting problem.

EDIT 4:

OK, it does have something to do with more complex spacecraft. I loaded my career mode space vessel into a low Eve polar orbit. The orbital decay returned. Having more crew also seems to affect it. Using the "interior overlay" also makes it worse.

Edited by vwr0527

Share this post


Link to post
Share on other sites

6 answers to this question

Recommended Posts

  • 0
Posted (edited)
5 hours ago, vwr0527 said:

I'm not sure if it used to do this, but I began noticing it after the update. I'm noticing that my orbit is changing very slightly over time. The orbit is outside of the atmosphere, and the option "Orbital Drift Compensation" is checked, but my orbit

Do you have any RCS on by any chance?Do you have the Hibernation while in warp set to auto?

Sometimes with very precise orbits i find even using SAS can flicker the numbers.

Edited by Boyster

Share this post


Link to post
Share on other sites
  • 0
8 hours ago, Boyster said:

Do you have any RCS on by any chance?Do you have the Hibernation while in warp set to auto?

Sometimes with very precise orbits i find even using SAS can flicker the numbers.

Nope, RCS was off. I just had SAS, and I didn't touch the controls.

Share this post


Link to post
Share on other sites
  • 0

You are not the only one to see these things.  

When simulating physics, KSP lets the orbital parameters drift, roughly as much as you say in the beginning of your post.  It looks like KSP does not explicitly enforce that the center of mass follow the orbit, but simulates physics on every part, in which case I'm not surprised the center of mass is pulled a few meters per minute from its 700km radius orbit.

In physics time-warp, indicated by yellow arrows, the orbital parameters do change with every 2× 3× 4× step in acceleration.   For me, the orbit returns to within a meter of the original dimensions when I go back to 1× speed.  A few iterations of time-warp can introduce noticeable errors. 

You didn't mention maneuver nodes, but I've seen large drift on the post-maneuver orbit, when I switch to map mode with the maneuver node active, especially if the burn is far in the future (bug tracker link)

These errors are worse in 'low orbit', <100km altitude around Kerbin, where  KSP works in a coordinate frame that rotates with the planet.

You said "after the update"; if that means you use version 1.7 then you have the orbital parameters in the bottom-left panel, in case you want to use that instead of KER sometimes.

Share this post


Link to post
Share on other sites
  • 0

I noticed this as well, and it really does feel *worse*.

This problem makes Hyper-Warping with my mod Time Control a big problem in low orbit, since with sped-up time you can see the changes to the semi-major axis happening much more quickly (even with zero reduction to the physics engine fixed delta time step). *sometimes* the changes stop completely for maybe a complete orbit or two, but then restart again.

Here's an example - I tracked the vessel's 'orbitalenergy' parameter over time, and it is decreasing. I think you can derive semi-major axis from this value.

At 22:40:57, orbitalenergy was -2528029.48805985
At 22:50:32, orbitalenergy was -2528030.95893785

I think KSP is calculating specific orbital energy using the standard equation as -μ / 2a (where a is the SMA), because my SMA was around 698488.7 m at the start and 698488.3 m at the end. I'm not sure if μ includes your vessel's mass or not. I'm guessing not since the G of the planet is so big it would hardly make any difference.

When I use very high time scales (50x) to speed up time, the vessel's SMA (and orbital energy) loses many meters over the course of a single low orbit. It has to be something screwy with how KSP is calculating the orbital parameters with respect to the planet over time. 

I might have to introduce something in my mod where the orbital parameters are captured upon entering hyper warp and 'adjusted' if there are no forces currently acting on the center of mass of the vessel. This can be difficult though given that if I make an adjustment, how do I know the vessel is going to be moved to the 'correct' place... I really don't want to try to figure out how the coordinate system in KSP works so I can basically rewrite the logic that makes a vessel orbit a planet... I guess I could simply ignore the coordinate stuff altogether and use the previous orbital parameters and basic 2-body calcs (which i guess is what on-rails does too).

One thing is for sure, it definitely gets much worse when I use the hyper warp functions of my mod, which mess with Unity Time.timeScale and Time.fixedDeltaTime. I wonder if there's something screwy between the on-rails planets and the vessels happening when I speed time up.

Edited by westamastaflash

Share this post


Link to post
Share on other sites
  • 0

Ah, thank you OHara and westamastaflash

@OHara I haven't checked maneuver nodes, but I do see Ap and Pe nodes moving on their own, with no RCS or thruster input. Sometimes they move faster than the craft in its orbit! These errors are indeed more noticeable in low orbit. In higher orbits, the error is nearly undetectable. I watched some of my higher orbiting crafts for a while and saw no drifting.

I am using 1.7.2, and I used the widget on the bottom left to watch my orbital parameters.

@westamastaflash I really would like to go back and try 1.6 and see if this is as bad. I didn't notice it before, but I wasn't paying very close attention. However, I noticed it almost immediately when I started playing again, after 1.7 dropped. From your data, your drift seems to be less severe than mine. But yes, physical time warp makes it much worse. Besides physical time warp, these three factors make it worse: Having a complex craft, having scatterer, and being in a low orbit around a high gravity body. Using Environmental Visual Enhancements seems to have very minimal effect, curiously.

This issue has been a bit more than a minor annoyance. With a randomly drifting orbit, you can't have a craft that sits on the very edge of the atmosphere. That was my plan for getting atmospheric analyzer data from Eve's upper atmosphere.

Not to mention that I can no longer switch to communication network satellites, for fear that they start drifting once I switch to them.

I also have to stop using scatterer. While the orbital drift is already bad without it, it's ludicrous with it. It's around 20 times worse with it.

I'm probably just gonna wait until this gets fixed to play again.

Share this post


Link to post
Share on other sites
  • 0

I think this is caused by numerical imprecision when you're actively flying a vessel. The issue being that the active vessel gets physics simulated in the unity rectilinear coordinate system, which doesn't maintain orbital parameters exactly, so they drift. Physics warp reduces precision so exacerbates the problem.

When you're not flying it, the ship is "on rails" and uses the Keplerian elements which don't drift, so the orbit stays exact.

There isn't really a fix (other than using something else for physics like Principia) you'll just have to accept it is a limitation of the game.

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
Answer this question...

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

Sign in to follow this