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, Javanese, JulianDay, Mayan, Tibetan, Yis

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

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

#child, #keys, #locale, #namespace

Instance Method Summary collapse

Methods inherited from HinduNote

#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

#[], #^, _instance, _setup_, _setup_info, base_uri, #each, #enum_for, #hierarchy, #include?, #included?, #iri, #leaf?, #m17n, #map, #parent, #registered?, root_dir

Methods included from Parts::Resource::Pool

#[], #[]=, #_setup_

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{ 惑星シンボル=>惑星の真黄経 }>)

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



1283
1284
1285
1286
1287
1288
1289
1290
1291
# File 'lib/when_exe/region/indian.rb', line 1283

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