const for kilometers per degree on the earth, 111.19

kmPerDeg

Type: number

Convert degrees into kilometers along the earth surface

degtokm(deg: number): number
Parameters
deg (number) degrees to convert
Returns
number: kilometers

Convert kilometers into degrees along the earth surface

kmtodeg(km: number): number
Parameters
km (number) kilometers to convert
Returns
number: degrees

Returns a simple object (DistAzOutput) with:

    delta       => Great Circle Arc distance in degrees
    az          => Azimuth of pt. 1 wrt pt. 2 in degrees
    baz         => Azimuth of pt. 2 wrt pt. 1 in degrees

azimuth is if you stand at point 2 and measure angle between north and point 1. I.E. point 1 is the station and point 2 is the event.

distaz(lat1: number, lon1: number, lat2: number, lon2: number): DistAzOutput
Parameters
lat1 (number) Latitude of first point (station) (+N, -S) in degrees
lon1 (number) Longitude of first point(station) (+E, -W) in degrees
lat2 (number) Latitude of second point (event)
lon2 (number) Longitude of second point (event)
Returns
DistAzOutput: delta, az, baz in a DistAzOutput