 |
 |
Semi-major axis from cartesian co-ordinates |
 |
Nov23-09, 06:27 PM
|
#1
|
Spanky Deluxe is
Offline:
Posts: 16
|
Semi-major axis from cartesian co-ordinates
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. :(
|
|
|
|
Nov23-09, 07:13 PM
|
#2
|
ideasrule is
Offline:
Posts: 1,311
Recognitions:
Homework Helper
|
Re: Semi-major axis from cartesian co-ordinates
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#A...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.
|
|
|
|
Nov23-09, 10:17 PM
|
#3
|
D H is
Offline:
Posts: 4,504
Recognitions:
Homework Helper
Science Advisor
|
Re: Semi-major axis from cartesian co-ordinates
Originally Posted by Spanky Deluxe
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.
Originally Posted by ideasrule
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.
|
|
|
|
Nov23-09, 11:59 PM
|
#4
|
ideasrule is
Offline:
Posts: 1,311
Recognitions:
Homework Helper
|
Re: Semi-major axis from cartesian co-ordinates
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.
|
|
|
|
Nov24-09, 09:27 AM
|
#5
|
Spanky Deluxe is
Offline:
Posts: 16
|
Re: Semi-major axis from cartesian co-ordinates
Originally Posted by D H
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:
to find the specific angular momentum and then
But then how can I separate the eccentricity and semi-major axis?
|
|
|
|
Nov24-09, 11:45 AM
|
#6
|
D H is
Offline:
Posts: 4,504
Recognitions:
Homework Helper
Science Advisor
|
Re: Semi-major axis from cartesian co-ordinates
Originally Posted by Spanky Deluxe
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?
|
|
|
|
Nov24-09, 09:49 PM
|
#7
|
Spanky Deluxe is
Offline:
Posts: 16
|
Re: Semi-major axis from cartesian co-ordinates
Originally Posted by D H
Simple: Compute the eccentricity vector and take its magnitude. So what's this eccentricity vector thing?

|
Ok, I've done that now.
One thing though, I also found the following equations which I found here:
and
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. :(
|
|
|
|
Nov24-09, 11:29 PM
|
#8
|
D H is
Offline:
Posts: 4,504
Recognitions:
Homework Helper
Science Advisor
|
Re: Semi-major axis from cartesian co-ordinates
Originally Posted by Spanky Deluxe

|
The vis-viva equation, doh!
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:
Originally Posted by Spanky Deluxe

|
That should be
|
|
|
|
Nov26-09, 08:29 PM
|
#9
|
Spanky Deluxe is
Offline:
Posts: 16
|
Re: Semi-major axis from cartesian co-ordinates
DH, you are an absolute star and a lifesaver!! Thanks so much for the help!!
|
|
|
|
|
 |
 |
|
 |
|