Class: When::TimeStandard::LocalApparentTime
- Inherits:
-
TimeStandard
- Object
- BasicTypes::Object
- TimeStandard
- When::TimeStandard::LocalApparentTime
- Defined in:
- lib/when_exe/timestandard.rb
Overview
地方真太陽時
Direct Known Subclasses
Constant Summary
Constants inherited from TimeStandard
Constants included from When::TimeStandard
Constants included from Parts::Resource
Parts::Resource::LabelProperty, Parts::Resource::Prefix, Parts::Resource::PrefixIndex, Parts::Resource::PrefixKeys, Parts::Resource::PrefixValues
Instance Attribute Summary
Attributes inherited from BasicTypes::Object
Attributes included from Parts::Resource
#_pool, #child, #keys, #locale, #namespace
Instance Method Summary collapse
-
#from_dynamical_time(time) ⇒ Numeric
dynamical time を local apparent time に変換する.
-
#to_dynamical_time(time) ⇒ Numeric
local apparent time を dynamical time に変換する.
Methods inherited from TimeStandard
#from_dynamical_date, #from_time_object, #has_leap?, #rate_of_clock, #to_dynamical_date, #to_time_object
Methods included from When::TimeStandard
_is_systemtime_universal?, _leap_seconds, _setup_, delta_t, delta_t_coordinated, delta_t_observed, from_dynamical_time, from_time_object, to_dynamical_time, to_time_object
Methods inherited from BasicTypes::Object
Methods included from Parts::Resource
#[], #^, _extract_prefix, _instance, _parse, _path_with_prefix, #each, #enum_for, #hierarchy, #include?, #included?, #iri, #leaf?, #m17n, #map, #next, #parent, #prev, #registered?
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 Method Details
#from_dynamical_time(time) ⇒ Numeric
dynamical time を local apparent time に変換する
454 455 456 |
# File 'lib/when_exe/timestandard.rb', line 454 def from_dynamical_time(time) super(time) + When::TM::Duration::DAY * @datum.equation_of_time(When::TM::JulianDate._t_to_d(time)) end |
#to_dynamical_time(time) ⇒ Numeric
local apparent time を dynamical time に変換する
439 440 441 442 443 444 445 446 |
# File 'lib/when_exe/timestandard.rb', line 439 def to_dynamical_time(time) date = When::TM::JulianDate._t_to_d(time) - @location.long / (360.0 * When::Coordinates::Spatial::DEGREE) diff = 0 2.times do diff = @datum.equation_of_time(date-diff) end super(When::TM::JulianDate._d_to_t(date-diff)) end |