Calculating apoapsis from position and velocity

In summary, the orbital state vector (position and velocity) is needed to find the apoapsis of the orbit.
  • #1
ellipsis
158
24
I have a body of negligible mass orbiting a body of considerable mass, with that larger body fixed at the origin. I am given the orbital state vector (position and velocity), and need to return the apoapsis of orbit. Other orbital information would be useful, e.g. energy, angular momentum, eccentricity, etc.

For simplicity, the system is assumed to be in a plane... I am not concerned with the third position/vector component.

What I have so far:

Code:
  energy = norm(v)^2/2-S/norm(p);
  angmom = dot(p,v);
  eccen = sqrt(1+(2*energy*angmom^2)/S^2);
  semimajor = 1/(2/norm(p)-norm(v)^2/S);
  apoapsis = semimajor*(1+norm(eccen));

Sorry about the formatting, it's in Matlab language. I am far too lazy to do the latex for such a simple question. The above formulae do not return the correct results.EDIT: Huh... it may work now. ?
 
Last edited:
Physics news on Phys.org
  • #2
ellipsis said:
The above formulae do not return the correct results.
What is correct, what do you get, and where do the formulas come from?
 
  • #3
mfb: The apoapsis changes drastically in different parts of the orbit, and I know the physics code is already correct, so it must be this. The formulae are thrown together from various sources, like Wikipedia and a paper I found on these forums.

The above may or may not be correct, I'm not sure. Mathematically, how does one normally calculate orbital parameters given position and velocity (and standard gravitational parameter, S)
 
  • #5
Wow Tony, you made that? I found that when searching for an orbital simulator, but didn't use it because the orbital elements were not obvious. Thanks.
 
  • #6
If you hover the mouse over a text box, it tells you in English what each box means, in case you don't like Greek variables.
 

FAQ: Calculating apoapsis from position and velocity

What is apoapsis in orbital mechanics?

Apoapsis is the point in an object's orbit around a central body where it is farthest away from that body. It is the opposite of periapsis, which is the point in the orbit where the object is closest to the central body.

How is apoapsis calculated from position and velocity?

Apoapsis can be calculated using the semi-major axis (a) and eccentricity (e) of the orbit. The formula for apoapsis is a(1+e), where a is the distance from the center of the central body to the apoapsis and e is the eccentricity of the orbit. This formula can be derived from Kepler's laws of planetary motion.

Can apoapsis be calculated for any orbit?

Yes, apoapsis can be calculated for any orbit as long as the position and velocity of the object are known. However, for an object in a circular orbit, the apoapsis will be equal to the radius of the orbit.

How is apoapsis different from apogee?

Apoapsis and apogee are both terms used to describe the farthest point in an orbit from a central body. However, apoapsis is used in orbital mechanics and refers specifically to orbits around a celestial body, while apogee is used in a broader context and can refer to any type of orbit, including those around man-made objects.

Why is calculating apoapsis important in space exploration?

Calculating apoapsis is important in space exploration because it helps determine the trajectory and timing of spacecraft and satellites. It also allows for precise planning and execution of maneuvers, such as entering or leaving an orbit, rendezvous with other objects, and landing on a celestial body.

Back
Top