| Title: | Night and Day Boundary Plot Function |
|---|---|
| Description: | Computes and plots the boundary between night and day. |
| Authors: | Max Hughes-Brandl |
| Maintainer: | Max Hughes-Brandl <[email protected]> |
| License: | GPL |
| Version: | 1.0.1.1 |
| Built: | 2026-06-02 10:00:49 UTC |
| Source: | https://github.com/cran/NightDay |
Computes and plots the boundary between night and day.
| Package: | NightDay |
| Type: | Package |
| Version: | 1.0 |
| Date: | 2011-01-27 |
| License: | GPL |
| LazyLoad: | yes |
Max Hughes-Brandl
Maintainer: [email protected]
Time <- Sys.time() timezone <- 1 plot(NightDay(Time, timezone), maps = 'world')Time <- Sys.time() timezone <- 1 plot(NightDay(Time, timezone), maps = 'world')
Calculates the declination of the sun, the greenwhich hour angle and the latitudes of the of the sun movements throughout one day.
NightDay(time, timezone)NightDay(time, timezone)
time |
needs to be of following format: %Y-%m-%d (%Y Year with century, %m Month as decimal number (01-12), %d Day of the month as decimal number (01-31)), %H:%M:%S (%H Hours as decimal number (00-23), %M Minute as decimal number (00-59), %S Second as decimal number (00-61) |
timezone |
has to be an integer, e.g. a number between -11 and +11 (0 for GMT, +1 for CMT, etc.) |
Time |
is an object of class 'POSIXlt' representing the input time. |
tz |
is an integer representing the input timezone |
Latitude |
is a vector fo doubles containing the Latitudes of the night and day boundary. |
Declination |
returns a double of the sun declination. |
GHA |
returns a double of the greenwhich hour angle. |
The function NightDay can be used in combination with your own maps and plot functions.
Max Hughes-Brandl
Time <- Sys.time() timezone <- 1 NightDay(Time, timezone)Time <- Sys.time() timezone <- 1 NightDay(Time, timezone)
Plots the boundary between night and day.
## S3 method for class 'NightDay' plot(x, maps = 'world', add = FALSE, ...)## S3 method for class 'NightDay' plot(x, maps = 'world', add = FALSE, ...)
x |
an object of class |
maps |
only 'world' implemented. |
add |
logical indicating whether the plot is added to an existing device. |
... |
additional arguments, currently not implemented. |
The function plot depends on library('maps').
Max Hughes-Brandl
Time <- Sys.time() timezone <- 1 plot(NightDay(Time, timezone))Time <- Sys.time() timezone <- 1 plot(NightDay(Time, timezone))