Skip to contents

Calculate solar time, the equation of time and solar declination

Usage

solar(tm)

Arguments

tm

a vector of POSIXct times.

Value

A list containing the following vectors.

solar_time

the solar time (degrees)

eqn_time

the equation of time (minutes of time)

sin_solar_dec

sine of the solar declination

cos_solar_dec

cosine of the solar declination

Details

The solar time, the equation of time and the sine and cosine of the solar declination are calculated for the times specified by tm using the same methods as https://gml.noaa.gov/grad/solcalc/.

See also

Examples

# Current solar time
solar(Sys.time())
#> $solar_time
#> [1] 197.2384
#> 
#> $eqn_time
#> [1] 1.88786
#> 
#> $sin_solar_dec
#> [1] 0.1051922
#> 
#> $cos_solar_dec
#> [1] 0.9944519
#>