seasonder_computeLonLatFromOriginDistBearing {SeaSondeR}R Documentation

Compute Geographic Coordinates from Origin, Distance, and Bearing

Description

This function calculates the geographic coordinates (latitude and longitude) for a given distance and bearing from a specified origin.

Usage

seasonder_computeLonLatFromOriginDistBearing(
  origin_lon,
  origin_lat,
  dist,
  bearing
)

Arguments

origin_lon

A numeric value representing the longitude of the origin point in decimal degrees.

origin_lat

A numeric value representing the latitude of the origin point in decimal degrees.

dist

A numeric value representing the distance from the origin in kilometers.

bearing

A numeric vector of bearings (in degrees) indicating the direction from the origin.

Details

The function uses the geodetic formulas provided by the geosphere package to compute the destination point based on:

The calculation employs the geosphere::destPoint function, which handles the spherical geometry of the Earth.

Value

A data frame with two columns:

See Also

destPoint

Examples

# Example with a point at 100 km to the north of the origin
result <- seasonder_computeLonLatFromOriginDistBearing(-123.3656, 48.4284, 100, 0)
print(result)

[Package SeaSondeR version 0.2.8 Index]