;+ ; NAME: ; rastrf ; PURPOSE: (one line) ; turn ra (radian) into hh:mm:ss[.SSS] as a function ; DESCRIPTION: ; ; CATEGORY: ; Astronomy ; CALLING SEQUENCE: ; str = rastrf(ra, places, carry) ; INPUTS: ; ra - right ascention (radians) ; OPTIONAL INPUT PARAMETERS: ; places - Resolution of output string (integer). ; = -8 Decimal hours HH.hhhhh ; = -7 nearest hour. HH ; = -6 nearest 30 minutes. HH:(00,30) ; = -5 nearest 15 minutes. HH:(00,15,30,45) ; = -4 nearest 10 minutes. HH:M0 ; = -3 nearest 5 minutes. HH:M(0,5) ; = -2 nearest minute. HH:MM ; = -1 nearest ten seconds. HH:MM:S0 ; = 0 nearest second. HH:MM:SS ; = 1 nearest tenth of a second. HH:MM:SS.s ; = 2 nearest hundredth of a second. HH:MM:SS.ss ; = 3 nearest thousandth of a second. HH:MM:SS.sss ; = 4 nearest thousandth of a second. HH:MM:SS.ssss DEFAULT ; KEYWORD INPUT PARAMETERS: ; none ; KEYWORD OUTPUT PARAMETERS: ; none ; OUTPUTS: ; str - Output string for the converted right ascension. ; carry - Flag that indicates ra rolled over after rounding. ; COMMON BLOCKS: ; SIDE EFFECTS: ; RESTRICTIONS: ; PROCEDURE: ; Call the PROCEDURE rastr ; MODIFICATION HISTORY: ; Written 2006 Feb 27, by Leslie Young, SwRI ;- function rastrf, ra, places, carry if n_params() eq 1 then places = 4 rastrlay, ra, places, str, carry return, str end