Calculating apoapsis from position and velocity

  • Context: Graduate 
  • Thread starter Thread starter ellipsis
  • Start date Start date
  • Tags Tags
    Position Velocity
Click For Summary

Discussion Overview

The discussion revolves around calculating the apoapsis of an orbit from a given orbital state vector, which includes position and velocity. Participants explore the derivation of various orbital parameters such as energy, angular momentum, and eccentricity, while focusing on the mathematical formulation and correctness of the provided equations.

Discussion Character

  • Technical explanation
  • Mathematical reasoning
  • Debate/contested

Main Points Raised

  • One participant presents a set of equations in Matlab for calculating energy, angular momentum, eccentricity, semimajor axis, and apoapsis, but expresses uncertainty about their correctness.
  • Another participant questions the validity of the equations and asks for clarification on what the correct results should be and the origins of the formulas.
  • A participant notes that the apoapsis can vary significantly at different points in the orbit and suggests that the formulas may be incorrect, while also inquiring about standard methods for calculating orbital parameters from position and velocity.
  • A link to an external orbital calculator is provided, which includes a method derived from a specific text on solar system dynamics, indicating that apoapsis is referred to as Q in that context.
  • Another participant expresses appreciation for the calculator and mentions that they found it during their search for an orbital simulator but did not use it due to unclear variable definitions.
  • A suggestion is made that hovering over the text boxes in the calculator provides explanations for the variables used, which may help users unfamiliar with the terminology.

Areas of Agreement / Disagreement

Participants do not reach a consensus on the correctness of the initial formulas presented. There are multiple competing views regarding the calculation of orbital parameters, and the discussion remains unresolved.

Contextual Notes

There are limitations regarding the assumptions made in the calculations, such as the dependence on the standard gravitational parameter and the simplification to a two-dimensional plane. The accuracy of the formulas is also questioned, but no definitive resolution is provided.

ellipsis
Messages
158
Reaction score
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
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?
 
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)
 
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.
 
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.
 

Similar threads

  • · Replies 6 ·
Replies
6
Views
9K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 9 ·
Replies
9
Views
1K
  • · Replies 30 ·
2
Replies
30
Views
2K
Replies
6
Views
2K
  • · Replies 7 ·
Replies
7
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 8 ·
Replies
8
Views
979
  • · Replies 7 ·
Replies
7
Views
3K
Replies
9
Views
1K