-
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This is the start of the transition for `Sun` and `Moon` from formula-based to ephemeris-based. It gives the ability to `Sun` and `Moon` to be initialized from a given `Instant` and `Ephem`. `Planet` is renamed into `SolarSystemBody` so that `Sun` and `Moon` can inherit from it while still making sense. Thanks to `SolarSystemBody`, `Sun` and `Moon` have Geometric and Astrometric positions, with each equatorial and ecliptic coordinates. ```rb 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.geometric.equatorial.right_ascension sun.geometric.equatorial.declination sun.geometric.ecliptic.latitude sun.geometric.ecliptic.longitude sun.geometric.distance sun.astrometric.equatorial.right_ascension sun.astrometric.equatorial.declination sun.astrometric.ecliptic.latitude sun.astrometric.ecliptic.longitude sun.astrometric.distance moon = Astronoby::Moon.new(instant: instant, ephem: ephem) moon.geometric.equatorial.right_ascension moon.geometric.equatorial.declination moon.geometric.ecliptic.latitude moon.geometric.ecliptic.longitude moon.geometric.distance moon.astrometric.equatorial.right_ascension moon.astrometric.equatorial.declination moon.astrometric.ecliptic.latitude moon.astrometric.ecliptic.longitude moon.astrometric.distance ```
- Loading branch information
1 parent
10ee22c
commit a481ca2
Showing
19 changed files
with
369 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 3 additions & 1 deletion
4
lib/astronoby/bodies/planet.rb → lib/astronoby/bodies/solar_system_body.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
spec/astronoby/bodies/planet_spec.rb → ...stronoby/bodies/solar_system_body_spec.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.