Next: AST_ANNUL - Annul a pointer to an Object
Up: AST Routine Descriptions
Previous: AST_ADDFRAME - Add a Frame to a FrameSet to define a new coordinate system
AST_ANGLE
-
Calculate the angle subtended by two points at a third point
- Description:
This routine
finds the angle at point B between the line joining points A and B,
and the line joining points C and B. These lines will in fact be
geodesic curves appropriate to the Frame in use. For instance, in
SkyFrame, they will be great circles.
- Invocation:
RESULT = AST_ANGLE( THIS, A, B, C, STATUS )
- Arguments:
-
THIS = INTEGER (Given)
-
Pointer to the Frame.
-
A( * ) = DOUBLE PRECISION (Given)
-
An array with one element for each Frame axis
(Naxes attribute) containing the coordinates of the first point.
-
B( * ) = DOUBLE PRECISION (Given)
-
An array with one element for each Frame axis
(Naxes attribute) containing the coordinates of the second point.
-
C( * ) = DOUBLE PRECISION (Given)
-
An array with one element for each Frame axis
(Naxes attribute) containing the coordinates of the third point.
-
STATUS = INTEGER (Given and Returned)
-
The global status.
- Returned Value:
-
AST_ANGLE = DOUBLE PRECISION
-
The angle in radians, from the line AB to the line CB. If the
Frame is 2-dimensional, it will be in the range $
pm
pi$,
and positive rotation is in the same sense as rotation from
the positive direction of axis 2 to the positive direction of
axis 1. If the Frame has more than 2 axes, a positive value will
always be returned in the range zero to $
pi$.
- Notes:
-
A value of AST__BAD will also be returned if points A and B are
co-incident, or if points B and C are co-incident.
-
A value of AST__BAD will also be returned if this function is
invoked with STATUS set to an error value, or if it should fail for
any reason.
Next: AST_ANNUL - Annul a pointer to an Object
Up: AST Routine Descriptions
Previous: AST_ADDFRAME - Add a Frame to a FrameSet to define a new coordinate system
AST A Library for Handling World Coordinate Systems in Astronomy
Starlink User Note 210
R.F. Warren-Smith & D.S. Berry
30th April 2003
E-mail:ussc@star.rl.ac.uk
Copyright (C) 2003 Central Laboratory of the Research Councils