destination: Destination on Sphere or Ellipsoid

View source: R/destination.R

destinationR Documentation

Destination on Sphere or Ellipsoid

Description

Calculates latitude and longitude of the destination along a sphere or ellipsoid.

Usage

destination(
  lat,
  lon,
  brng,
  distance,
  units = c("nm", "km", "mi"),
  ellipsoid = datum(),
  radius = convert.distance(6371, "km", "nm"),
  type = c("ellipsoid", "sphere", "vincenty")
)

Arguments

lat, lon

numeric. The latitude and longitude of the coordinate in decimal degrees.

brng

numeric. The bearing, ranging from 0 to 360 degrees.

distance

numeric. The distance travelled, in units specified by units.

units

units of distance. Can be "km" (kilometers), "nm" (nautical miles), or "mi" (statute miles), or any partial match thereof (case sensitive).

ellipsoid

ellipsoid model parameters as returned from a call to datum.

radius

numeric. Define the radius for type = "sphere". In units of units.

type

Character defining type of surface. Can be "sphere", "ellipsoid", "vincenty", or partial match thereof (case-sensitive).

Value

latitude and longitude of destination.

Author(s)

Eric Archer eric.archer@noaa.gov

References

Ellipsoid code adapted from JavaScript by Larry Bogan.
Vincenty code adapted from JavaScript by Chris Veness.
Vincenty, T. 1975. Direct and inverse solutions of geodesics on the ellipsoid with application of nested equations. Survey Review 22(176):88-93.

Examples

destination(32.87, -117.25, 262, 4174, units = "km", type = "sphere")
destination(32.87, -117.25, 262, 4174, units = "km", type = "ellipsoid")
destination(32.87, -117.25, 262, 4174, units = "km", type = "vincenty")


swfscMisc documentation built on Sept. 8, 2023, 5:55 p.m.