calculateMoonlightIntensity: Calculate moonlight intensity

View source: R/moonlightModel.R

calculateMoonlightIntensityR Documentation

Calculate moonlight intensity

Description

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

Usage

calculateMoonlightIntensity(lat, lon, date, e)

Arguments

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

Value

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)

Examples

## 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)



msmielak/moonlit documentation built on Feb. 26, 2025, 10:14 a.m.