Hey Jacob! Currently the return type for spk::position
and other similar functions is a Vector3D
.
pub fn position<'t, 'r, 'o, T, R, O>(
target: T,
et: Et,
reference_frame: R,
aberration_correction: AberrationCorrection,
observing_body: O,
) -> Result<(Vector3D, SpiceDouble), Error>
However the CSPICE documentation says the following:
ptarg is a Cartesian 3-vector ... The three components of `ptarg' represent the x-, y- and z-components of the target's position.
Perhaps we should return Rectangular
so as to streamline the conversion to different coordinate systems. Something like:
let (rect, _lt) = spk::position(...).unwrap();
let azel = coordinates::AzEl::from_rect(&rect, false, false);
Optionally we could also break apart the return type of functions which return [SpiceDouble; 6]
into their position (Rectangular)