Class: Astronoby::Coordinates::Horizontal
- Inherits:
-
Object
- Object
- Astronoby::Coordinates::Horizontal
- Defined in:
- lib/astronoby/coordinates/horizontal.rb
Overview
Horizontal coordinate system (azimuth and altitude) for a specific observer.
Instance Attribute Summary collapse
-
#altitude ⇒ Astronoby::Angle
readonly
Altitude above the horizon.
-
#azimuth ⇒ Astronoby::Angle
readonly
Azimuth (measured from north, clockwise).
-
#observer ⇒ Astronoby::Observer
readonly
The observer.
Instance Method Summary collapse
-
#initialize(azimuth:, altitude:, observer:) ⇒ Horizontal
constructor
A new instance of Horizontal.
Constructor Details
#initialize(azimuth:, altitude:, observer:) ⇒ Horizontal
Returns a new instance of Horizontal.
20 21 22 23 24 25 26 27 28 |
# File 'lib/astronoby/coordinates/horizontal.rb', line 20 def initialize( azimuth:, altitude:, observer: ) @azimuth = azimuth @altitude = altitude @observer = observer end |
Instance Attribute Details
#altitude ⇒ Astronoby::Angle (readonly)
Returns altitude above the horizon.
12 13 14 |
# File 'lib/astronoby/coordinates/horizontal.rb', line 12 def altitude @altitude end |
#azimuth ⇒ Astronoby::Angle (readonly)
Returns azimuth (measured from north, clockwise).
9 10 11 |
# File 'lib/astronoby/coordinates/horizontal.rb', line 9 def azimuth @azimuth end |
#observer ⇒ Astronoby::Observer (readonly)
Returns the observer.
15 16 17 |
# File 'lib/astronoby/coordinates/horizontal.rb', line 15 def observer @observer end |