Sorry if this is obvious, but I am an amateur at orbital mechanics and trigonometry was never my strong suit. I would like to calculate the velocity vector at a point in an orbit given:

  • position vector of that point
  • inclination of the orbit
  • instantaneous speed at that point
  • true anomaly at that point (in this case at periapsis).

Other information which I could add to the script to find the velocity vector is

  • eccentricity
  • eccentricity vector
  • semi-major axis
  • periapsis radius
  • declination of the orbiter at apoapsis

With this info can I find the velocity vector at that point, or do I need additional information?

Calculating the RAAN would also do if that's easier (I am trying to define the complete orbital elements). The position vector and the eccentricity vector are in the ECI reference frame if that is important.

  • $\begingroup$ None of the "other information" values constrain the problem enough to uniquely identify the orbital plane more than your original set of values. As a result, I don't believe you have enough info to uniquely identify the velocity vector. $\endgroup$
    – notovny
    Jul 2, 2023 at 11:47
  • $\begingroup$ If, however, the eccentricity vector is not parallel to the position vector (that is, the position vector does not point at apoapsis or periapsis), the addition of it does provide enough information. $\endgroup$
    – notovny
    Jul 3, 2023 at 10:55
  • $\begingroup$ And if I'm not mistaken the projection of [eccentricity vector $\times$ position vector] on the reference plane points in the direction of either the ascending node or the descending node, again, assuming they're not parallel. $\endgroup$
    – notovny
    Jul 3, 2023 at 17:15

1 Answer 1



Parameter Symbol Units
Position Vector $\vec{r}$ distance
Orbital Inclination $i$ radians
Orbital speed at position vector $v$ distance/time
Eccentricity Vector $\vec{e}$

Requirements for these calculations:

  • Eccentricity Vector has a positive magnitude
  • Eccentricity Vector is not parallel to Position Vector.
  • All angular measurements are in radians.

1. Calculate the orbital eccentricity $e$ and the position unit vector $\hat{r}$:

$$e = ||\vec{e}||$$ $$\hat{r} =\frac{ \vec{r}}{||\vec{r}||}$$

2. Calculate the Perifocal Unit Vectors ($\hat{p},\hat{q},\hat{w}$)

The perifocal unit vectors are the orthagonal vectors in a reference frame centered on the body being orbited. They're useful for dealing with orbits using a canonical rotation, in their own plane.

$\hat{p}$ points at the orbital periapsis, and is co-directional with the eccentricity vector. This calculation requires a non-zero eccentricity.

$$\hat{p} = \frac{\vec{e}}{e}$$

$\hat{w}$ is perpendicular to the orbital plane, co-directional with the angular momentum vector. Since $\hat{p}$ and $\hat{r}$ are coplanar unit vectors, and as long as they aren't parallel, their cross product will be perpendicular to the orbital plane, and we can use its dot product with the z-axis unit vector $\hat{k}$ and the orbital inclination to determine the correct direction of $\hat{w}$.

$$\hat{u} = \hat{p} \times \hat{r}$$ $$\hat{w} = \begin{cases} \hat{u}, & \text{if ( $\hat{u} \cdot \hat{k} \ge 0$ and $i \le \frac{\pi}{2}$) or ( $\hat{u} \cdot \hat{k} \lt 0$ and $i \gt \frac{\pi}{2}$)} \\ -\hat{u},& \text{otherwise} \end{cases}$$

$\hat{q}$ is in the direction of True Anomaly $\frac{\pi}{2}$, and can be found from the cross product of the other two perifocal unit vectors.

$$\hat{q} = \hat{w} \times \hat{p}$$

3. Calculate true anomaly $\theta$

True anomaly is the angle between the periapsis and the orbital position, measured in the direction of travel around the orbit, and can be determined from the arccos of the dot product of our two unit vectors, using the dot product of $\hat{r}$ and $\hat{q}$ to determine the correct angle.

$$\theta = \begin{cases} \arccos\left(\hat{p} \cdot \hat{r}\right), & \text{if $\hat{r} \cdot \hat{q} \ge 0$ } \\ -\arccos\left(\hat{p} \cdot \hat{r}\right), &\text{otherwise} \end{cases} $$

4. Calculate the perifocal velocity angle $\psi$

From there, we can determine the angle between the velocity vector and the perifocal vector $\hat{p}$

$$\psi = \theta - \mathrm{atan2}(e \sin \theta, 1 + e \cos \theta) + \frac{\pi}{2}$$

5. Calculate the velocity vector $\vec{v}$

And finally, using the perifocal unit vectors, he perifocal velocity angle, and the speed at the chosen position to find the velocity vector.

$$\vec{v} = v (\hat{p} \cos \psi + \hat{q} \sin \psi )$$

  • $\begingroup$ I was able to work a way to get a non-periapsis position vector so this works a treat! Thanks! $\endgroup$
    – John Doe
    Jul 4, 2023 at 17:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.