Semi-major axis from cartesian co-ordinates

In summary, to calculate the semi major axis of a body in an elliptical orbit, you need to know the body's gravitational constant, G*, the mass, and the position. You also need to know the eccentricity.
  • #1
Spanky Deluxe
19
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
  • #2
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
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.
 
  • #4
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
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:

[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
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?

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

[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
Spanky Deluxe said:
[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

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:
Spanky Deluxe said:
[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 to Semi-major axis from cartesian co-ordinates

What is a semi-major axis in cartesian coordinates?

A semi-major axis is a measurement in an ellipse that extends from the center to the farthest point on the ellipse. In cartesian coordinates, it is one of the two axes that define the shape and orientation of the ellipse.

How is the semi-major axis calculated from cartesian coordinates?

The semi-major axis can be calculated using the distance formula, which is the square root of the sum of the squared x and y coordinates. It can also be calculated by finding the distance between the center of the ellipse and one of its foci.

What is the relationship between the semi-major axis and the shape of an ellipse?

The semi-major axis is half the length of the major axis, and the major axis is the longest diameter of an ellipse. Therefore, the semi-major axis is a crucial factor in determining the size and shape of an ellipse.

How does the semi-major axis affect the orbital period of an object?

The semi-major axis is directly related to the orbital period of an object. The larger the semi-major axis, the longer the orbital period will be. This relationship is described by Kepler's Third Law of Planetary Motion.

Can the semi-major axis be negative in cartesian coordinates?

No, the semi-major axis cannot be negative in cartesian coordinates. The x and y coordinates are always positive, and the distance formula only produces positive values. Therefore, the semi-major axis is always a positive value in cartesian coordinates.

Similar threads

  • Astronomy and Astrophysics
Replies
3
Views
3K
  • Astronomy and Astrophysics
Replies
1
Views
2K
Replies
14
Views
1K
  • Astronomy and Astrophysics
Replies
5
Views
6K
  • Differential Equations
Replies
4
Views
2K
  • Introductory Physics Homework Help
Replies
13
Views
2K
  • Astronomy and Astrophysics
Replies
1
Views
5K
  • Advanced Physics Homework Help
Replies
1
Views
1K
  • Introductory Physics Homework Help
Replies
7
Views
2K
Back
Top