Jump to content

Orbit Wobbles


Recommended Posts

I've been having a problem recently where my space craft orbits have been wobbling. The craft themselves are stable, with all systems turned off so there is no outside input. Despite this, there are very large oscillations in the orbit, which are enough to cause some of my ships to completely miss their targets. I've noticed that increasing the game speed will stabilize the orbit temporarily, but this isn't a perfect fix as the orbital parameters have already been changed. Any ideas to what is causing this?

I use Windows, version 1.0.5.1028 through Steam.
Link to comment
Share on other sites

Hi Stupid Waldo, this is caused by [U][URL="https://docs.oracle.com/cd/E19957-01/806-3568/ncg_goldberg.html"]floating point inaccuracy[/URL][/U] with the large numbers involved when predicting large orbits with the maneuver nodes.

There's no fix, sorry.

Just try to get a less wobbly orbit by tweaking the node and don't rule out correction burns on the way to the target. Edited by sal_vager
Link to comment
Share on other sites

[quote name='sal_vager']Hi Stupid Waldo, this is caused by [U][URL="https://docs.oracle.com/cd/E19957-01/806-3568/ncg_goldberg.html"]floating point inaccuracy[/URL][/U] with the large numbers involved when predicting large orbits with the maneuver nodes.[/QUOTE]

That's not actually the problem I'm having. The maneuver node was fine, and I completed my burn and got myself on track. There are currently no maneuver nodes on any of my orbits. The orbits themselves are unstable. I had no issues in the past, sending someone past the Mun without problems, but I started up today and suddenly all of my orbits are shifting themselves without input. Yesterday I launched a probe to Minmus with no issues and a completely stable and predictable orbit. I checked up on it several times to get data for a contract and still had no problems. Today, it has suddenly become unstable, along with the other orbits I examined.
Link to comment
Share on other sites

It doesn't matter what type of orbit it is or what parameters it has. They all change over time without any input. I'm currently doing a tutorial, which has me on a close orbit around Kerbin and the apoapsis and periapsis are shifting at about 1 meter per 5-10 seconds. In my career mode, I have an elongated orbit from Kerbin out to Minmus which shifts it's apoapsis several thousand meters per second, and another elongated orbit to the Mun which is also changing rather fast. It appears that the larger the apoapsis or periapsis, the faster the change is, but all orbits that I create are changing. I've created maneuver nodes to see how those are affected, but their parameters don't change. It's only the current path that my space craft are in that are changing.
Link to comment
Share on other sites

Sorry to tell you this but the orbits aren't perfect in this game, they will change slightly over time, round orbits with very similar apoapsis and periapsis will shake quite badly, eccentric orbits will see 1m/s changes just as you are describing.

The current path your controlled vessel is on is constantly being recalculated many times every second, and it will change as the vessel rotates, as it moves along its orbit, and is due as I mentioned to floating point inaccuracy in the math.

Orbits you are not currently on are on what is called "rails", as is your current orbit when you are using timewarp.

These are not recalculated and your vessels are just moved along them depending on the elapsed time.

No, there [I]was[/I] a bug with vessels equipped with the claw which would see the vessel either ignore gravity and shoot off into space or stop like an anchor had been dropped, but it's been fixed and you'd have needed a claw on your vessel to trigger it.

You may just be experiencing the same imprecision that games like KSP have to put up with, most other games which deal with orbital mechanics just hide this from the player, but in KSP it's easy to see.

But if your orbits are really changing by a large margin then [U][URL="http://forum.kerbalspaceprogram.com/threads/92230-%21%21%21-PLEASE-READ-BEFORE-POSTING-%21%21%21-Stock-Support-Bug-Reporting-Guide"]we'll need your logs[/URL][/U], reproduction steps, the affected save file, also a video would help and maybe even your dxdiag hardware report.

But orbits moving a bit is a known issue, and it's known that it is not fixable.
Link to comment
Share on other sites

Yeah, that's "nominal", certainly not desirable I agree, and the devs have tried tweaking things to minimize it several times, it gets better but the improvements are smaller each time.

The actual cause here is the [U][URL="https://en.wikipedia.org/wiki/Numerical_integration"]limitation of numeric integration[/URL][/U] in binary computing, it's not helped by [U][URL="https://en.wikipedia.org/wiki/Floating_point#Accuracy_problems"]floating point rounding[/URL][/U], and 64bit won't help as it's handled by the [U][URL="https://en.wikipedia.org/wiki/Floating-point_unit"]floating point unit[/URL][/U], most [U][URL="https://en.wikipedia.org/wiki/X86#Floating_point_unit"]are already 80 bits wide[/URL][/U] rather than 32 or 64, so the only real fix here is to find a more accurate way to do the math.

Or possibly get a median value over time to hide it from the player, it'd still be changing but no one would see it, though your final periapsis would not match the one you see at the start of the journey.

So it's a choice, show the value as it is now or show a potentially incorrect value and fool the player, currently Squad have chosen the former.
Link to comment
Share on other sites

I wouldn't really consider 40km deviation per minute nominal. Just a few minutes of changes like that will completely change the orbits of my ships, especially for such missions as this one to Minmus, where it's gravity is so weak that the difference between a few m/s in either direction will cause me to miss entirely.
Link to comment
Share on other sites

This is the way it is, it's a known issue, the devs do try to improve it but there's nothing we can do here except wait for the next attempt.

There's no fix or workaround I can offer you, and little possibility of either in the future, this is how the game is.

That you do not consider a 40km deviation per minute nominal is noted, but this is the reality of the situation with orbits in KSP for any craft that is not on rails.
Link to comment
Share on other sites

Wouldn't there be a way so that, if the game detects a significant event* that may or may not happen due to fluctuations, it calculates the orbit with greater accuracy ?

* e.g: change of SOI, especially going to Eeloo: the few times I've been there, I didn't know until more than halfway there if I needed a correction burn or not.
Also, in my main save, using the Trajectories mod and RSS, these errors get extremely frustrating whenever I try to aerocapture at Earth when returning from the Moon: my orbit fluctuates from crashing into the Earth to an apoapsis at >1000km. Edited by Gaarst
Clarification
Link to comment
Share on other sites

Well then I suppose I need to ask how other people handle this. Any tips or tricks, aside from actually flying the craft as little as possible? I also find it odd that I didn't notice this at all in the past when I was playing. It only started to occur today. I previously launched a ship to the Mun, and had no changes to it's orbit, or if they did happen, they were very small, small enough that they didn't interfere with my maneuvers.
Link to comment
Share on other sites

[quote name='sal_vager']And the further the orbit is from the world origin the worse it gets.[/QUOTE]

The effect will vary with how far you are from the absolute center of the game universe, when you're on the pad you are at the center of the universe, but when you hit certain speeds (750m/s during ascent is the first) and distances your speed/location is reset and [I]the universe is moved around you.[/I]

At the center this wobble is at its lowest, though it's still there, the further you are and the faster you are the worse the wobble becomes.

The resetting is deliberate, it was necessary to fix the space kraken bug, before this if you went too far and too fast your craft would come apart due to the very same issues that wobble the orbits.

That'd be why you don't notice this all the time.

As for mitigation, I am sure others have their own methods, but I don't treat the orbits as absolutes, and I correct my trajectories as necessary with later burns, if I'm nearer the center of the game universe at that time then the wobble is manageable.

You can briefly warp as well to put the orbit on rails, and this will top the wobble, though it'll be wobbly again and may shift quite a bit when you come off warp.

Also there's the delta time slider in the settings screen, you can raise it to trade frame rate for accuracy, it might help but it will kill your FPS, it will make KSP do more calculations in the same time frame but caps the frame rate to the delta time, the default is 0.04, too high and you start dropping frames. Edited by sal_vager
Link to comment
Share on other sites

It's best to find a value that works for you, the value goes from 0.12 on the left to 0.03 on the right, and it sets the maximum time in milliseconds between every physics step.

0.12 [I]should[/I] reduce the frequency of the wobble, and while the simulation will run faster (mostly green MET timer), the framerate will make it look slow.

0.03 will make KSP slow down the simulation instead of drop frames, it's smoother but you're more likely to have a yellow, or even a red, MET timer, and the physics steps are closer together so the wobble should be more rapid.

It's just the maximum though, so if your PC is better than mine you may not see much difference, as KSP will try to run with as short a step as it can.

It still won't really be [I]more[/I] accurate, I used the wrong term above, but should wobble less energetically.

I leave mine on the default of 0.04 because my PC struggles enough, I'd rather take the slowdown over the framerate drop.

[SIZE=1]Lol, ninja'd you Glaran![/SIZE] Edited by sal_vager
Link to comment
Share on other sites

The number is the time interval KSP will do calculations. So adjusting the slider to the .05 setting, for example, would have KSP do calculations less often than if the setting were .04. Therefore by adjusting this value to a very low number will have KSP doing calcuations very quickly giving to more accurate numbers. However this taxes the system and will affect lag you experience.


EDIT: ninja'd, thought you went offline sal!
Link to comment
Share on other sites

Yeah I tried both and didn't really see any difference between the two of them. I generally only see the timer go yellow (or very rarely red) when I warp during an atmospheric flight or when I have a large number of rocket engines firing simultaneously. I guess I'll keep playing around with it. Thanks for the help
Link to comment
Share on other sites

Yeah, I built my PC to handle most games for the foreseeable future and upgrade it as often as I can. But on topic, I feel like there should be a way to further increase the accuracy of calculations, at a cost of performance. I'm sure NASA doesn't put up with similar calculation issues. On other note, I'm still not entirely clear on what setting is better. The wiki says that the numbers refer to the amount of time spent doing physics calculations, with the higher number giving more accurate results, whereas it seems like you guys are saying that the numbers are instead how often calculations occur, with the smaller number giving more accurate results.
Link to comment
Share on other sites

I just pick stuff up from here and there, the forums, IRC, experimentals.

Plus figuring out peoples issues in here over the years.

Also NASA used patched conic approximations as well, there was a little thing called the Apollo Moon landings...

Course they were not limited by current consumer desktop PC's, they had sliderules :D

Currently NASA uses better computers, but the crucial difference from what I understand is that NASA can precalculate all this, they don't need to keep doing it in real time. Edited by sal_vager
Link to comment
Share on other sites

Yeah, I know they use similar calculations, just on a much larger scale, which is why I'm curious to see if it'd be possible to allow for greater accuracy in calculations on more powerful computers. And precalculations are something I would love to see in this game, along with automated maneuvers with those precalculations to make them more effective.
Link to comment
Share on other sites

That would explain why I still have an upper stage floating around Kerbin when it's periapsis is at 50km. Again, things that I think could be added to the game. It might not be usable by lower power computers, since the amount of calculations would be increased dramatically, but I don't think it would be terribly difficult to implement a system that detects when acceleration is applied to an object and automatically brings it off of it's rails and performs standard calculations for it.
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...