thresholdEstimate: Simple Threshold Geolocation Estimates

View source: R/SGAT.R

thresholdEstimateR Documentation

Simple Threshold Geolocation Estimates

Description

Estimate location from consecutive twilights

Usage

thresholdEstimate(trise, tset, zenith = 96, tol = 0)

thresholdLocation(twilight, rise, zenith = 96, tol = 0.08)

thresholdPath(
  twilight,
  rise,
  time = twilight,
  zenith = 96,
  tol = 0.08,
  unfold = TRUE
)

Arguments

trise

vector of sunrise times.

tset

vector of sunset times.

zenith

the solar zenith angle that defines twilight.

tol

tolerance on the sine of the solar declination.

twilight

the observed times of twilight as POSIXct.

rise

logical vector indicating which twilights are sunrise.

time

times for which locations are required.

unfold

if TRUE, unfold longitudes across the dateline.

Details

These functions estimate the location of a stationary observer given the times at which the observer sees two successive twilights. thresholdEstimate estimates locations given pairs of times of sunrise and sunset. thresholdLocation is a wrapper for thresholdEstimate that estimates locations given a sequence twilight times and rise indicators, while thresholdPath interpolates the estimates generated by thresholdLocation to give locations at a sequence of arbitrary times.

Longitude is estimated by computing apparent time of local noon from sunrise and sunset, and determining the longitude for which this is noon. Latitude is estimated from the required zenith and the sun's hour angle for both sunrise and sunset, and averaged.

When the solar declination is near zero (at the equinoxes) latitude estimates are extremely sensitive to errors. Where the sine of the solar declination is less than tol, the latitude estimates are returned as NA.

The thresholdPath function interpolates the estimates generated by thresholdLocation to produce estimates at the arbitrary set of times specified the by the time argument. If time is NULL, thresholdPath returns the estimates generated by thresholdLocation. If unfold=TRUE, thresholdPath attempts to construct a continuous path that does not wrap longitudes into (-180,180]. However, this process can fail if the observer crosses the dateline near an equinox, and it may be necessary to make manual adjustments.

These functions provides the same basic functionality of the coord function from GeoLight, but are based on different astronomical approximations.

Value

thresholdEstimate returns estimated locations as a two column (lon,lat) matrix. thresholdLocation and thresholdPath return a list with components

time

the time as POSIXct.

x

a two column matrix of (lon,lat) locations.

See Also

zenith


SWotherspoon/SGAT documentation built on June 1, 2022, 10:49 p.m.