How can I generate an elliptical orbit using only position and velocity data?

Click For Summary

Discussion Overview

The discussion revolves around generating an elliptical orbit using only position and velocity data within the context of a simulation of the solar system. Participants explore methods for deriving orbital parameters without relying on external software, focusing on the mathematical and conceptual challenges involved.

Discussion Character

  • Exploratory, Technical explanation, Conceptual clarification, Homework-related

Main Points Raised

  • One participant expresses difficulty in generating an elliptical orbit from position and velocity data, citing a lack of analytical geometry skills related to conics.
  • Another participant highlights the complexities of modeling many-body systems, suggesting that Kepler's laws may provide reasonable predictions only for a limited time frame due to chaotic influences from minor bodies.
  • A later reply clarifies that the simulation is for a game and not intended for real predictions, indicating that only negligible mass objects will use n-body dynamics while heavier objects will follow Kepler's laws.
  • A participant provides a mathematical approach to derive the semi-major axis and eccentricity from position and velocity, detailing specific formulas and relationships that can be used to determine the orbit's shape and orientation.

Areas of Agreement / Disagreement

Participants generally agree on the feasibility of deriving orbital parameters from position and velocity data, but there are differing views on the reliability of such models in complex systems and the implications of using approximations for a game versus real predictions.

Contextual Notes

Limitations include the dependence on assumptions regarding the simplicity of the system and the potential inaccuracies introduced by chaotic dynamics in many-body scenarios.

450AHX
Messages
3
Reaction score
0
Hi.

I'm writing a simulation of (an approximation of) the solar system. So far I've been able to translate the Wikipedia article on Kepler's laws to a function that uses a description of an elliptical orbit (eccentricity, periapsis, known position in time) to return a position when passed an arbitrary time. My issue is with generating the ellipse when given only a position and a velocity; my analytical geometry-fu is too weak for conics. I can't find much info on this, beyond references to offloading the calculation to software suites (e.g. HORIZONS and SPICE), which is of no use to me.
Can anyone give me a nudge in the right direction?

Thanks.
 
Astronomy news on Phys.org
I think you could have a problem in that 'many body' systems can be really hard to get right.
Especially when many of the bodies making up the whole system are either not well known, or not known at all.
You could probably use Keplers laws to give a reasonable prediction for the solar system using just the Sun and major planets for maybe a few thousands of years.
I think that beyond that extent it could not be reliable due to chaos caused by the minor planets (and other things that are not included in the 'perfect' model)
 
Thanks for replying.
Sorry, I forgot to mention that this is just an approximation for a game; I'm not trying to predict the real future locations of objects. Heavy objects will be put on Kepler rails, and only negligible mass objects will use n-body dynamics. I need to be able to find an ellipse from position and velocity because I want to be able to detect stable orbits of negligible mass satellites to avoid computing the n-body dynamics when not necessary.
 
If you are starting with position and velocity you can work out the orbit in the following way:

From the formula
v^2 = GM\left ( \frac{2}{r}- \frac{1}{a} \right )
(where r is the length of the radial line and v is the magnitude of the velocity. )

you can solve for a, the semi-major axis. From which, you can get the period of the orbit.

Then from:
\pi a^2 \frac{\sqrt{1-e^2}}{P} = \frac{rv \cos \theta }{2}

Where theta is the angle between a line perpendicular to the radial line and the velocity vector ( i.e., for a perfectly circular orbit theta would always be 0), and P is the period of the orbit found above, you can solve for e, the eccentricity of the orbit.(each side of the equation gives the Areal velocity)

Then you can use r= \frac{a(1-e^2)}{1+ e \cos \phi}

to solve for phi, which gives you the angular distance from the present position to periapis.

This should give you the shape of and the orientation for the line of apsides for your orbit.
 
Thanks. That's what I was looking for.
 

Similar threads

  • · Replies 1 ·
Replies
1
Views
6K
  • · Replies 1 ·
Replies
1
Views
2K
Replies
6
Views
3K