use super::*;
impl<F> CenterShiftProvider<Heliocentric, Barycentric, F> for ()
where
F: affn::ReferenceFrame,
(): FrameRotationProvider<EclipticMeanJ2000, F>,
{
#[inline]
fn try_shift<Eph: Ephemeris, Eop: EopProvider, Nut: NutationModel>(
jd: JulianDate,
ctx: &AstroContext<Eph, Eop>,
) -> Result<AuShift, CenterShiftError> {
Ok(rotate_shift_from_ecliptic::<_, F, Eph, Eop, Nut>(
Eph::try_sun_barycentric(jd)?,
jd,
ctx,
))
}
}
impl<F> CenterShiftProvider<Barycentric, Heliocentric, F> for ()
where
F: affn::ReferenceFrame,
(): FrameRotationProvider<EclipticMeanJ2000, F>,
{
#[inline]
fn try_shift<Eph: Ephemeris, Eop: EopProvider, Nut: NutationModel>(
jd: JulianDate,
ctx: &AstroContext<Eph, Eop>,
) -> Result<AuShift, CenterShiftError> {
try_inverse_shift::<Barycentric, Heliocentric, F, Eph, Eop, Nut>(jd, ctx)
}
}
impl<F> CenterShiftProvider<Geocentric, Barycentric, F> for ()
where
F: affn::ReferenceFrame,
(): FrameRotationProvider<EclipticMeanJ2000, F>,
{
#[inline]
fn try_shift<Eph: Ephemeris, Eop: EopProvider, Nut: NutationModel>(
jd: JulianDate,
ctx: &AstroContext<Eph, Eop>,
) -> Result<AuShift, CenterShiftError> {
Ok(rotate_shift_from_ecliptic::<_, F, Eph, Eop, Nut>(
Eph::try_earth_barycentric(jd)?,
jd,
ctx,
))
}
}
impl<F> CenterShiftProvider<Barycentric, Geocentric, F> for ()
where
F: affn::ReferenceFrame,
(): FrameRotationProvider<EclipticMeanJ2000, F>,
{
#[inline]
fn try_shift<Eph: Ephemeris, Eop: EopProvider, Nut: NutationModel>(
jd: JulianDate,
ctx: &AstroContext<Eph, Eop>,
) -> Result<AuShift, CenterShiftError> {
try_inverse_shift::<Barycentric, Geocentric, F, Eph, Eop, Nut>(jd, ctx)
}
}
impl<F> CenterShiftProvider<Heliocentric, Geocentric, F> for ()
where
F: affn::ReferenceFrame,
(): FrameRotationProvider<EclipticMeanJ2000, F>,
{
#[inline]
fn try_shift<Eph: Ephemeris, Eop: EopProvider, Nut: NutationModel>(
jd: JulianDate,
ctx: &AstroContext<Eph, Eop>,
) -> Result<AuShift, CenterShiftError> {
try_compose_shift::<Heliocentric, Barycentric, Geocentric, F, Eph, Eop, Nut>(jd, ctx)
}
}
impl<F> CenterShiftProvider<Geocentric, Heliocentric, F> for ()
where
F: affn::ReferenceFrame,
(): FrameRotationProvider<EclipticMeanJ2000, F>,
{
#[inline]
fn try_shift<Eph: Ephemeris, Eop: EopProvider, Nut: NutationModel>(
jd: JulianDate,
ctx: &AstroContext<Eph, Eop>,
) -> Result<AuShift, CenterShiftError> {
try_inverse_shift::<Geocentric, Heliocentric, F, Eph, Eop, Nut>(jd, ctx)
}
}