Class: LibTAD::Astronomy::AstronomyDayEvent
- Inherits:
-
Object
- Object
- LibTAD::Astronomy::AstronomyDayEvent
- Defined in:
- lib/types/astronomy/astronomy_day_event.rb
Overview
Information about an astronomical event at a specific day.
Instance Attribute Summary collapse
-
#altitude ⇒ Float
readonly
Altitude of the center of the queried astronomical object above an ideal horizon.
-
#azimuth ⇒ Float
readonly
Horizontal direction of the astronomical object at set/rise time (referring to true north).
-
#distance ⇒ Float
readonly
Distance of the earth’s center to the center of the queried astronomical object in kilometers.
-
#hour ⇒ Integer
readonly
Hour at which the event is happening (local time).
-
#illuminated ⇒ Float
readonly
The fraction of the Moon’s surface illuminated by the Sun’s rays as seen from the selected location.
-
#isotime ⇒ String
readonly
Local time at which the event is happening in ISO 8601 format (including UTC offset).
-
#minute ⇒ Integer
readonly
Minute at which the event is happening (local time).
-
#posangle ⇒ Float
readonly
The counterclockwise angle of the midpoint of the Moon’s bright limb as seen from the selected location.
-
#second ⇒ Integer
readonly
Second at which the event is happening (local time).
-
#type ⇒ String
readonly
Indicates the type of the event.
-
#utctime ⇒ String
readonly
UTC time at which the event is happening in ISO 8601 format.
Instance Method Summary collapse
-
#initialize(hash) ⇒ AstronomyDayEvent
constructor
A new instance of AstronomyDayEvent.
Constructor Details
#initialize(hash) ⇒ AstronomyDayEvent
Returns a new instance of AstronomyDayEvent.
61 62 63 64 65 66 67 68 69 70 71 72 73 |
# File 'lib/types/astronomy/astronomy_day_event.rb', line 61 def initialize(hash) @type = hash.fetch('type', nil) @hour = hash.fetch('hour', nil) @min = hash.fetch('min', nil) @sec = hash.fetch('sec', nil) @isotime = hash.fetch('isotime', nil) @utctime = hash.fetch('utctime', nil) @altitude = hash.fetch('altitude', nil) @azimuth = hash.fetch('azimuth', nil) @distance = hash.fetch('distance', nil) @illuminated = hash.fetch('illuminated', nil) @posangle = hash.fetch('posangle', nil) end |
Instance Attribute Details
#altitude ⇒ Float (readonly)
Altitude of the center of the queried astronomical object above an ideal horizon. Only for meridian type events.
38 39 40 |
# File 'lib/types/astronomy/astronomy_day_event.rb', line 38 def altitude @altitude end |
#azimuth ⇒ Float (readonly)
Horizontal direction of the astronomical object at set/rise time (referring to true north). North is 0 degrees, east is 90 degrees, south is 180 degrees and west is 270 degrees. Only for rise and set type events.
44 45 46 |
# File 'lib/types/astronomy/astronomy_day_event.rb', line 44 def azimuth @azimuth end |
#distance ⇒ Float (readonly)
Distance of the earth’s center to the center of the queried astronomical object in kilometers. Only for meridian type events.
49 50 51 |
# File 'lib/types/astronomy/astronomy_day_event.rb', line 49 def distance @distance end |
#hour ⇒ Integer (readonly)
Hour at which the event is happening (local time).
11 12 13 |
# File 'lib/types/astronomy/astronomy_day_event.rb', line 11 def hour @hour end |
#illuminated ⇒ Float (readonly)
The fraction of the Moon’s surface illuminated by the Sun’s rays as seen from the selected location. Only for the moon for meridian type events.
54 55 56 |
# File 'lib/types/astronomy/astronomy_day_event.rb', line 54 def illuminated @illuminated end |
#isotime ⇒ String (readonly)
Local time at which the event is happening in ISO 8601 format (including UTC offset). Only returned if requested by specifying the parameter isotime.
Example: 2012-04-17T00:57:42+02:00
26 27 28 |
# File 'lib/types/astronomy/astronomy_day_event.rb', line 26 def isotime @isotime end |
#minute ⇒ Integer (readonly)
Minute at which the event is happening (local time).
15 16 17 |
# File 'lib/types/astronomy/astronomy_day_event.rb', line 15 def minute @minute end |
#posangle ⇒ Float (readonly)
The counterclockwise angle of the midpoint of the Moon’s bright limb as seen from the selected location. Only for the moon for meridian type events.
59 60 61 |
# File 'lib/types/astronomy/astronomy_day_event.rb', line 59 def posangle @posangle end |
#second ⇒ Integer (readonly)
Second at which the event is happening (local time).
19 20 21 |
# File 'lib/types/astronomy/astronomy_day_event.rb', line 19 def second @second end |
#type ⇒ String (readonly)
Indicates the type of the event.
7 8 9 |
# File 'lib/types/astronomy/astronomy_day_event.rb', line 7 def type @type end |
#utctime ⇒ String (readonly)
UTC time at which the event is happening in ISO 8601 format. Only returned if requested by specifying the parameter utctime.
Example: 2012-04-16T22:57:42
33 34 35 |
# File 'lib/types/astronomy/astronomy_day_event.rb', line 33 def utctime @utctime end |