View source: R/moonlightModel.R
calculateMoonlightIntensity | R Documentation |
This function predicts moonlight intensity on the ground for any given place and time, based on the location, position of the moon and number of correction factors
calculateMoonlightIntensity(lat, lon, date, e)
lat |
Latitude, numerical decimal |
lon |
Longitude, numerical decimal |
date |
Date time as POSIXct with the local time zone. If needed use as.POSIXct(date, tz=timezone) |
e |
Extinction coefficient - a single numerical value depending on the altitude. Average extinction coefficients (magnitude per air mass) are as follows: At sea level: 0.28; at 500m asl: 0.24; at 1000m asl: 0.21; at 2000m asl: 0.16 |
A data frame with the following columns:
night |
Logical, TRUE when sun is below the horizon |
sunAltDegrees |
Solar altitude in degrees |
moonlightModel |
Predicted moonlight illumination, relative to an "average" full moon |
twilightModel |
Predicted twilight illumination in lux |
illumination |
Combined moon and twilight intensity, in lux |
moonPhase |
Lunar phase as a numerical value (% of moon face illuminated) |
## Not run:
lat <- 52.2297
lon <- 21.0122
date <- as.POSIXct("2023-06-15 22:00:00", tz = "Europe/Warsaw")
result <- calculateMoonlightIntensity(lat, lon, date, 0.21)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.