KPG1_GTPOS

Gets a spatial position from the environment

Description:

This routine obtains a spatial position from the environment, using a specified parameter. The user supplies the position in the co-ordinate system of the Current Frame in the supplied WCS FrameSet. To be acceptable, the supplied position must correspond to a valid position (on all axes) in the Base Frame of the supplied FrameSet. If a Frame is supplied instead of a FrameSet this restriction is not imposed.

If the position supplied in argument CC on entry is valid (i.e. does not contain any AST__BAD values) then it is used as a dynamic default for the parameter. Otherwise, no dynamic default is used.

The parameter is accessed as a single literal string containing a space or comma separated list of axis values. The allowed formats for the axis values depends on the class of the Current Frame in the supplied FrameSet, and are described in SUN/210.

If the string supplied for the parameter consists of a single colon, then a description of the Current co-ordinate Frame is displayed, together with an indication of the format required for each axis value, and a new parameter value is then obtained.

Invocation

CALL KPG1_GTPOS( PARAM, IWCS, NULL, CC, BC, STATUS )

Arguments

PARAM = CHARACTER ( ) (Given)
The name of the parameter to use.
IWCS = INTEGER (Given)
A pointer to an AST Frame or FrameSet.
NULL = LOGICAL (Given)
If TRUE, a null (!) parameter value will result in the dynamic default value being used. If FALSE (or if there is no dynamic default), a null parameter value will result in a PAR__NULL error status.
CC( ) = DOUBLE PRECISION (Given and Returned)
On entry, holds the position to use as the dynamic default for the parameter, in the Current Frame of the supplied FrameSet (or Frame). On exit, holds the supplied position in the Current Frame. There should be one element for each axis in the Current Frame.
BC( ) = DOUBLE PRECISION (Returned)
Returned holding the Base Frame position corresponding to the supplied Current Frame position. If a Frame is supplied for IWCS instead of a FrameSet, then BC will not be accessed. The returned values will be good on all axes.
STATUS = INTEGER (Given and Returned)
The global status.

Notes: