Calculate hour angle using the NASA solar insolation method.
Source:R/calc_solar_insolation.R
calc_hour_angle.RdThis is an approximation when hour is in clock time; should actually be given in solar time
Usage
calc_hour_angle(hour, format = c("degrees", "radians"))Value
Numeric value or vector, in the units specified by format,
indicating the angle corresponding to each value supplied in hour.
Examples
hourdf <- data.frame(hour=c(0:12,12.5:23.5),
hragl=streamMetabolizer:::calc_hour_angle(c(0:12,12.5:23.5)))
library(ggplot2)
ggplot(hourdf, aes(x=hour, y=hragl)) +
geom_hline(yintercept=0, color="gold") + geom_line()