;+ ; NAME: ; RemoteView_BodySize ; PURPOSE: ; Determine angular size of body ; CATEGORY: ; sat/idl/remoteview ; CALLING SEQUENCE: FUNCTION RemoteView_BodySize, rView, rSphere, fake, rOuter, fov, degrees=degrees ; INPUTS: ; rView scalar; type: float ; distance of viewing location to body (AU) ; rSphere scalar; type: float ; actual radius of body (AU) ; fake scalar; type: float ; fake angular size to be used for displaying body ; as a fraction of the FOV size ; rOuter scalar; type: float ; outer radius of data sphere ; fov array[2]; type: double ; size of FOV in hor and vert direction ; OPTIONAL INPUT PARAMETERS: ; /degrees if set, all angles are in degrees (default: radians) ; OUTPUTS: ; Result angular size of body (but never less than fake size) ; expressed as fraction of the FOV size ; OPTIONAL OUTPUT PARAMETERS: ; INCLUDE: @compile_opt.pro ; On error, return to caller ; CALLS: ; ToRadians ; PROCEDURE: ; MODIFICATION HISTORY: ; JULY-2001, Paul Hick (UCSD/CASS; pphick@ucsd.edu) ;- rpm = ToRadians(degrees=degrees) IF rView LE rSphere THEN BEGIN message, /info, 'Viewing location inside globe' RETURN, 0.0 ENDIF fovsize = max(fov)*rpm ; FOV size in radians ; Angular size of body, ; but don't let it get smaller than the fake size fS = asin(rSphere/rView) > fake*fovsize ; fD is the angular size of the data sphere if rView > rOuter fD = asin(rOuter /(rView > rOuter)) IF fD LT fovsize AND fS LT fD/100.0 THEN RETURN, 0.0 RETURN, (fs/fovsize) > fake & END