Class: Astronoby::Uranus

Inherits:
SolarSystemBody show all
Defined in:
lib/astronoby/bodies/uranus.rb

Overview

Represents Uranus.

Constant Summary collapse

EQUATORIAL_RADIUS =
Distance.from_meters(25_559_000)
ABSOLUTE_MAGNITUDE =
-7.11
ORBITAL_PERIOD =
30688.5

Constants inherited from SolarSystemBody

SolarSystemBody::EARTH, SolarSystemBody::EARTH_MOON_BARYCENTER, SolarSystemBody::JUPITER_BARYCENTER, SolarSystemBody::MARS_BARYCENTER, SolarSystemBody::MERCURY, SolarSystemBody::MERCURY_BARYCENTER, SolarSystemBody::MOON, SolarSystemBody::NEPTUNE_BARYCENTER, SolarSystemBody::SATURN_BARYCENTER, SolarSystemBody::SOLAR_SYSTEM_BARYCENTER, SolarSystemBody::SUN, SolarSystemBody::URANUS_BARYCENTER, SolarSystemBody::VENUS, SolarSystemBody::VENUS_BARYCENTER

Instance Attribute Summary

Attributes inherited from SolarSystemBody

#ephem, #instant, #orientation

Class Method Summary collapse

Methods inherited from SolarSystemBody

#angular_diameter, #apparent, #apparent_magnitude, #approaching_primary?, #astrometric, at, #body, compute_geometric, conjunction_events, #constellation, #earth_geometric, #eastern?, #elongation, geometric, #geometric, greatest_elongation_events, #illuminated_fraction, inferior_planet?, #initialize, #mean_of_date, opposition_events, #phase_angle, planet?, #receding_from_primary?, rise_transit_set_events, #western?

Methods included from Position

#observed_by

Constructor Details

This class inherits a constructor from Astronoby::SolarSystemBody

Class Method Details

.absolute_magnitudeFloat

Returns absolute magnitude.

Returns:

  • (Float)

    absolute magnitude



22
23
24
# File 'lib/astronoby/bodies/uranus.rb', line 22

def self.absolute_magnitude
  ABSOLUTE_MAGNITUDE
end

.ephemeris_segments(_ephem_source) ⇒ Array<Array>

Returns ephemeris segment identifiers.

Parameters:

  • _ephem_source (Symbol)

    the ephemeris source type

Returns:

  • (Array<Array>)

    ephemeris segment identifiers



17
18
19
# File 'lib/astronoby/bodies/uranus.rb', line 17

def self.ephemeris_segments(_ephem_source)
  [[SOLAR_SYSTEM_BARYCENTER, URANUS_BARYCENTER]]
end

.superior_planet?Boolean

Returns true; Uranus is a superior planet.

Returns:

  • (Boolean)

    true; Uranus is a superior planet



11
12
13
# File 'lib/astronoby/bodies/uranus.rb', line 11

def self.superior_planet?
  true
end