Comments and answers for "calculate the future position of an object in orbit"
http://answers.unity.com/questions/1663108/calculate-the-future-position-of-an-object-in-orbi.html
The latest comments and answers for the question "calculate the future position of an object in orbit"Comment by al-X on al-X's answer
http://answers.unity.com/comments/1663937/view.html
But shouldn't there be a way to calculate a future point with just state vectors? Like spaceflight simulator does? (once I have it in 2d it should be relatively easy to tilt its plain in the 3rd dimension) I literally just want to draw the orbital path/trajectory. And then I won't have to use the solution I'm currently using, rather, I just make the ship go towards the next point in the orbital path or trajectory. That way I wouldn't have to deal with impressions in my orbit prediction as such because in a sense the object would "follow its prediction"Sun, 08 Sep 2019 11:43:53 GMTal-XAnswer by Bunny83
http://answers.unity.com/answers/1663206/view.html
Well determining the orbital parameters from the state vectors is not that trivial as the state vectors essentially just encode the derivative of the motion equation,
<br>
Though you probably can bring everythnig together piece by piece. You can determine the [semi-major axis length from the orbital energy of the object][1]
<br>
You can use the dot product to determine if you currently accelerate (moving closer to the central body) or if you decellerate (moving away from the central body). So you know on which side of the ellipse you are. Just do
if (Vector3.Dot(velocity, vectorToCentralBody) > 0){
// accelerate
} else {
// decellerate
}
Maybe that will help you to get your equation finished ^^
<br>
Note while calculating the exact theoretical orbit certainly is helpful, it might not give you what your time discrete simulation is giving you in the end. This is due to being time discrete and having to deal with numerical imprecision which can accumulate over time. If you just want a relatively short prediction ahead, it's often simpler to just "fast forward" your simulation and see where you end up. This is the most accurate predition of what **your simulation** will actually do.
[1]: https://en.wikipedia.org/wiki/Semi-major_and_semi-minor_axes#Energy;_calculation_of_semi-major_axis_from_state_vectorsThu, 05 Sep 2019 10:44:05 GMTBunny83