Class: When::Ephemeris::Moon
- Inherits:
-
Datum
- Object
- BasicTypes::Object
- CelestialObject
- Datum
- When::Ephemeris::Moon
- Extended by:
- When::Ephemeris
- Defined in:
- lib/when_exe/ephemeris/moon.rb
Overview
The Moon
Constant Summary
Constants included from When::Ephemeris
AU, AcS, BCENT, C0, CIRCLE, COS, COSL, COSLT, COST, DAY, DEG, EPOCH1800, EPOCH1900, EPOCH1975, EPOCH2000, FARAWAY, JCENT, JYEAR, Jupiter, LIN, Mars, Mercury, Neptune, P0B, P0L, P0P, P0dB, P0dL, P1B, P1L, P1R, P2B, P2L, P2Q, P2dL, P3L, P3Q, P4B, P4L, P4Q, P4dL, P5B, P5L, P5Q, P5dL, P5l, P5n, P5r, P5t, P6B, P6L, P6Q, P6dL, P6l, P6n, P6r, P6t, P7B, P7L, P7R, P8B, P8L, P8R, P9B, P9L, P9R, PSEC, Pluto, SIN, SINL, SINLT, SINT, Saturn, Uranus, Venus
Constants included from Parts::Resource
Parts::Resource::ConstList, Parts::Resource::ConstTypes, Parts::Resource::IRIDecode, Parts::Resource::IRIDecodeTable, Parts::Resource::IRIEncode, Parts::Resource::IRIEncodeTable, Parts::Resource::IRIHeader, Parts::Resource::LabelProperty
Instance Attribute Summary
Attributes inherited from Datum
#air, #axis, #dl, #first_day, #jsl, #jsn, #jsr, #jst, #last_day, #nn, #phi, #radius, #shape, #sid, #surface_radius, #theta, #zeros
Attributes inherited from CelestialObject
Attributes inherited from BasicTypes::Object
Attributes included from Parts::Resource
#_pool, #child, #keys, #locale, #namespace
Class Method Summary collapse
-
.latitude(t) ⇒ Numeric
月の真黄緯/ CIRCLE.
-
.mean_longitude(t) ⇒ Numeric
月の平均黄経 / CIRCLE.
-
.pi(t) ⇒ Numeric
月の距離 / km.
-
.true_longitude(t) ⇒ Numeric
月の真黄経 / CIRCLE.
Instance Method Summary collapse
-
#_coords(t) ⇒ When::Ephemeris::Coords
月の位置 (黄道座標).
-
#initialize(*args) ⇒ Moon
constructor
オブジェクトの生成.
-
#mean_longitude(t) ⇒ Numeric
平均黄経 / CIRCLE.
-
#mean_motion ⇒ Numeric
平均運動 / (DEG/YEAR).
-
#true_longitude(t) ⇒ Numeric
真黄経 / CIRCLE.
Methods included from When::Ephemeris
_adjust, _rot, _to_p2, _to_p3, _to_r3, acos, asin, cosc, cosd, delta_e, delta_p, julian_century_from_2000, julian_year_from_1975, obl, polynomial, root, sinc, sind, tanc, tand, trigonometric
Methods inherited from Datum
#apparent_luminosity, #apparent_radius, #axis_of_rotation, #elongation, #equation_of_time, #phase_of_eclipse
Methods inherited from CelestialObject
Methods included from Parts::Resource
#[], #^, _abbreviation_to_iri, _decode, _encode, _extract_prefix, _instance, _instantiate, _parse, _path_with_prefix, _replace_tags, _setup_, _setup_info, _simplify_path, base_uri, #each, #enum_for, #hierarchy, #include?, #included?, #iri, #leaf?, #m17n, #map, #next, #parent, #prev, #registered?, root_dir
Methods included from Parts::Resource::Pool
#[], #[]=, #_pool, #_setup_, #pool_keys
Methods included from Parts::Resource::Synchronize
Constructor Details
#initialize(*args) ⇒ Moon
オブジェクトの生成
285 286 287 288 289 290 291 292 293 294 |
# File 'lib/when_exe/ephemeris/moon.rb', line 285 def initialize(*args) = [args.pop] if args[-1].kind_of?(Hash) surface_radius, aberration, luminosity, *rest = args surface_radius ||= 1738.1 aberration ||= 0.00020 luminosity ||= 0.40 args = [surface_radius, aberration, luminosity] + rest args += if super(*args) end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class When::Parts::Resource
Class Method Details
.latitude(t) ⇒ Numeric
月の真黄緯/ CIRCLE
208 209 210 211 |
# File 'lib/when_exe/ephemeris/moon.rb', line 208 def latitude(t) y = julian_year_from_1975(+t) return trigonometric(y, P0B, trigonometric(y, P0dB)) / 360.0 end |
.mean_longitude(t) ⇒ Numeric
月の平均黄経 / CIRCLE
231 232 233 |
# File 'lib/when_exe/ephemeris/moon.rb', line 231 def mean_longitude(t) return trigonometric(julian_year_from_1975(+t), P0L, 0.0, 1) / 360.0 + 38770.0 end |
Instance Method Details
#_coords(t) ⇒ When::Ephemeris::Coords
月の位置 (黄道座標)
243 244 245 246 247 248 249 250 |
# File 'lib/when_exe/ephemeris/moon.rb', line 243 def _coords(t) t = +t Coords.polar(Moon.true_longitude(t), Moon.latitude(t), Moon.pi(t)/AU, Moon.mean_longitude(t)) + When.Resource('_ep:Earth')._coords(t) end |
#mean_longitude(t) ⇒ Numeric
平均黄経 / CIRCLE
270 271 272 |
# File 'lib/when_exe/ephemeris/moon.rb', line 270 def mean_longitude(t) Moon.mean_longitude(t) end |
#mean_motion ⇒ Numeric
平均運動 / (DEG/YEAR)
278 279 280 |
# File 'lib/when_exe/ephemeris/moon.rb', line 278 def mean_motion P0L[0][2] end |
#true_longitude(t) ⇒ Numeric
真黄経 / CIRCLE
259 260 261 |
# File 'lib/when_exe/ephemeris/moon.rb', line 259 def true_longitude(t) Moon.true_longitude(t) end |