class Suntime::Suntime

Defined in:

suntime.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(lat : Float64, lng : Float64, t : Time | Nil = nil) #

[View source]

Instance Method Detail

def calculate_time(what_time : Symbol) #

longitude and hour angle are in degrees equation of time is in minutes


[View source]
def decl #

and the solar declination angle (in radians).


[View source]
def degrees_to_radians(deg) #

[View source]
def eqtime #

From γ, we can estimate the equation of time (in minutes) and the solar declination angle (in radians).


[View source]
def fractional_year #

First, the fractional year (γ) is calculated, in radians


[View source]
def radians_to_degrees(rad) #

[View source]
def solar_noon #

[View source]
def solve_for_zenith_ha(sunrise_or_sunset : Symbol) #

For the special case of sunrise or sunset, the zenith is set to 90.833 (the approximate correction for atmospheric refraction at sunrise and sunset, and the size of the solar disk) and the hour angle becomes: returns HA in radians


[View source]
def sunrise #

[View source]
def sunset #

[View source]