Class: When::Ephemeris::Datum
- Inherits:
-
CelestialObject
- Object
- BasicTypes::Object
- CelestialObject
- When::Ephemeris::Datum
- Defined in:
- lib/when_exe/ephemeris.rb,
lib/when_exe/ephemeris/planets.rb
Overview
座標の基準になる天体
座標の基準になる天体の特性を定義する
Defined Under Namespace
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
Constants included from Namespace
Namespace::DC, Namespace::DCQ, Namespace::DCT, Namespace::FOAF, Namespace::OWL, Namespace::RDF, Namespace::RDFC, Namespace::RDFS, Namespace::RSS, Namespace::XSD
Instance Attribute Summary collapse
-
#air ⇒ Array<Numeric>
readonly
大気の補正.
-
#axis ⇒ Array<Numeric>
readonly
自転軸.
-
#dl ⇒ Array<Numeric>
readonly
黄経の補正の係数.
-
#first_day ⇒ Numeric
readonly
計算式の精度保証期間の下限 / ユリウス日.
-
#jsl ⇒ Array<Numeric>
readonly
黄経の係数2 (木星-土星).
-
#jsn ⇒ Array<Numeric>
readonly
黄経の係数1 (木星-土星).
-
#jsr ⇒ Array<Numeric>
readonly
動径の係数 (木星-土星).
-
#jst ⇒ Array<Numeric>
readonly
黄緯の係数 (木星-土星).
-
#last_day ⇒ Numeric
readonly
計算式の精度保証期間の上限 / ユリウス日.
-
#nn ⇒ Array<Numeric>
readonly
木星と土星の相互摂動項.
-
#phi ⇒ Array<Numeric>
readonly
黄経の係数.
-
#radius ⇒ Array<Numeric>
readonly
動径の係数.
-
#shape ⇒ Array<Numeric>
readonly
惑星の形.
-
#sid ⇒ Array<Numeric>
readonly
自転 - 平均太陽の赤経(2000年分点).
-
#surface_radius ⇒ Numeric
readonly
半径/km.
-
#theta ⇒ Array<Numeric>
readonly
黄緯の係数.
-
#zeros ⇒ Hash<String=>Numeric>
readonly
天体の出没、薄明の閾値.
Attributes inherited from CelestialObject
Attributes inherited from BasicTypes::Object
Attributes included from Parts::Resource
#_pool, #child, #keys, #locale, #namespace
Instance Method Summary collapse
-
#apparent_luminosity(t, base) ⇒ Numeric
視光度 / magnitude.
-
#apparent_radius(t, base = Earth) ⇒ Numeric
視半径 / CIRCLE.
-
#axis_of_rotation(t) ⇒ When::Ephemeris::Coords
自転軸の歳差補正.
-
#elongation(t, target = Sun, base = Earth) ⇒ Numeric
離角 / CIRCLE.
-
#equation_of_time(t) ⇒ Numeric
均時差 / DAY.
-
#mean_longitude(t) ⇒ Numeric
光行差を含んだ平均黄経 / CIRCLE.
-
#mean_motion ⇒ Numeric
平均運動 / (DEG / YEAR).
-
#phase_of_eclipse(t, target, base = Earth) ⇒ Numeric
食分.
-
#true_longitude(t) ⇒ Numeric
光行差を含んだ真黄経 / CIRCLE.
Methods inherited from CelestialObject
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 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, #parent, #registered?, root_dir
Methods included from Parts::Resource::Pool
#[], #[]=, #_pool, #_setup_, #pool_keys
Methods included from Parts::Resource::Synchronize
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class When::Parts::Resource
Instance Attribute Details
#air ⇒ Array<Numeric> (readonly)
大気の補正
997 998 999 |
# File 'lib/when_exe/ephemeris.rb', line 997 def air @air end |
#axis ⇒ Array<Numeric> (readonly)
自転軸
1001 1002 1003 |
# File 'lib/when_exe/ephemeris.rb', line 1001 def axis @axis end |
#dl ⇒ Array<Numeric> (readonly)
黄経の補正の係数
953 954 955 |
# File 'lib/when_exe/ephemeris.rb', line 953 def dl @dl end |
#first_day ⇒ Numeric (readonly)
計算式の精度保証期間の下限 / ユリウス日
941 942 943 |
# File 'lib/when_exe/ephemeris.rb', line 941 def first_day @first_day end |
#jsl ⇒ Array<Numeric> (readonly)
黄経の係数2 (木星-土星)
973 974 975 |
# File 'lib/when_exe/ephemeris.rb', line 973 def jsl @jsl end |
#jsn ⇒ Array<Numeric> (readonly)
黄経の係数1 (木星-土星)
969 970 971 |
# File 'lib/when_exe/ephemeris.rb', line 969 def jsn @jsn end |
#jsr ⇒ Array<Numeric> (readonly)
動径の係数 (木星-土星)
981 982 983 |
# File 'lib/when_exe/ephemeris.rb', line 981 def jsr @jsr end |
#jst ⇒ Array<Numeric> (readonly)
黄緯の係数 (木星-土星)
977 978 979 |
# File 'lib/when_exe/ephemeris.rb', line 977 def jst @jst end |
#last_day ⇒ Numeric (readonly)
計算式の精度保証期間の上限 / ユリウス日
945 946 947 |
# File 'lib/when_exe/ephemeris.rb', line 945 def last_day @last_day end |
#nn ⇒ Array<Numeric> (readonly)
木星と土星の相互摂動項
965 966 967 |
# File 'lib/when_exe/ephemeris.rb', line 965 def nn @nn end |
#phi ⇒ Array<Numeric> (readonly)
黄経の係数
949 950 951 |
# File 'lib/when_exe/ephemeris.rb', line 949 def phi @phi end |
#radius ⇒ Array<Numeric> (readonly)
動径の係数
961 962 963 |
# File 'lib/when_exe/ephemeris.rb', line 961 def radius @radius end |
#shape ⇒ Array<Numeric> (readonly)
惑星の形
985 986 987 |
# File 'lib/when_exe/ephemeris.rb', line 985 def shape @shape end |
#sid ⇒ Array<Numeric> (readonly)
自転 - 平均太陽の赤経(2000年分点)
989 990 991 |
# File 'lib/when_exe/ephemeris.rb', line 989 def sid @sid end |
#surface_radius ⇒ Numeric (readonly)
半径/km
937 938 939 |
# File 'lib/when_exe/ephemeris.rb', line 937 def surface_radius @surface_radius end |
Instance Method Details
#apparent_luminosity(t, base) ⇒ Numeric
視光度 / magnitude
1094 1095 1096 |
# File 'lib/when_exe/ephemeris.rb', line 1094 def apparent_luminosity(t, base) return @luminosity - 2.5*log10(base._coords(t).luminosity_spe(self._coords(t))) end |
#apparent_radius(t, base = Earth) ⇒ Numeric
視半径 / CIRCLE
1081 1082 1083 1084 |
# File 'lib/when_exe/ephemeris.rb', line 1081 def apparent_radius(t, base=Earth) target_coords = self.coords(t, base) asin(@surface_radius / (target_coords.radius * AU)) / CIRCLE end |
#axis_of_rotation(t) ⇒ When::Ephemeris::Coords
自転軸の歳差補正
1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 |
# File 'lib/when_exe/ephemeris.rb', line 1046 def axis_of_rotation(t) return nil unless @axis c1900 = (@axis[0]-1900.0)/100.0 dt = (+t-(EPOCH1900-0.68648354))/BCENT - c1900 Coords.polar( (@axis[1][0] + dt * @axis[2][0]) / 360, (@axis[1][1] + dt * @axis[2][1]) / 360, (@axis[1][2] + dt * @axis[2][2]) / 360 ).precession(dt, c1900) end |
#elongation(t, target = Sun, base = Earth) ⇒ Numeric
離角 / CIRCLE
1107 1108 1109 1110 1111 1112 1113 1114 |
# File 'lib/when_exe/ephemeris.rb', line 1107 def elongation(t, target=Sun, base=Earth) t = +t self_coords = self.coords(t, base) target_coords = target.coords(t, base) elongation = acos(self_coords.spherical_law_of_cosines(target_coords)) / CIRCLE difference = (self_coords.phi - target_coords.phi + 0.5) % 1 - 0.5 return (difference >= 0) ? elongation : -elongation end |
#equation_of_time(t) ⇒ Numeric
均時差 / DAY
1064 1065 1066 1067 1068 1069 1070 1071 |
# File 'lib/when_exe/ephemeris.rb', line 1064 def equation_of_time(t) t = +t c = julian_century_from_2000(t) coords = _coords(t) coords = coords.rotate_z(0.5 - (@aberration||0) / coords.radius / 360) coords = coords.y_to_r(t, self) return 0.5 - ((coords.phi - (@sid[0] + c * (@sid[1] + c * @sid[2])) / 24.0) % 1) end |
#mean_longitude(t) ⇒ Numeric
光行差を含んだ平均黄経 / CIRCLE
1020 1021 1022 1023 |
# File 'lib/when_exe/ephemeris.rb', line 1020 def mean_longitude(t) coord = _coords(t) coord.c - @aberration / coord.radius / 360 end |
#mean_motion ⇒ Numeric
平均運動 / (DEG / YEAR)
1008 1009 1010 |
# File 'lib/when_exe/ephemeris.rb', line 1008 def mean_motion return @phi[0][2] end |
#phase_of_eclipse(t, target, base = Earth) ⇒ Numeric
食分
1125 1126 1127 1128 1129 1130 1131 |
# File 'lib/when_exe/ephemeris.rb', line 1125 def phase_of_eclipse(t, target, base=Earth) t = +t distance = acos(self.coords(t, base).spherical_law_of_cosines(target.coords(t, base))) / CIRCLE self_radius = self.apparent_radius(t, base) target_radius = target.apparent_radius(t, base) return (self_radius + target_radius - distance) / (2.0 * target_radius) end |
#true_longitude(t) ⇒ Numeric
光行差を含んだ真黄経 / CIRCLE
1033 1034 1035 1036 |
# File 'lib/when_exe/ephemeris.rb', line 1033 def true_longitude(t) coord = _coords(t) coord.phi - @aberration / coord.radius / 360 end |