IRA_CTOD1

Converts a single formatted sky co-ordinate value into a double-precision value

Description:

The input string is presumed to hold a sky co-ordinate value in character form. If NC is 1, the string is interpreted as a longitude value. If NC is 2, the string is interpreted as a latitude value. This routine reads the string and produces a double precision value holding the co-ordinate value in radians. The value is not shifted into the first order range (eg if an angular value equivalent to 3∗PI is given, the value 3∗PI will be returned, not 1∗PI). If the input string is blank the output value is set to the Starlink " BAD" value (VAL__BADD). Refer to IRA_CTOD for details of the allowed format for the input string.

Invocation

CALL IRA_CTOD1( TEXT, SCS, NC, VALUE, STATUS )

Arguments

TEXT = CHARACTER ∗ ( ∗ ) (Given)
The string containing the formatted version of the sky co-ordinate value. If this string is blank, VALUE is returned with the " BAD" value (VAL__BADD), but no error report is made.
SCS = CHARACTER ∗ ( ∗ ) (Given)
The sky co-ordinate system (see ID2 section " Sky Coordinates" ). Any unambiguous abbreviation will do.
NC = INTEGER (Given)
Determines which sky co-ordinate is to be used. If a value of 1 is supplied, the string is interpreted as a longitude value (e.g. RA if an equatorial system is being used). If a value of 2 is supplied, the string is interpreted as a latitude value. Any other value results in an error being reported.
VALUE = DOUBLE PRECISION (Returned)
The numerical value of the sky co-ordinate represented by the string in TEXT. The value is in radians.
STATUS = INTEGER (Given and Returned)
The global status.