Class: Astronoby::MoonPhysicalEphemeris

Inherits:
Object
  • Object
show all
Defined in:
lib/astronoby/moon_physical_ephemeris.rb

Overview

Computes the ephemeris for physical observations of the Moon: the total (optical + physical) libration in longitude and latitude, and the position angle of the Moon’s axis of rotation.

Source:

Title: Astronomical Algorithms
Author: Jean Meeus
Edition: 2nd edition
Chapter: 53 - Ephemeris for Physical Observations of the Moon

Constant Summary collapse

INCLINATION =

Inclination of the mean lunar equator to the ecliptic

Angle.from_degrees(1.54242)

Instance Method Summary collapse

Constructor Details

#initialize(moon) ⇒ MoonPhysicalEphemeris

Returns a new instance of MoonPhysicalEphemeris.

Parameters:



18
19
20
21
# File 'lib/astronoby/moon_physical_ephemeris.rb', line 18

def initialize(moon)
  @moon = moon
  @instant = moon.instant
end

Instance Method Details

#librationAstronoby::Libration

Returns the total libration in longitude and latitude.

Returns:



25
26
27
28
29
30
# File 'lib/astronoby/moon_physical_ephemeris.rb', line 25

def libration
  Libration.new(
    longitude: Angle.from_degrees(libration_in_longitude),
    latitude: Angle.from_degrees(libration_in_latitude)
  )
end

#position_angle_of_axisAstronoby::Angle

Returns the position angle of the Moon’s axis of rotation, measured eastward from the north point of the disk.

Returns:

  • (Astronoby::Angle)

    the position angle of the Moon’s axis of rotation, measured eastward from the north point of the disk



34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# File 'lib/astronoby/moon_physical_ephemeris.rb', line 34

def position_angle_of_axis
  i_rho = INCLINATION + Angle.from_degrees(rho)
  v = ascending_node +
    nutation_in_longitude +
    Angle.from_degrees(sigma / INCLINATION.sin)

  x = i_rho.sin * v.sin
  y = i_rho.sin * v.cos * obliquity.cos - i_rho.cos * obliquity.sin
  omega = Math.atan2(x, y)

  Angle.from_radians(
    Math.asin(
      Math.sqrt(x * x + y * y) *
        Math.cos(right_ascension.radians - omega) /
        Angle.from_degrees(libration_in_latitude).cos
    )
  )
end