pro altitude ;This program makes a table of the DDB altitude vs time from each dataset in the log. ;Run this from the data log. cd,'',current=cdir & cd,cdir ;establishes cdir as current directory database='DB2' ; either DB or DB2 close,1 openw,1,"altitude_data-"+database+".out" printf,1,cdir+'\'+database printf,1,'File DDBTime(s) Alt(m)' cd, database dirs=file_search() s=size(dirs) ndir=s(1) for n=0,ndir-1 do begin print,dirs(n) cd,dirs(n) if strpos(dirs(n),'Ir') ne -1 then ir=1 else ir=0 files=file_search() if files(0) eq '' then goto,nextdir s=size(files) for i=0,s(1)-1 do begin if ir eq 1 then d_irread,files(i),h0,p0,g0 else d_read,files(i),h0,p0 printf,1,files(i),d_value(h0,88),d_value(h0,98) endfor nextdir: cd,'..' endfor close,1 cd,cdir print,'done' end