Skip to content

Deep Sky Object: Add support for RiseTransitSetCalculator#228

Merged
rhannequin merged 1 commit intomainfrom
deep-sky-object-rts
Oct 21, 2025
Merged

Deep Sky Object: Add support for RiseTransitSetCalculator#228
rhannequin merged 1 commit intomainfrom
deep-sky-object-rts

Conversation

@rhannequin
Copy link
Owner

This enables to calculate rise-transit-set events for deep-sky objects.

Methods Astronoby::SolarSystemBody::at was added to have a common API between solar system bodies and deep-sky objects so that both could be used by services

Astronoby::DeepSkyObject instances can be created with or without ephem and proper motion attributes. Here's an example with the bare minimum configuration:

observer = Astronoby::Observer.new(
  latitude: Astronoby::Angle.from_degrees(51.5072),
  longitude: Astronoby::Angle.from_degrees(-0.1276)
)
date = Date.new(2025, 10, 1)

body = Astronoby::DeepSkyObject.new(
  equatorial_coordinates: Astronoby::Coordinates::Equatorial.new(
    right_ascension: Astronoby::Angle.from_hms(6, 45, 8.917),
    declination: Astronoby::Angle.from_dms(-16, 42, 58.02)
  )
)

calculator = Astronoby::RiseTransitSetCalculator.new(body: body, observer: observer)

event = calculator.event_on(date)

event.rising_time
# => 2025-10-01 01:31:27 UTC

event.transit_time
# => 2025-10-01 06:05:53 UTC

event.setting_time
# => 2025-10-01 10:40:19 UTC

@rhannequin rhannequin self-assigned this Oct 17, 2025
@rhannequin rhannequin force-pushed the deep-sky-object-position-class branch from f36d3b6 to 2b703d1 Compare October 21, 2025 08:03
Base automatically changed from deep-sky-object-position-class to main October 21, 2025 08:32
This enables to calculate rise-transit-set events for deep-sky objects.

Methods `Astronoby::SolarSystemBody::at` was added to have a common API
between solar system bodies and deep-sky objects so that both could be
used by services.
@rhannequin rhannequin merged commit 42c1f89 into main Oct 21, 2025
43 checks passed
@rhannequin rhannequin deleted the deep-sky-object-rts branch October 21, 2025 08:58
@rhannequin rhannequin mentioned this pull request Oct 25, 2025
rhannequin added a commit that referenced this pull request Oct 31, 2025
## 0.9.0 - 2025-10-31

_If you are upgrading: please see [UPGRADING.md]._

### Features

* Add `#approaching_primary?` and `#receding_from_primary?` to solar system bodies ([#211])
* Calculate apoapsis and periapsis events ([#213])
* Improve precision of ΔT ([#219])
* Deep Sky Object: Compute astrometric position ([#217])
* Deep Sky Object: Compute apparent position ([#220])
* Deep Sky Object: Handle velocities properly ([#222])
* Deep Sky Object: Compute topocentric position ([#226])
* Deep Sky Object: difference between the body and the position ([#227])
* Deep Sky Object: Add support for RiseTransitSetCalculator ([#228])

### Improvements

* Drop `Astronoby::Apparent#angular_diameter` ([#221])
* Bump rubyzip from 3.0.2 to 3.2.1 by @dependabot ([#210], [#215], [#223], [#233])
* Bump standard from 1.50.0 to 1.51.1 by @dependabot ([#212], [#214])
* Be proud about the precision achieved ([#218])
* Use local apparent instead of local mean sidereal time for hour angle ([#225])
* Bump rspec from 3.13.1 to 3.13.2 by @dependabot ([#229])
* Bump benchmark from 0.4.1 to 0.5.0 by @dependabot ([#230])
* Add documentation for deep-sky objects ([#232])
* Bump rake from 13.3.0 to 13.3.1 by @dependabot ([#235])

### Backward-incompatible changes

* Drop `Astronoby::Apparent#angular_diameter` ([#221])
* Use local apparent instead of local mean sidereal time for hour angle ([#225])

**Full Changelog**: v0.8.0...v0.9.0

[#210]: #210
[#211]: #211
[#212]: #212
[#213]: #213
[#214]: #214
[#215]: #215
[#217]: #217
[#218]: #218
[#219]: #219
[#220]: #220
[#221]: #221
[#222]: #222
[#223]: #223
[#225]: #225
[#226]: #226
[#227]: #227
[#228]: #228
[#229]: #229
[#230]: #230
[#232]: #232
[#233]: #233
[#235]: #235
[UPGRADING.md]: https://github.com/rhannequin/astronoby/blob/main/UPGRADING.md
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