Description:
Format a REAL
value as hours/degrees:minutes:seconds and write it into a character string. This routine is for
writing angular measures into a character string in a format suitable for presentation to an
astronomer.
If the absolute value of the number to be written exceeds a predefined maximum a conversion is not
attempted, but the number is written as a real number in Fortran ’exponential’ format and a couple of
question marks are appended to its end. This prevents silly results when very large numbers are
input. The variable UNITS controls the maximum permitted value for the conversion to be carried
out.
The value is written into the part of the string beginning at position
IPOSN+1 and
IPOSN is returned updated to the position of the end of the encoded angle in STRING.
Invocation
CALL
CHR_RTOAN( RVALUE, UNITS, STRING, IPOSN )
Arguments
RVALUE = REAL (Given)
The value to be
encoded into the string. This value should represent an angular measure.
UNITS = CHARACTER
∗ (
∗ )
(Given)
This string controls the maximum value which will be formatted as hr/deg:min:sec: if
UNITS = ’HOURS’, the maximum permitted value is 24.0; if UNITS = ’DEGREES’, the maximum
permitted is 360.0. In all other cases the maximum is 1000.0.
STRING = CHARACTER
∗ (
∗ )
(Given and Returned)
The string into which RVALUE is written.
IPOSN = INTEGER (Given
and Returned)
Given as the last element in STRING before the beginning of the encoded
angle. Returned as the element in STRING corresponding to the end of the encoded angle.
Copyright © 2018 East Asian Observatory