Semi-major axis from cartesian co-ordinates

  • #1

Main Question or Discussion Point

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

Answers and Replies

  • #2
ideasrule
Homework Helper
2,266
0
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.
 
  • #3
D H
Staff Emeritus
Science Advisor
Insights Author
15,393
682
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.

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.
 
  • #4
ideasrule
Homework Helper
2,266
0
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.
 
  • #5
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:

[tex]\textbf{h}=\textbf{r}\times\textbf{v}[/tex]

to find the specific angular momentum and then

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

But then how can I separate the eccentricity and semi-major axis?
 
  • #6
D H
Staff Emeritus
Science Advisor
Insights Author
15,393
682
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?

[tex]\vec e = \frac{\vec v \times \vec h}{GM} - \frac{\vec r}{||\vec r||}[/tex]
 
  • #7
Simple: Compute the eccentricity vector and take its magnitude. So what's this eccentricity vector thing?

[tex]\vec e = \frac{\vec v \times \vec h}{GM} - \frac{\vec r}{||\vec r||}[/tex]
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 [Broken]:

[tex]a=\frac{GMr}{2GM-rv^{2}}[/tex]

and

[tex]e=\sqrt{1-\frac{h^{2}}{GMa}}[/tex]

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:
  • #8
D H
Staff Emeritus
Science Advisor
Insights Author
15,393
682
[tex]a=\frac{GMr}{2GM-rv^{2}}[/tex]
http://photos-d.ak.fbcdn.net/hphotos-ak-snc1/hs017.snc1/4224_95107990559_95107705559_3010885_4034015_s.jpg [Broken]

The vis-viva equation, doh!

[tex]v^2=GM\left(\frac 2 r - \frac 1 a\right)[/tex]

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:
[tex]a\left(1-e\right)=\frac{h^{2}}{GM}[/tex]
That should be

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

Related Threads for: Semi-major axis from cartesian co-ordinates

  • Last Post
Replies
5
Views
5K
Replies
11
Views
2K
Replies
4
Views
2K
Replies
2
Views
2K
Replies
1
Views
891
  • Last Post
Replies
3
Views
3K
Replies
6
Views
2K
Top