Class: When::CalendarNote::HinduNoteDetailed

Inherits:
HinduNote show all
Defined in:
lib/when_exe/region/indian.rb

Overview

日の出の九惑星の位置まで計算

Constant Summary collapse

Notes =
HinduNote::Notes

Constants inherited from HinduNote

When::CalendarNote::HinduNote::NoteConsts

Constants inherited from When::CalendarNote

Bahai, CalendarDepend, Chinese, CommonWithRokuyo, CommonWithSovietFiveDay, CommonWithSovietSixDay, Default, HashProperty, Javanese, JulianDay, Mayan, Tibetan, Yis

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 When::CalendarNote

#event

Attributes inherited from TM::ReferenceSystem

#domain_of_validity, #position

Attributes inherited from BasicTypes::Object

#label

Attributes included from Parts::Resource

#_pool, #child, #keys, #locale, #namespace

Instance Method Summary collapse

Methods inherited from HinduNote

#_to_date_for_note, #jovian, #karana, #naksatra, #pancanga, #samvatsara, #tithi, #yoga

Methods inherited from When::CalendarNote

#copy, #day, #duration, #enum_for, #include?, #month, #note?, #notes, #year

Methods inherited from TM::ReferenceSystem

#domain, #name

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

#synchronize

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class When::Parts::Resource

Instance Method Details

#vara(dates) ⇒ Array<When::TM::TemporalPosition, Hash{ 惑星シンボル=>惑星の真黄経 }>

ヴァーラ (七曜)と九惑星の位置

Parameters:

Returns:

  • (Array<When::TM::TemporalPosition, Hash{ 惑星シンボル=>惑星の真黄経 }>)

    日の出の時刻をイベント時刻とし、その時刻での九惑星の位置を計算



1214
1215
1216
1217
1218
1219
1220
1221
1222
# File 'lib/when_exe/region/indian.rb', line 1214

def vara(dates)
  rise        =  dates.rises[0]
  rise.events = [dates.root['vara'][(rise.to_i+1) % 7]]
  t           = dates.formula.is_dynamical ? +rise : rise.to_f
  [['V:-', rise], dates.formula.graha.keys.inject({}) {|h,p|
    h.store(p, dates.formula.graha[p].true_longitude(t))
    h
  }]
end