Header menu logo bristlecone

Sunrise Module

The sunrise equation can be used to calculate the time of sunrise and sunset for any latitude, longitude, and date.

See: https://en.wikipedia.org/wiki/Sunrise_equation#Complete_calculation_on_Earth Adapted from the SolarCalc by NOAA. Source: https://dotnetfiddle.net/N3j5th

Types

Type Description

DayLength

DayLengthCache

A cache that may be used in model computation where day lengths
 are continually accessed for the same dates over and over again. Stashes
 each calculated day length per latitude/longitude and time.

Functions and values

Function or value Description

apparentLongitudeSun t1 t

Full Usage: apparentLongitudeSun t1 t

Parameters:
    t1 : float
    t : float

Returns: float
t1 : float
t : float
Returns: float

calculate year month day latitude longitude timeZoneId

Full Usage: calculate year month day latitude longitude timeZoneId

Parameters:
    year : int
    month : int
    day : int
    latitude : float
    longitude : float
    timeZoneId : string

Returns: DayLength
year : int
month : int
day : int
latitude : float
longitude : float
timeZoneId : string
Returns: DayLength

cosHourAngle declinationOfSun northLatitude

Full Usage: cosHourAngle declinationOfSun northLatitude

Parameters:
    declinationOfSun : float
    northLatitude : float

Returns: float
declinationOfSun : float
northLatitude : float
Returns: float

dayFraction dayLength

Full Usage: dayFraction dayLength

Parameters:
Returns: float
dayLength : DayLength
Returns: float

declinationOfSun oc al

Full Usage: declinationOfSun oc al

Parameters:
    oc : float
    al : float

Returns: float
oc : float
al : float
Returns: float

degrees radians

Full Usage: degrees radians

Parameters:
    radians : float

Returns: float
radians : float
Returns: float

eccentricityEarthOrbit t

Full Usage: eccentricityEarthOrbit t

Parameters:
    t : float

Returns: float
t : float
Returns: float

equationOfCentreSun ma t

Full Usage: equationOfCentreSun ma t

Parameters:
    ma : float
    t : float

Returns: float
ma : float
t : float
Returns: float

equationOfTime oc ml eo ma

Full Usage: equationOfTime oc ml eo ma

Parameters:
    oc : float
    ml : float
    eo : float
    ma : float

Returns: float
oc : float
ml : float
eo : float
ma : float
Returns: float

geomMeanAnomalySun t

Full Usage: geomMeanAnomalySun t

Parameters:
    t : float

Returns: float
t : float
Returns: float

geomMeanLongitudeSun t

Full Usage: geomMeanLongitudeSun t

Parameters:
    t : float

Returns: float
t : float
Returns: float

hourAngleSunrise lat d

Full Usage: hourAngleSunrise lat d

Parameters:
    lat : float
    d : float

Returns: float
lat : float
d : float
Returns: float

meanObliquityOfEcliptic t

Full Usage: meanObliquityOfEcliptic t

Parameters:
    t : float

Returns: float
t : float
Returns: float

obliquityCorrection oe t

Full Usage: obliquityCorrection oe t

Parameters:
    oe : float
    t : float

Returns: float
oe : float
t : float
Returns: float

radians degrees

Full Usage: radians degrees

Parameters:
    degrees : float

Returns: float
degrees : float
Returns: float

solarNoon lng eot tzoff

Full Usage: solarNoon lng eot tzoff

Parameters:
    lng : float
    eot : float
    tzoff : float

Returns: float
lng : float
eot : float
tzoff : float
Returns: float

sunrise sn ha

Full Usage: sunrise sn ha

Parameters:
    sn : float
    ha : float

Returns: float
sn : float
ha : float
Returns: float

sunset sn ha

Full Usage: sunset sn ha

Parameters:
    sn : float
    ha : float

Returns: float
sn : float
ha : float
Returns: float

trueLongitudeSun m1 eoc

Full Usage: trueLongitudeSun m1 eoc

Parameters:
    m1 : float
    eoc : float

Returns: float
m1 : float
eoc : float
Returns: float

Type something to start searching.