Semi-major axis from cartesian co-ordinates

  • Thread starter Thread starter Spanky Deluxe
  • Start date Start date
  • Tags Tags
    Axis Cartesian
AI Thread Summary
To calculate the semi-major axis of a body in an elliptical orbit using Cartesian coordinates (x, y, z, vx, vy, vz), one must first compute the specific angular momentum and eccentricity vector. The specific angular momentum can be found using the cross product of position and velocity vectors. The semi-major axis can be derived from the vis-viva equation, which relates velocity, position, and the semi-major axis. It is crucial to ensure the correct relationship between angular momentum and eccentricity is applied, as errors in this calculation can lead to incorrect results. Understanding these concepts is essential for accurately determining the semi-major axis from the given data.
Spanky Deluxe
Messages
19
Reaction score
0
Can anyone suggest how to calculate the semi major axis of a body in an elliptical orbit when all I've got is x,y,z,vx,vy and vz?

I'm guessing I need to calculate the eccentricity too. I really suck at conversions like this. :(
 
Astronomy news on Phys.org
Keplerian orbits are all two-dimensional, so you don't need to worry about z or vz; they can be defined as 0.

Take a look at http://en.wikipedia.org/wiki/Orbit#Analysis_of_orbital_motion, especially the equation at the very end. Provided you know the mass & position of the body being orbited, the semi-major axis (a) can easily be calculated.
 
Spanky Deluxe said:
Can anyone suggest how to calculate the semi major axis of a body in an elliptical orbit when all I've got is x,y,z,vx,vy and vz?

I'm guessing I need to calculate the eccentricity too. I really suck at conversions like this. :(
You better have at least one other thing. You need to know the body's gravitational constant, G*M, which are often combined as a single parameter μ.

Hint: How is the specific angular momentum related to the semi-major axis?
Hint: You need to calculate the eccentricity.

ideasrule said:
Keplerian orbits are all two-dimensional, so you don't need to worry about z or vz; they can be defined as 0.
No, they can't. He is given non-zero values. Ignoring them *will* yield the wrong answer.
 
Yes, if you're actually given a set of positions and velocities in all dimensions, you can't ignore one of them. Ignoring z and Vz only works if you get to arbitrarily define your coordinate system, in which case you can set both to 0.
 
D H said:
You better have at least one other thing. You need to know the body's gravitational constant, G*M, which are often combined as a single parameter μ.

Hint: How is the specific angular momentum related to the semi-major axis?
Hint: You need to calculate the eccentricity.


No, they can't. He is given non-zero values. Ignoring them *will* yield the wrong answer.

aha, so I can use:

\textbf{h}=\textbf{r}\times\textbf{v}

to find the specific angular momentum and then

a\left(1-e\right)=\frac{h^{2}}{GM}

But then how can I separate the eccentricity and semi-major axis?
 
Spanky Deluxe said:
But then how can I separate the eccentricity and semi-major axis?

Simple: Compute the eccentricity vector and take its magnitude. So what's this eccentricity vector thing?

\vec e = \frac{\vec v \times \vec h}{GM} - \frac{\vec r}{||\vec r||}
 
D H said:
Simple: Compute the eccentricity vector and take its magnitude. So what's this eccentricity vector thing?

\vec e = \frac{\vec v \times \vec h}{GM} - \frac{\vec r}{||\vec r||}

Ok, I've done that now.

One thing though, I also found the following equations which I found http://microsat.sm.bmstu.ru/e-library/Ballistics/kepler.pdf :

a=\frac{GMr}{2GM-rv^{2}}

and

e=\sqrt{1-\frac{h^{2}}{GMa}}

I've tested both sets of equations and I get the same numbers for the eccentricity, which is good. However, I'm getting different results for the semi major axis. :(
 
Last edited by a moderator:
Spanky Deluxe said:
a=\frac{GMr}{2GM-rv^{2}}
http://photos-d.ak.fbcdn.net/hphotos-ak-snc1/hs017.snc1/4224_95107990559_95107705559_3010885_4034015_s.jpg

The vis-viva equation, doh!

v^2=GM\left(\frac 2 r - \frac 1 a\right)

I was thinking to much of your problem in term of converting cartesian position and velocity to orbital elements (six of them). The specific angular momentum and the eccentricity vector are the keys to unlocking that puzzle. However, all you wanted was the semi-major axis. The vis-viva is the key to answering that particular problem.

I've tested both sets of equations and I get the same numbers for the eccentricity, which is good. However, I'm getting different results for the semi major axis. :(
That's because you have the relation between angular momentum wrong, here:
Spanky Deluxe said:
a\left(1-e\right)=\frac{h^{2}}{GM}

That should be

a(1-e^2) = \frac {h^2}{GM}
 
Last edited by a moderator:
DH, you are an absolute star and a lifesaver! Thanks so much for the help!
 
Back
Top