R: Destination on Sphere or Ellipsoid

destination {swfscMisc} | R 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 http://adsabs.harvard.edu/full/2000JRASC..94...48B.
Vincenty code adapted from JavaScript by Chris Veness http://www.movable-type.co.uk/scripts/latlong-vincenty-direct.html Vincenty, T. 1975. Direct and inverse solutions of geodesics on the ellipsoid with application of nested equations. Survey Review 22(176):88-93 http://www.ngs.noaa.gov/PUBS_LIB/inverse.pdf.

### 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")

[Package swfscMisc version 1.2 Index]