fixedStarHorizontal function

HorizontalPosition fixedStarHorizontal(
  1. Ephemeris ephemeris,
  2. FixedStar star,
  3. Observer observer,
  4. double jdTT, {
  5. bool withRefraction = false,
  6. double pressure = 1010,
  7. double temperature = 10,
  8. double? deltaTSeconds,
})

Horizontal coordinates of star for observer at jdTT (apparent place as in fixedStarEcliptic: space motion, annual parallax, light deflection, aberration, precession and nutation).

Implementation

HorizontalPosition fixedStarHorizontal(
  Ephemeris ephemeris,
  FixedStar star,
  Observer observer,
  double jdTT, {
  bool withRefraction = false,
  double pressure = 1010,
  double temperature = 10,
  double? deltaTSeconds,
}) {
  final (:direction, :distance) = fixedStarDirection(ephemeris, star, jdTT);
  final t = centuriesSinceJ2000(jdTT);
  final equator = gcrsToEclipticOfDate(
    direction,
    t,
    nutationInLongitude: nutation(t).longitude,
  ).rotateX(-trueObliquity(t));
  final ra = math.atan2(equator.y, equator.x) / _degree;
  return _horizontal(
    ra < 0 ? ra + 360 : ra,
    math.asin(equator.z.clamp(-1.0, 1.0)) / _degree,
    distance,
    observer,
    jdTT,
    withRefraction,
    pressure,
    temperature,
    deltaTSeconds,
  );
}