Learn R Programming

RSEIS (version 2.1-6)

distaz: Distance-Azimuth from event source to receiver station

Description

Calculates the distance in km, degrees and the azimuth and back azimuth from station to source

Usage

distaz(olat, olon, tlat, tlon)

Arguments

olat
Source (origin) latitude
olon
Source (origin) longitude
tlat
Station (receiver) latitude
tlon
Station (receiver) longitude

Value

  • delDelta (degrees)
  • azazimuth, degrees
  • bazback-azimuth, degrees
  • distdistance, km
  • errerror flag, 0=failure, 1=success

See Also

GreatDist

Examples

Run this code
london = c(51.53333, -0.08333333)
     santiago = c(-33.46667, -70.75)

     distaz(london[2], london[1], santiago[2], santiago[1])

Run the code above in your browser using DataLab