Class: When::Ephemeris::Hindu
- Inherits:
-
Formula
- Object
- BasicTypes::Object
- Formula
- When::Ephemeris::Hindu
- Defined in:
- lib/when_exe/region/indian.rb
Overview
Hindu Luni-Solar Calendar Formula
Defined Under Namespace
Classes: ClassicGraha, ConcentricGraha, Graha, InferiorPlanet, ModernGraha, Moon, Planet, RealGraha, Sun, SuperiorPlanet, VirtualGraha
Constant Summary collapse
- Tz =
Basic Astronomical Constants for Surya-Siddhanta
0.5+75.8/360
- E =
time difference between JulianDayNumber and Ujjain
588_466 - Tz
- P =
Yuga Epoch -3101-02-18T00:00:00
180
- Ep =
Precession cycles in yuga
1_903_318 - Tz
- Ob =
Precession Epoch 499-01-01
24.0 / 360.0
- Grahas =
Obliquity of the ecliptic
{ 'SS' => { # Previous / Newest :Star => 1_582_237_800.0, # 1_582_237_500 / 1_582_237_800 :Sun => 4_320_000.0, :Moon => 57_753_336.0, :Mercury => 17_937_000.0, :Venus => 7_022_388.0, :Mars => 2_296_824.0, :Jupiter => 364_220.0, :Saturn => 146_564.0, :Candrocca => 488_219.0, # 488_203 / 488_219 :Rahu => -232_226.0 }, 'SB' => { :Star => 1_582_237_828.0, :Sun => 4_320_000.0, :Moon => 57_753_336.0, :Mercury => 17_937_060.0, :Venus => 7_022_376.0, :Mars => 2_296_832.0, :Jupiter => 364_220.0, :Saturn => 146_568.0, :Candrocca => 488_203.0, # 488_199 / 488_203 :Rahu => -232_238.0 } }
Constants inherited from Formula
Formula::Bs, Formula::CYCLE_0M, Formula::CYCLE_1M, Formula::Sgn
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::MethodCash
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
-
#civil_days ⇒ Numeric
readonly
ユガの太陽日数.
Attributes inherited from Formula
#alt, #formula, #graha, #is_dynamical, #lat, #location, #long, #time_standard
Attributes inherited from BasicTypes::Object
Attributes included from Parts::Resource
#_pool, #child, #keys, #locale, #namespace
Instance Method Summary collapse
-
#sun_noon(sdn) ⇒ Integer, When::TM::DateAndTime
太陽の南中の日時.
-
#sunrise(sdn, height = nil) ⇒ Integer, When::TM::DateAndTime
日の出の日時.
-
#sunset(sdn, height = nil) ⇒ Integer, When::TM::DateAndTime
日の入りの日時.
Methods inherited from Formula
#_coords, #_to_seed_type, #cn_to_time_, #day_event, #lunar_eclipse, #meridian_passage_of_moon, #meridian_passage_of_sun, #moon_noon, #moon_visibility, #moonrise, #moonset, #nearest_past, #phase_range, #solar_eclipse, #time_to_cn, #year_event
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::MethodCash
_setup_, _setup_info, escape, #method_missing, #method_missing_
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::MethodCash
Instance Attribute Details
#civil_days ⇒ Numeric (readonly)
ユガの太陽日数
478 479 480 |
# File 'lib/when_exe/region/indian.rb', line 478 def civil_days @civil_days end |
Instance Method Details
#sun_noon(sdn) ⇒ Integer, When::TM::DateAndTime
太陽の南中の日時
515 516 517 |
# File 'lib/when_exe/region/indian.rb', line 515 def sun_noon(sdn) _to_seed_type(sdn.to_i - @long / 360.0, sdn) end |
#sunrise(sdn, height = nil) ⇒ Integer, When::TM::DateAndTime
日の出の日時
488 489 490 491 492 |
# File 'lib/when_exe/region/indian.rb', line 488 def sunrise(sdn, height=nil) t = sdn.to_i - @long / 360.0 - 0.25 p = _mean_sun(t) + P * (t - Ep) / @civil_days _to_seed_type(t - asin(tand(@lat)*tan(asin(sinc(p)*sinc(Ob)))) / CIRCLE, sdn) end |
#sunset(sdn, height = nil) ⇒ Integer, When::TM::DateAndTime
日の入りの日時
502 503 504 505 506 |
# File 'lib/when_exe/region/indian.rb', line 502 def sunset(sdn, height=nil) t = sdn.to_i - @long / 360.0 + 0.25 p = _mean_sun(t) + P * (t - Ep) / @civil_days _to_seed_type(t + asin(tand(@lat)*tan(asin(sinc(p)*sinc(Ob)))) / CIRCLE, sdn) end |