Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduce MeanOfDate reference frame #138

Merged
merged 1 commit into from
Feb 25, 2025
Merged

Conversation

rhannequin
Copy link
Owner

@rhannequin rhannequin commented Feb 25, 2025

The mean coordinates of the date are related to the ecliptic or the mean equator and the mean equinox of the date. These are the geometric coordinates corrected for the precessional motion of the Earth’s rotation axis.

This introduces MeanOfDate reference frame, from Geometric, with precession of the date applied. By "date", we actually mean "instant", although the precession only changes slightly from one day to the next.

In Astronoby, the MeanOfDate reference frame is geocentric (like Astrometric). Mean of date coordinates don't have to be geocentric, but that's the design choice for Astronoby at the moment.

Like Geometric and Astrometry, the MeanOfDate reference frame offers equatorial and ecliptic coordinates, among with the Cartesian position and velocity, and the distance to the Earth's center.

instant = Astronoby::Instant.from_time(Time.utc(2025, 2, 7))
ephem = Astronoby::Ephem.load("de440s.bsp")

sun = Astronoby::Sun.new(instant: instant, ephem: ephem)

sun.mean_of_date.position.map(&:km).map(&:round)
# => Vector[110436790, -89767243, -38912451]

sun.mean_of_date.velocity.map(&:kmpd).map(&:round)
# => Vector[1747570, 1776918, 770305]

sun.mean_of_date.equatorial.right_ascension.str(:hms)
# => "21h 23m 34.6729s"

sun.mean_of_date.equatorial.declination.str(:dms)
# => "-15° 17′ 31.1747″"

sun.mean_of_date.ecliptic.latitude.str(:dms)
# => "+0° 0′ 0.4003″"

sun.mean_of_date.ecliptic.longitude.str(:dms)
# => "+318° 27′ 41.6839″"

sun.mean_of_date.distance.km.round
# => 147541931

@rhannequin rhannequin self-assigned this Feb 25, 2025
@rhannequin rhannequin merged commit 3ee65c1 into main Feb 25, 2025
34 checks passed
@rhannequin rhannequin deleted the mean-of-date-position branch February 25, 2025 20:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant