From state vectors
For elliptic orbits, the true anomaly ν can be calculated from orbital state vectors as:
- (if r ⋅ v < 0 then replace ν by 2π − ν)
For circular orbits the true anomaly is undefined, because circular orbits do not have a uniquely determined periapsis. Instead the argument of latitude u is used:
- (if rz < 0 then replace u by 2π − u)
- n is a vector pointing towards the ascending node (i.e. the z-component of n is zero).
- rz is the z-component of the orbital position vector r
Circular orbit with zero inclination
For circular orbits with zero inclination the argument of latitude is also undefined, because there is no uniquely determined line of nodes. One uses the true longitude instead:
- (if vx > 0 then replace l by 2π − l)
From the eccentric anomaly
The relation between the true anomaly ν and the eccentric anomaly E is:
or using the sine and tangent:
An equivalent form avoids the singularity as e → 1, however it does not produce the correct value for :
or, with the same problem as e → 1 ,
In both of the above, the function arg(x, y) is the polar argument of the vector (x y), available in many programming languages as the library function named atan2(y,x) (note the reversed order of x and y).
From the mean anomaly
The true anomaly can be calculated directly from the mean anomaly via a Fourier expansion:
where the means that the omitted terms are all of order e4 or higher. Note that for reasons of accuracy this approximation is usually limited to orbits where the eccentricity (e) is small.
The expression is known as the equation of the center.
Radius from true anomaly
The radius (distance from the focus of attraction and the orbiting body) is related to the true anomaly by the formula
where a is the orbit's semi-major axis.