HAVSIN

Given a specific x value, the Havsin function evaluates the y value of a Haversine function that smoothly transitions from ( x 0 , y 0 ) to ( x 1 , y 1 ) .

Format

Havsin ( x , x 0 , y 0 , x 1 , y 1 )

Arguments

x
The independent variable. For example, to specify time as the independent variable, specify x as TIME.
x 0
The x value at which the Haversine function begins.
y 0
The value of the Haversine function desired at x 0 .
x 1
The x value at which the Haversine function ends.
y 1
The value of the Haversine function desired at x 1 .

Definition

(1)
havsin  = { y 0 ,   if  x < x 0 y ¯ + Δ y 2 sin ( x ˜ π π 2 ) ,     if x 0 x x 1 y 1 ,    if  x > x 1 where, y ¯ = ( y 0 + y 1 ) 2 Δ y = ( y 1 y 0 ) x ˜ = ( x x 0 ) ( x 1 x 0 )

Example

<Post_Request
     comment             = "WM-WDTM-HAVSIN-FORSIN-DIM-ACOS"
     id                  = "3"
     type                = "EXPRESSION"
     expr1               = "NULL"
     expr2               = "WM(30102010)"
     expr3               = "WDTM(30102010)"
     expr4               = "HAVSIN(TIME,1.,0.,4.,1.)"
     expr5               = "NULL"
     expr6               = "FORSIN(TIME,0.1,6.28,0.1,0.2)"
     expr7               = "DIM(TIME,1.0)"
     expr8               = "ACOS(COS(TIME))"
/>