CelestialCalendar 1.0.0 · unreleased development @ 67a7c4c79a4a4a6aa7e703c9e6f0039ae34bee82
Loading...
Searching...
No Matches
astro::coords Namespace Reference

Classes

struct  EquatorialCoord
 Represents a position in the equatorial coordinate system. More...
struct  EclipticCoord
 Represents a position in the ecliptic coordinate system. More...
struct  HorizontalCoord
 Represents a position in the horizontal coordinate system. More...
struct  Fk5Correction
 Ecliptic longitude and latitude corrections from VSOP87D to FK5. More...

Functions

auto fk5_correction (const double jde_tt, const toolbox::SphericalCoordinate &vsop87d_coord) -> Fk5Correction
 Calculate the FK5 correction for dynamical ecliptic coordinates of date.
auto ecliptic_to_equatorial (const toolbox::AngleDeg &λ, const toolbox::AngleDeg &β, const toolbox::AngleDeg &ε) -> EquatorialCoord
 Convert ecliptic coordinates (λ, β) to equatorial coordinates (α, δ).
auto equatorial_to_horizontal (const toolbox::AngleDeg &H, const toolbox::AngleDeg &δ, const toolbox::AngleDeg &φ) -> HorizontalCoord
 Convert equatorial coordinates (H, δ) to horizontal coordinates (A, h) for an observer at latitude φ.

Function Documentation

◆ ecliptic_to_equatorial()

auto astro::coords::ecliptic_to_equatorial ( const toolbox::AngleDeg & λ,
const toolbox::AngleDeg & β,
const toolbox::AngleDeg & ε )->EquatorialCoord
inlinenodiscard

Convert ecliptic coordinates (λ, β) to equatorial coordinates (α, δ).

Parameters
λThe ecliptic longitude.
βThe ecliptic latitude.
εThe obliquity of the ecliptic. Use the true obliquity (ε₀ + Δε) for apparent coordinates.
Returns
The equatorial coordinates (α, δ); α is normalized to [0°, 360°).
Note
Meeus gives tan α in terms of tan β, which diverges at the ecliptic poles (β = ±90°). Here the numerator and denominator are multiplied through by cos β, so the result stays finite.
Assumes β ∈ [-90°, 90°], as ecliptic latitude is by definition; outside that range cos β < 0 and the cos β-multiplied form silently shifts α by 180°.
See also
Jean Meeus, "Astronomical Algorithms", Second Edition, Chapter 13, Formulas (13.3) and (13.4).

◆ equatorial_to_horizontal()

auto astro::coords::equatorial_to_horizontal ( const toolbox::AngleDeg & H,
const toolbox::AngleDeg & δ,
const toolbox::AngleDeg & φ )->HorizontalCoord
inlinenodiscard

Convert equatorial coordinates (H, δ) to horizontal coordinates (A, h) for an observer at latitude φ.

Parameters
HThe local hour angle of the object, measured westward from the meridian.
δThe declination of the object.
φThe observer's geographic latitude.
Returns
The horizontal coordinates (A, h); A is measured from the south point, positive westward, and normalized to [0°, 360°).
Note
Meeus gives tan A in terms of tan δ, which diverges at the celestial poles (δ = ±90°). Here the numerator and denominator are multiplied through by cos δ, so the result stays finite.
Assumes δ ∈ [-90°, 90°] and φ ∈ [-90°, 90°], as declination and geographic latitude are by definition; outside the former range the cos δ-multiplied form silently shifts A by 180°.
The resulting altitude is purely geometric: no atmospheric refraction, parallax, or horizon dip is taken into account (for refraction see Meeus Chapter 16; for parallax, Chapter 40).
See also
Jean Meeus, "Astronomical Algorithms", Second Edition, Chapter 13, Formulas (13.5) and (13.6).

◆ fk5_correction()

auto astro::coords::fk5_correction ( const double jde_tt,
const toolbox::SphericalCoordinate & vsop87d_coord )->Fk5Correction
inlinenodiscard

Calculate the FK5 correction for dynamical ecliptic coordinates of date.

Parameters
jde_ttJulian Ephemeris Day in TT.
vsop87d_coordDynamical ecliptic coordinates at the same epoch; radius is unused.
Returns
Additive longitude and latitude corrections.
See also
Jean Meeus, "Astronomical Algorithms", Second Edition, Formula (32.3); Chapter 33, page 225 for geocentric coordinates.