vessel_sun_angle: Calculate sun angle for a vessel based on 'datetime', 'x',...

View source: R/vessel_sun_angle.R

vessel_sun_angleR Documentation

Calculate sun angle for a vessel based on datetime, x, and y

Description

This is essentially a convenient wrapper for suncalc::getSunlightPosition.

Usage

vessel_sun_angle(vessels, verbose = FALSE)

Arguments

vessels

A date.frame that has at least the following following columns:

  • datetime = Datetime in UTC, with format ⁠yyyy-mm-dd hh:mm:ss⁠.

  • x = Longitude, decimal degrees (Western degrees negative).

  • y = Latitude, decimal degrees (Southern degrees negative).

verbose

A Boolean; if TRUE, updates will be printed to the Console.

Value

A vector, the same length as the number of rows in vessels, with the local vertical angle of the sun at each row.

Examples

data(ais_2019)
vessel_sun_angle(ais_2019)


ericmkeen/shipstrike documentation built on May 21, 2023, 7:05 a.m.