AST_DISTANCE

Calculate the distance between two points in a Frame

Description:

This function finds the distance between two points whose Frame coordinates are given. The distance calculated is that along the geodesic curve that joins the two points.

For example, in a basic Frame, the distance calculated will be the Cartesian distance along the straight line joining the two points. For a more specialised Frame describing a sky coordinate system, however, it would be the distance along the great circle passing through two sky positions.

Invocation

RESULT = AST_DISTANCE( THIS, POINT1, POINT2, STATUS )

Arguments

THIS = INTEGER (Given)
Pointer to the Frame.
POINT1( ) = DOUBLE PRECISION (Given)
An array with one element for each Frame axis (Naxes attribute) containing the coordinates of the first point.
POINT2( ) = DOUBLE PRECISION (Given)
An array with one element for each Frame axis containing the coordinates of the second point.
STATUS = INTEGER (Given and Returned)
The global status.

Returned Value

AST_DISTANCE = DOUBLE PRECISION
The distance between the two points.

Notes: