;+ ; NAME: ; RemoteView_FovTilt ; PURPOSE: ; Calculates the angle between the projections of ; the solar north and ecliptic north in the fov ; CATEGORY: ; sat/idl/remoteview ; CALLING SEQUENCE: FUNCTION RemoteView_FovTilt, TT, Dir, degrees=degrees ; INPUTS: ; TT array[1] or array[K] ; Dir array[2] or array[2,K] ; Viewing direction in heliographic spherical ; coordinates ; OPTIONAL INPUT PARAMETERS: ; /degrees if set all angles are in degrees (default is radians) ; OUTPUTS: ; R array[2,K] ; INCLUDE: @compile_opt.pro ; On error, return to caller ; CALLS: ; ToRadians, CvSky ; PROCEDURE: ; MODIFICATION HISTORY: ; MAR-2000, Paul Hick (UCSD/CASS) ; SEP-2008, Paul Hick (UCSD/CASS; pphick@ucsd.edu) ; Total rewrite. The old version was only valid for ; the special case where the viewing direction was ; straight back to the Sun ;- rpm = ToRadians(degrees=Degrees) nt = n_elements(TT) IF nt EQ 1 THEN tilt = 0.0 ELSE tilt = fltarr(nt) FOR i=0,nt-1 DO BEGIN ; Set up solar and ecliptic north in heliographic ; coordinates. Poles = [0.0d0,0.0d0,1.0d0] Poles = [[Poles] , $ [CvSky(TT[i], from_ecliptic=Poles, /to_heliographic, /silent, /rectangular)]] ; Rotate to native camera coordinates with ; x,y axes in fov. Poles = cvt3d( $ rotate = [0.0,0.0,!pi+Dir[0,i]*rpm, 0.0,-(!pi/2.0-Dir[1,i]*rpm),0.0], $ /xyexch , $ vector = [Poles]) ; Poles[0:1,*] are the projections of both poles ; on the fov. The angle between these two projection ; is the tilt angle required to rotate the fov such ; that the x-axis is parallel to the ecliptic instead ; of the solar equator. tilt[i] = atan( Poles[0,0]*Poles[1,1]-Poles[1,0]*Poles[0,1] , $ Poles[0,0]*Poles[0,1]+Poles[1,0]*Poles[1,1] ) ENDFOR RETURN, tilt/rpm & END