Class: Zmanim::Util::NOAACalculator
- Inherits:
-
Object
- Object
- Zmanim::Util::NOAACalculator
- Includes:
- AstronomicalCalculations
- Defined in:
- lib/zmanim/util/noaa_calculator.rb
Constant Summary collapse
- JULIAN_DAY_JAN_1_2000 =
2451545.0- JULIAN_DAYS_PER_CENTURY =
36525.0
Constants included from AstronomicalCalculations
AstronomicalCalculations::GEOMETRIC_ZENITH
Instance Attribute Summary
Attributes included from AstronomicalCalculations
#earth_radius, #refraction, #solar_radius
Instance Method Summary collapse
- #name ⇒ Object
- #utc_sunrise(date, geo_location, zenith, adjust_for_elevation: false) ⇒ Object
- #utc_sunset(date, geo_location, zenith, adjust_for_elevation: false) ⇒ Object
Methods included from AstronomicalCalculations
#adjusted_zenith, #elevation_adjustment
Instance Method Details
#name ⇒ Object
12 13 14 |
# File 'lib/zmanim/util/noaa_calculator.rb', line 12 def name 'US National Oceanic and Atmospheric Administration Algorithm' end |
#utc_sunrise(date, geo_location, zenith, adjust_for_elevation: false) ⇒ Object
16 17 18 19 20 |
# File 'lib/zmanim/util/noaa_calculator.rb', line 16 def utc_sunrise(date, geo_location, zenith, adjust_for_elevation: false) utc_sun_position(date, geo_location, zenith, adjust_for_elevation, :sunrise) rescue Math::DomainError nil end |
#utc_sunset(date, geo_location, zenith, adjust_for_elevation: false) ⇒ Object
22 23 24 25 26 |
# File 'lib/zmanim/util/noaa_calculator.rb', line 22 def utc_sunset(date, geo_location, zenith, adjust_for_elevation: false) utc_sun_position(date, geo_location, zenith, adjust_for_elevation, :sunset) rescue Math::DomainError nil end |