use super::*;
impl<F> CenterShiftProvider<Heliocentric, Barycentric, F> for ()
where
F: affn::ReferenceFrame,
(): FrameRotationProvider<EclipticMeanJ2000, F>,
{
#[inline]
fn shift<Eph: Ephemeris, Eop: EopProvider, Nut>(
jd: JulianDate,
ctx: &AstroContext<Eph, Eop, Nut>,
) -> AuShift {
rotate_shift_from_ecliptic::<_, F, Eph, Eop, Nut>(Eph::sun_barycentric(jd), jd, ctx)
}
}
impl<F> CenterShiftProvider<Barycentric, Heliocentric, F> for ()
where
F: affn::ReferenceFrame,
(): FrameRotationProvider<EclipticMeanJ2000, F>,
{
#[inline]
fn shift<Eph: Ephemeris, Eop: EopProvider, Nut>(
jd: JulianDate,
ctx: &AstroContext<Eph, Eop, Nut>,
) -> AuShift {
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 shift<Eph: Ephemeris, Eop: EopProvider, Nut>(
jd: JulianDate,
ctx: &AstroContext<Eph, Eop, Nut>,
) -> AuShift {
rotate_shift_from_ecliptic::<_, F, Eph, Eop, Nut>(Eph::earth_barycentric(jd), jd, ctx)
}
}
impl<F> CenterShiftProvider<Barycentric, Geocentric, F> for ()
where
F: affn::ReferenceFrame,
(): FrameRotationProvider<EclipticMeanJ2000, F>,
{
#[inline]
fn shift<Eph: Ephemeris, Eop: EopProvider, Nut>(
jd: JulianDate,
ctx: &AstroContext<Eph, Eop, Nut>,
) -> AuShift {
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 shift<Eph: Ephemeris, Eop: EopProvider, Nut>(
jd: JulianDate,
ctx: &AstroContext<Eph, Eop, Nut>,
) -> AuShift {
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 shift<Eph: Ephemeris, Eop: EopProvider, Nut>(
jd: JulianDate,
ctx: &AstroContext<Eph, Eop, Nut>,
) -> AuShift {
inverse_shift::<Geocentric, Heliocentric, F, Eph, Eop, Nut>(jd, ctx)
}
}