Computes the haversin of an expression.
HAVERSIN(val)
val |
- |
A scalar, series or array. |
A scalar, series or array.
W1: haversin(0..pi/100..2*pi)
Generates the haversin from 0 to 2π radians.
t = 0..0.01..1;
haversin(2*pi*3*t);
Create a 101 point series of a 3 Hz haversin sampled at 100 samples per second.
The haversin function is defined as:
The function was historically used in navigation to calculate great-circle distances between two points on a sphere (like Earth) given their longitudes and latitudes.
See GHAVERSIN to generate a haversin with a specified length and delta x.
[1] |
C. C. Robusto |
|
The Cosine-Haversine Formula |
|
The American Mathematical Monthly, 64(1), 1957 |
|
pp 38-40 |