pub fn transport_position_angle(
from: Equatorial,
to: Equatorial,
angle: Angle,
) -> Option<Angle>Expand description
Parallel-transport a sky position angle along the shortest great-circle path from one position to another.
The input and result are measured East of North in their respective local
tangent bases. The result is normalized to [0, 360)°. Epochs are not
reconciled; this is a geometric operation on the supplied coordinates.
Returns None when the positions are antipodal or numerically close enough
to antipodal that the shortest path is not unique. Identical positions
preserve the physical tangent direction. At a celestial pole, different
right ascensions select different local bases, so aliases of the same pole
can produce different numeric angles.
use skymath::{transport_position_angle, Angle, Equatorial};
let from = Equatorial::j2000(Angle::from_degrees(10.0), Angle::from_degrees(0.0))?;
let to = Equatorial::j2000(Angle::from_degrees(20.0), Angle::from_degrees(0.0))?;
let transported = transport_position_angle(from, to, Angle::from_degrees(0.0)).unwrap();
assert!(transported.degrees().abs() < 1e-12);