Jump to content

a circular orbit has no apoapsis/periapsis!


Recommended Posts

Dear Squad!

As a matter of fact, a circular orbit does not have an apoapsis or periapsis, because all points of the circle have the same distance to the planet!

This is even more true for computer simulations with limited precision.

The math used to yield such points in a circular orbit will definitely create problems that can be identified by jumping points due to the finite precision of computer calculations!

Many mods need these points for their function nevertheless.

So, why don't you replace apoapsis and periapsis with some useful values if apoapsis - periapsis < 2 * precision?

You could avoid these flickering and mods are happy.

Just an idea!

:)

Edited by rainerd66
Link to comment
Share on other sites

Yeah, actually achieving a circular orbit is quite difficult, if not bordering on impossible. The flickering is, however, a bit annoying. I would personally replace the Ap/Pe points with Ap/Pe regions, where all points on the orbit with the same lowest/highest altitude would be highlighted on the orbit path, perhaps.

Link to comment
Share on other sites

Yeah, actually achieving a circular orbit is quite difficult, if not bordering on impossible. The flickering is, however, a bit annoying. I would personally replace the Ap/Pe points with Ap/Pe regions, where all points on the orbit with the same lowest/highest altitude would be highlighted on the orbit path, perhaps.

I beleive this is what the orbit line in .13.3 had, the Ap half of the orbit was green and the Pe half was blue.

Link to comment
Share on other sites

circular orbits does not exist ;)

In reality it is difficult, but in a computer simulation with finite precision it is possible, because you only need an orbit near enough to circular!

And it is so easy to solve... ;)

EDIT: In a computer simulation like this, the nearest circle is always inside a torus with the thickness of the precision.

Edited by rainerd66
Link to comment
Share on other sites

Obviously, the apoapsis and periapsis simply need to freeze their positions when a certain degree of accuracy is achieved. You don't want to suddenly lose your information of how high the orbit is, but you also don't want flickering, so freezing the orbital nodes makes sense to me.

Link to comment
Share on other sites

In reality it is difficult, but in a computer simulation with finite precision it is possible, because you only need an orbit near enough to circular!

And it is so easy to solve... ;)

Orbits is measured in meters, rotating your craft will change this unless your root node is at center of mass.

And no you don't want circular orbit, they are a mess to work with near circular ones.

Link to comment
Share on other sites

In order to avoid breaking a lot of stuff, it seems like the game would still need an Ap value and Pe value, i.e., storing the data for circular (or near-circular) orbits in a different way from elliptical orbits would mean that any game function or mod that tries to read orbital data would have to account for two different formats. Even hyperbolic or suborbital trajectories have both an Ap value and a Pe value, so it seems like this is probably a deep part of the game's code.

However, they could eliminate the flickering by changing the way that the orbit is displayed. Eliminating the Ap/Pe markers for near-circular orbits would be undesirable, because without mods, that's one of the main ways of determining your altitude (yes, you could still read off your altitude at the top, but it's not as precise, and I personally would find it frustrating to lose that source of information). Instead, I think you could keep the markers, but do the following:

1. As soon as Ap - Pe < epsilon, consider the orbit circular. The orbit will still have an Ap value and a Pe value, but the display will be different.

2. Instead of displaying the Ap and Pe markers, display two "Circ" markers (or whatever). These appear wherever the Ap and Pe were when the orbit circularized, and they do not move until Ap - Pe > epsilon. So the "true" Ap and Pe values might be swinging around wildly, but the displayed Circ markers are frozen in place.

This has the advantages of (a) preserving the way the orbital data is stored, (B) continuing to display altitude markers for circular orbits, and © eliminating flickering.

Link to comment
Share on other sites

Even Orbiter has some glitchyness if you get REALLY close to a 0.0 Eccentricity, it'll twitch the AP and PE a little bit, if I remember right. Or it might've been an older version, but still.

This is all due to floating point, and how "innacurate" it is in Unity.. which is to say, still a bit more accurate than you'd want to do by hand. :D It's a symptom of the updates of the orbit, based on ship orientation and such. *shrug*

Link to comment
Share on other sites

You can't have a circular orbit in real life. The Moon or the uneven pull of the Earth's gravity, or a planet in the Andromeda galaxy will pull your ship off course from a circular orbit. If you ask me, the satisfaction you get from the flickering of a circular orbit in KSP is way more important than the annoyance it brings visually. Sort of like NaN for inclination.

Link to comment
Share on other sites

The colors were removed before maneuver nodes. They were removed in .15 when patched conics came out.

They were removed in 0.15 when Patched Orbit Splines came out. "Patched Conics" refers to the underlining mechanical system that KSP uses for gravitation, not the method that is used for predicting/connecting the lines together.

Link to comment
Share on other sites

  • 1 month later...

The flickering is because the minutest changes on the craft can greatly affect the location of the apo/peri. Next time you're in a circular orbit turn off RCS and SAS and it will calm down a lot. Beyond that it's the fidelity of the location (x,y,z) combined with the velocity vector that causes the jumping.

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