;+ ; NAME: ; rd2ang ; PURPOSE: (one line) ; pairs of ra,dec coordinates to great-circle angle ; DESCRIPTION: ; ; CATEGORY: ; Astronomy ; CALLING SEQUENCE: ; ang = rd2ang(A, D, ra, dec) ; INPUTS: ; A - ra of point 1 (radians) ; D - dec of point 1 (radians) ; ra - ra of point 2 (radians) ; dec -dec of point 2 (radians) ; OPTIONAL INPUT PARAMETERS: ; none ; KEYWORD INPUT PARAMETERS: ; none ; KEYWORD OUTPUT PARAMETERS: ; none ; OUTPUTS: ; ang - angle between two points (radians) ; COMMON BLOCKS: ; SIDE EFFECTS: ; RESTRICTIONS: ; PROCEDURE: ; MODIFICATION HISTORY: ; Written 2006 Mar 5, by Leslie Young, SwRI ;- function rd2ang, A, D, ra, dec return, acos( cos(A-ra)*cos(D)*cos(dec) + sin(D)*sin(dec) < 1.d > (-1.d)) end