Returns the distance and bearing between two points.
Syntax
intl pipDistance ( intl x1, intl y1, intl x2, intl
y2, intl coordSys, intl *bearing );
Arguments
x1
The x coordinate of the base point, in millionths of degrees if lat/lon. Input.
y1
The y coordinate of the base point, in millionths of degrees if lat/lon. Input.
x2
The x coordinate of the other point, in millionths of degrees if lat/lon. Input.
y2
The y coordinate of the other point, in millionths of degrees if lat/lon. Input.
coordSys
Indicates whether latitude/longitude or user coordinates will be used. Input.
*bearing
A pointer to the bearing, in whole degrees, of the other point from the base point. Output.
Return Value
The distance between the points. Distance is returned in feet if latitude/longitude is used, else in user-defined units.
Notes
This function returns the distance and bearing to point (x2, y2) from a base point (x1, y1). It does not require that the Spatial+ library be initialized.
The coordSys parameter is used to indicate which type of coordinates the points and responses will be given in. There are two possible settings:
PIP_COORDS_USER | Coordinates are user defined, and Euclidean distances are returned in user units. |
PIP_COORDS_LL | Coordinates are in millionths of degrees, and distances are returned in feet. |