solartime: Calculates the solar time

View source: R/solartools.R

solartimeR Documentation

Calculates the solar time

Description

solartime is used to calculate the solar time. I.e. the time that would be measured by a sundial.

Usage

solartime(localtime, long, julian, merid = round(long/15, 0) * 15, dst = 0)

Arguments

localtime

local time (decimal hour, 24 hour clock).

long

longitude of the location for which the solar time is required (decimal degrees, -ve west of Greenwich meridian).

julian

Julian day expressed as an integer as returned by julday().

merid

an optional numeric value representing the longitude (decimal degrees) of the local time zone meridian (0 for GMT).

dst

an optional numeric value representing the time difference from the timezone meridian (hours, e.g. +1 for BST if merid = 0).

Details

‘solartime’ accounts for two factors: firstly, east or west component of the analemma, namely the angular offset of the Sun from its mean position on the celestial sphere as viewed from Earth due the eccentricity of the Earth's orbit and the obliquity due to tilt of the Earth's rotational axis. These two factors have different wavelengths, amplitudes and phases, that vary over geological timescales. The equations used here are those derived by Milne. BY default, local are used, with the meridian set to round(long / 15, 0) * 15.

Value

the solar time. I.e. the times that would be measured by a sundial (hours).

Examples

jd <- julday (2010, 6, 21) # Julian day
solartime(12, -5, jd) # solartime at noon on 21 June 2010, 5ºW

ilyamaclean/microclima documentation built on Oct. 31, 2023, 11:41 p.m.