Skip to content

Commit

Permalink
Improvement of parameter changeability for Jokyo and Horaku calendar
Browse files Browse the repository at this point in the history
  • Loading branch information
suchowan committed Oct 20, 2015
1 parent 0ab9725 commit 4ec1c1a
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 7 deletions.
2 changes: 1 addition & 1 deletion lib/when_exe/region/chinese.rb
Expand Up @@ -660,7 +660,7 @@ def _initialize_rissei
@anomalistic_month_shift = @anomalistic_month_shift.to_f # 転應(暦元前近/遠地点通過から暦元天正冬至までの日数)
@anomaly_method = @anomaly_method || 'a' # (経朔-定朔)の計算方法
@anomaly_precision = (@anomaly_precision || 1.0E-5).to_f # c 方式 での収束判定誤差 / 日
@solar_weight = @solar_weight || 0 # (経朔-定朔)の計算で用いる実行差での太陽盈縮の重み(0:非考慮,1:考慮)
@solar_weight = (@solar_weight || 0 ).to_i # (経朔-定朔)の計算で用いる実行差での太陽盈縮の重み(0:非考慮,1:考慮)
@lunar_unit = @lunar_unit.to_f # 太陰遅速計算用招差法定数の時間の単位(限)
@m = _rissei_j(@m) # 太陰遅速計算用招差法定数
@s = _rissei_j(@s) # 太陽盈縮計算用招差法定数
Expand Down
24 changes: 18 additions & 6 deletions lib/when_exe/region/japanese/twins.rb
Expand Up @@ -102,7 +102,9 @@ module CalendarTypes
'year_length' => 365.241696, # 暦元の冬至年 / 日
'anomalistic_year_shift' => 6.445, # 暦應(暦元での冬至から近日点通過までの日数)
'lunation_shift' => 2.779 - 0.015, # 閏應(暦元前経朔から暦元天正冬至までの日数)
'anomalistic_month_shift' => 22.72 - 0.015 # 転應(暦元前近/遠地点通過から暦元天正冬至までの日数)
'anomalistic_month_shift' => 22.72 - 0.015, # 転應(暦元前近/遠地点通過から暦元天正冬至までの日数)
'anomaly_method' => '#{Method:a}', # (経朔-定朔)の計算方法(a:差分, b:微分, c:幾何学的補正)
'solar_weight' => '#{Weight:1}', # (経朔-定朔)の計算で用いる実行差での太陽盈縮の重み(0:非考慮,1:考慮)
})]
}
}
Expand All @@ -118,7 +120,9 @@ module CalendarTypes
'year_length' => 365.241696, # 暦元の冬至年 / 日
'anomalistic_year_shift' => 6.445, # 暦應(暦元での冬至から近日点通過までの日数)
'lunation_shift' => 2.779, # 閏應(暦元前経朔から暦元天正冬至までの日数)
'anomalistic_month_shift' => 22.72 # 転應(暦元前近/遠地点通過から暦元天正冬至までの日数)
'anomalistic_month_shift' => 22.72, # 転應(暦元前近/遠地点通過から暦元天正冬至までの日数)
'anomaly_method' => '#{Method:a}', # (経朔-定朔)の計算方法(a:差分, b:微分, c:幾何学的補正)
'solar_weight' => '#{Weight:1}', # (経朔-定朔)の計算で用いる実行差での太陽盈縮の重み(0:非考慮,1:考慮)
})]
}
}
Expand All @@ -134,7 +138,9 @@ module CalendarTypes
'year_length' => 365.241696, # 暦元の冬至年 / 日
'anomalistic_year_shift' => 6.445, # 暦應(暦元での冬至から近日点通過までの日数)
'lunation_shift' => 2.779 + 0.2138, # 閏應(暦元前経朔から暦元天正冬至までの日数)
'anomalistic_month_shift' => 22.72 + 0.2138 # 転應(暦元前近/遠地点通過から暦元天正冬至までの日数)
'anomalistic_month_shift' => 22.72 + 0.2138, # 転應(暦元前近/遠地点通過から暦元天正冬至までの日数)
'anomaly_method' => '#{Method:a}', # (経朔-定朔)の計算方法(a:差分, b:微分, c:幾何学的補正)
'solar_weight' => '#{Weight:1}', # (経朔-定朔)の計算で用いる実行差での太陽盈縮の重み(0:非考慮,1:考慮)
})]
}
}
Expand All @@ -150,7 +156,9 @@ module CalendarTypes
'year_length' => 365.241696, # 暦元の冬至年 / 日
'anomalistic_year_shift' => 6.445, # 暦應(暦元での冬至から近日点通過までの日数)
'lunation_shift' => 2.779 - 0.0677, # 閏應(暦元前経朔から暦元天正冬至までの日数)
'anomalistic_month_shift' => 22.72 - 0.0677 # 転應(暦元前近/遠地点通過から暦元天正冬至までの日数)
'anomalistic_month_shift' => 22.72 - 0.0677, # 転應(暦元前近/遠地点通過から暦元天正冬至までの日数)
'anomaly_method' => '#{Method:a}', # (経朔-定朔)の計算方法(a:差分, b:微分, c:幾何学的補正)
'solar_weight' => '#{Weight:1}', # (経朔-定朔)の計算で用いる実行差での太陽盈縮の重み(0:非考慮,1:考慮)
})]
}
}
Expand All @@ -167,7 +175,9 @@ module CalendarTypes
'anomalistic_year_shift' => 6.455, # 暦應(暦元での冬至から近日点通過までの日数)
'lunation_shift' => 25.654, # 閏應(暦元前経朔から暦元天正冬至までの日数)
'anomalistic_month_shift' => 18.88, # 転應(暦元前近/遠地点通過から暦元天正冬至までの日数)
's' => ChineseSolar.change_unit(365.241556 / 365.241696, _japanese_common['s'])
's' => ChineseSolar.change_unit(365.241556 / 365.241696, _japanese_common['s']),
'anomaly_method' => '#{Method:a}', # (経朔-定朔)の計算方法(a:差分, b:微分, c:幾何学的補正)
'solar_weight' => '#{Weight:1}', # (経朔-定朔)の計算で用いる実行差での太陽盈縮の重み(0:非考慮,1:考慮)
})]
}
}
Expand All @@ -184,7 +194,9 @@ module CalendarTypes
'anomalistic_year_shift' => 7.42, # 暦應(暦元での冬至から近日点通過までの日数)
'lunation_shift' => 25.82, # 閏應(暦元前経朔から暦元天正冬至までの日数)
'anomalistic_month_shift' => 19.307, # 転應(暦元前近/遠地点通過から暦元天正冬至までの日数)
's' => ChineseSolar.change_unit(365.241626 / 365.241696, _japanese_common['s'])
's' => ChineseSolar.change_unit(365.241626 / 365.241696, _japanese_common['s']),
'anomaly_method' => '#{Method:a}', # (経朔-定朔)の計算方法(a:差分, b:微分, c:幾何学的補正)
'solar_weight' => '#{Weight:1}', # (経朔-定朔)の計算で用いる実行差での太陽盈縮の重み(0:非考慮,1:考慮)
})]
}
}
Expand Down

0 comments on commit 4ec1c1a

Please sign in to comment.