pro oc_c1 ; v1 represents initial attempt to create a true DISR3 offset-creation procedure, one whose ; basic outlines can be used for the in-flight checkouts and the descent ; v2b want_ss, mt_to_ut_time_offset definition introduced ; want_sza ; v2b 10/20/4 adds projected DTAT altitude to offsets file header want_strip ='no' want_sza ='no' want_ss ='no' want_dd ='no' want_tt ='no' want_zero ='yes' want_ps ='no' want_display ='no' want_parallax ='no' want_init ='yes' want_offsets ='yes' want_dtat_alt ='yes' want_naif_sza ='yes' ; want_dtat_alt='yes' if this option set to 'yes' want_gamma ='yes' ; want_naif_sza='yes' if this option set to 'yes' olddir='c:\panoramas\store\xdr\Cape_1\oc' directory='c:\df3\10Sep97\Log\Titan.2004.09.14.br.000' scen_dir='c:\df3\10Sep97\Log\Titan.2004.09.14.br.000' strip_directory='c:\df3\10Sep97\Log\Titan.2004.09.14.br.000\DB2\Strip' image_directory='c:\df3\10Sep97\Log\Titan.2004.09.14.br.000\DB2\Image' ; dtat_alt_file starts out as 'c:\HuygensDTATv2.7\tool\data\041013\nom_aux1.out' ; naif_sza_file starts out as 'c:\naif\work\huyg_subs_lts.out' dtat_alt_file='c:\idl_programs\oc\nom_aux1.out' naif_sza_file='c:\idl_programs\oc\huyg_subs_lts.out' t0_file=olddir+'\time_offset_info.out' dump_file=olddir+'\index_dump.out' index_file=olddir+'\new_index_1.out' time_file=olddir+'\new_time_1.out' n_start_line=-1 ; specifies which START_SCENARIO line to look at in the idx file in case of multiple lines ; mt_to_utc_offset=82800. ; Telem A #1 @ 19:02:29, subtract 2:29, add 4 hours to convert to Greenwich and ; convert to seconds ; time_prefix='1997-253T' mt_to_utc_offset=32820. ; DDB T0 = 2004-014T09:07:00 predict time_prefix='2004-014T' init_altitude=0.0 offset_file=olddir+'\offsets_init' cd,directory,current=olddir tb=string(9B) ; 1. Images, Image Mission Times and SPICE Information image_input,t0_file,dump_file,scen_dir,n_start_line,image_directory,mt_to_utc_offset,index_file,$ time_file,n_sets,t0,temp,avg_arr,im_mtime,disr_app_az,img_file_no,img_file_name extract_time,im_mtime+t0,im_loc_hr,im_loc_min,im_loc_sec im_id=indgen(n_sets) if want_sza eq 'yes' then begin ; get the solar zenith and solar azimuth at the locations of the imager stations in the local coordinate system solar_zen_az,lat,long,gast_1_hr,gast_1_min,gast_1_sec,gast_2_hr,gast_2_min,gast_2_sec,$ solra_1,solra_2,soldec_1,soldec_2,im_loc_hr,im_loc_min,im_loc_sec,im_sol_zen,im_sol_az_cw sol_az_to_disr_az,im_sol_az_cw,im_sol_az s_im=size(im_mtime) endif if want_ss eq 'yes' then begin ; 2. Sun Sensor Data, Mission Times and Almanac Information get_sun_pulse,directory,olddir,t,level,ss_mtime,sun_sza extract_time,ss_mtime+t0,ss_loc_hr,ss_loc_min,ss_loc_sec solar_zen_az,lat,long,gast_1_hr,gast_1_min,gast_1_sec,gast_2_hr,gast_2_min,gast_2_sec,$ solra_1,solra_2,soldec_1,soldec_2,ss_loc_hr,ss_loc_min,ss_loc_sec,ss_sol_zen,ss_sol_az_cw sol_az_to_disr_az,ss_sol_az_cw,ss_sol_az s_ss=size(ss_mtime) endif ; 8. Populate the various arrays that contain the information that will be stored in the offsets.in file. alpha_list=fltarr(n_sets) beta_list=fltarr(n_sets) gamma_list=fltarr(n_sets) X_list=fltarr(n_sets) Y_list=fltarr(n_sets) Z_list=fltarr(n_sets) if want_zero eq 'yes' and want_sza eq 'yes' then begin alpha_list(*)=0.0 beta_list(*)=0.0 n_index=where(im_sol_az_cw lt 0.0,n_cnt) if n_cnt ne 0 then begin im_sol_az_cw(n_index)=im_sol_az_cw(n_index)+360.0 endif disr_az_to_mos_az,disr_app_az,im_sol_az_cw,im_mos_az gamma_list=im_mos_az endif if want_zero eq 'yes' and want_sza eq 'no' then begin im_sol_zen=fltarr(n_sets) im_sol_az_cw=fltarr(n_sets) alpha_list(*)=0.0 beta_list(*)=0.0 gamma_list(*)=0.0 im_sol_zen(*)=0.0 im_sol_az_cw(*)=0.0 endif mri_file_list=image_directory+'\'+img_file_name(0,im_id) sli_file_list=image_directory+'\'+img_file_name(1,im_id) hri_file_list=image_directory+'\'+img_file_name(2,im_id) time_stamp=time_prefix+fixit(im_loc_hr)+':'+fixit(im_loc_min)+':'+fixit(im_loc_sec) X_list(*)=0. Y_list(*)=0. Z_list(*)=0. offset_header,time_stamp,im_sol_zen,im_sol_az_cw,init_altitude,time_list ; DTAT altitude and sub-probe position if want_dtat_alt eq 'yes' then begin dtat_alt,dtat_alt_file,time_stamp,im_sol_zen,im_sol_az_cw,im_mtime,init_altitude,time_list endif ; NAIF subsolar zenith and azimuth angle if want_naif_sza eq 'yes' then begin naif_sza,naif_sza_file,time_list,im_sol_zen,im_sol_az_cw endif if want_gamma eq 'yes' then begin disr_az_to_mos_az,disr_app_az,im_sol_az_cw,im_mos_az gamma_list=im_mos_az endif if want_init eq 'yes' then begin low_lim_list=[0] up_lim_list =[n_sets-1] endif if want_offsets eq 'yes' then begin do_reorder,low_lim_list,up_lim_list,time_list,mri_file_list,sli_file_list,hri_file_list,$ alpha_list,beta_list,gamma_list,X_list,Y_list,Z_list endif if want_offsets eq 'yes' then begin ; 13. Create an offsets.in file using the offset information above offset_write,offset_file,time_list,mri_file_list,sli_file_list,hri_file_list,$ alpha_list,beta_list,gamma_list,X_list,Y_list,Z_list endif stop return end