sun.info: Estimate the time of sunrise and sunset according to...

View source: R/sun.info.R

sun.infoR Documentation

Estimate the time of sunrise and sunset according to longitude, latitude and date

Description

Estimate the sun fates according to latitude and date.
Can be compared with the function sunrise.set() of package StreamMetabolism.

Usage

sun.info(date, latitude, longitude)

Arguments

date

A vector with the time at which sun fates are needed

latitude

The latitude at which estimate the sun fates

longitude

The longitude at which estimate the sun fates

Details

sun.info estimate the time of sunrise and sunset according to longitude, latitude and date

Value

A data.frame with information about daily sun

Author(s)

Marc Girondot marc.girondot@gmail.com

References

Teets, D.A. 2003. Predicting sunrise and sunset times. The College Mathematics Journal 34(4):317-321.

See Also

Other Periodic patterns of indices: index.periodic(), minmax.periodic(), moon.info(), tide.info()

Examples

## Not run: 
# Generate a timeserie of time
date <- seq(from=as.Date("2000-01-01"), to=as.Date("2000-12-31"), by="1 day")
plot(date, sun.info(date, latitude=23, longitude=0)$day.length, bty="n", 
 las=1, type="l", xlab="Ordinal days", ylab="Day length in hours")
plot(date, sun.info(date, latitude=23, longitude=0)$sunrise, bty="n", 
 las=1, type="l", xlab="Ordinal days", ylab="Sun rise in hours")

## End(Not run)

HelpersMG documentation built on Oct. 5, 2023, 5:08 p.m.