Class: Astronoby::DeepSkyObjectPosition
- Inherits:
-
Object
- Object
- Astronoby::DeepSkyObjectPosition
- Includes:
- Position
- Defined in:
- lib/astronoby/bodies/deep_sky_object_position.rb
Overview
Represents the computed position of a deep-sky object at a specific instant, providing astrometric, apparent, and topocentric reference frames.
Constant Summary collapse
- DEFAULT_DISTANCE =
Distance.from_parsecs(1e9)
Instance Attribute Summary collapse
-
#apparent ⇒ Astronoby::Apparent
readonly
The apparent reference frame.
-
#body ⇒ Astronoby::DeepSkyObject?
readonly
The body definition.
-
#instant ⇒ Astronoby::Instant
readonly
The time instant.
Instance Method Summary collapse
-
#astrometric ⇒ Astronoby::Astrometric
Astrometric position of the object.
-
#initialize(instant:, equatorial_coordinates:, ephem: nil, proper_motion_ra: nil, proper_motion_dec: nil, parallax: nil, radial_velocity: nil, deep_sky_object: nil) ⇒ DeepSkyObjectPosition
constructor
A new instance of DeepSkyObjectPosition.
Methods included from Position
Constructor Details
#initialize(instant:, equatorial_coordinates:, ephem: nil, proper_motion_ra: nil, proper_motion_dec: nil, parallax: nil, radial_velocity: nil, deep_sky_object: nil) ⇒ DeepSkyObjectPosition
Returns a new instance of DeepSkyObjectPosition.
31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 |
# File 'lib/astronoby/bodies/deep_sky_object_position.rb', line 31 def initialize( instant:, equatorial_coordinates:, ephem: nil, proper_motion_ra: nil, proper_motion_dec: nil, parallax: nil, radial_velocity: nil, deep_sky_object: nil ) @instant = instant @initial_equatorial_coordinates = equatorial_coordinates @proper_motion_ra = proper_motion_ra @proper_motion_dec = proper_motion_dec @parallax = parallax @radial_velocity = radial_velocity @body = deep_sky_object if ephem @earth_geometric = Earth.geometric(ephem: ephem, instant: @instant) end compute_apparent end |
Instance Attribute Details
#apparent ⇒ Astronoby::Apparent (readonly)
Returns the apparent reference frame.
15 16 17 |
# File 'lib/astronoby/bodies/deep_sky_object_position.rb', line 15 def apparent @apparent end |
#body ⇒ Astronoby::DeepSkyObject? (readonly)
Returns the body definition.
18 19 20 |
# File 'lib/astronoby/bodies/deep_sky_object_position.rb', line 18 def body @body end |
#instant ⇒ Astronoby::Instant (readonly)
Returns the time instant.
12 13 14 |
# File 'lib/astronoby/bodies/deep_sky_object_position.rb', line 12 def instant @instant end |
Instance Method Details
#astrometric ⇒ Astronoby::Astrometric
Returns Astrometric position of the object.
55 56 57 58 59 60 61 62 63 |
# File 'lib/astronoby/bodies/deep_sky_object_position.rb', line 55 def astrometric @astrometric ||= Astrometric.new( instant: @instant, position: astrometric_position, velocity: astrometric_velocity, center: Center.geocentric, target_body: body ) end |