program orbtrans c c This program "translates" WDS and speckle catalog format files c to the format used in the orbit and plotting programs. It c also determines weights for the orbit program. c character*4 d1,d2,t1,t2,r1,r2 character*1 per1,per2,rcol,tcol,code2 character*2 type character*12 code,code1,code3 character*80 title character*20 wdin,spin,outfile character*20 star1,star2,star3,star4,star5,date,theta,rho c write(6,901) 901 format(/' Enter input WDS file name (or xxx): ',$) read(5,902) wdin 902 format(a20) write(6,903) 903 format(' Enter input speckle file name (or xxx): ',$) read(5,902) spin write(6,904) 904 format(' Enter output file name: ',$) read(5,902) outfile if (wdin .ne. 'xxx') open(10,file=wdin,status='UNKNOWN') if (spin .ne. 'xxx') open(11,file=spin,status='UNKNOWN') open(12,file=outfile,status='UNKNOWN') c c if speckle file exists, read and write title; c otherwise read and write wds title c if (spin .eq. 'xxx') go to 200 read(11,905) star1,star2,star3,star4,star5 905 format(1x,a15,6x,a15,6x,a12,1x,a12,2x,a10) write(12,906) star1,star2,star3,star4,star5 906 format(1x,2a15,2a12,a10) go to 300 c 200 read(10,907) title 907 format(a80) write(12,907) title c c if wds file exists, read wds data, determine weight, c and write in orbit file format c 300 if (wdin .eq. 'xxx') go to 500 if (spin .ne. 'xxx') read(10,907) title c 400 read(10,908,end=500) d1,d2,t1,t2,r1,r2,code,xnt,naper 908 format(22x,2a4,1x,a3,a2,2x,a2,a4,9x,a12,t54,f1.0,5x,i2) if (t1 .eq. ' ' .and. t2 .eq. ' ') go to 400 if (r1 .eq. ' ' .and. r2 .eq. ' ') go to 400 weight=1.0*sqrt(xnt) if(naper .lt. 18) weight=0.5*weight type='VL' if(naper .lt. 18) type='VS' per1='.' per2='.' if(t1 .eq. ' ' .and. t2 .eq. ' ') per1=' ' if(r1 .eq. ' ' .and. r2 .eq. ' ') per2=' ' if(per1 .eq. ' ' .or. per2 .eq. ' ') weight=0.0 write(12,909) d1,d2,t1,per1,t2,r1,per2,r2,type,weight,code 909 format(6x,a4,'.',a4,4x,a3,a1,a2,8x,a2,a1,a4,9x,a2,f6.1,5x,a12) go to 400 c c if speckle file exists, read speckle data, determine c weight, and write in orbit file format c 500 if (spin .eq. 'xxx') go to 999 c 600 read(11,910,end=999) date,tcol,theta,rcol,rho,tel, $ code1,code2,code3 910 format(2x,a9,2x,a1,a6,10x,a1,a9,42x,f4.1,2x,a6,1x,a1,a3) if (rcol .eq. '<' .or. tcol .eq. 'V') go to 600 if (theta .eq. ' ' .or. rho .eq. ' ') go to 600 weight=5.0 if (code2 .eq. 'A' .and. tel .gt. 3.0) weight=20.0 if (code2 .eq. 'A' .and. tel .lt. 3.0) weight=10.0 if (code2 .eq. 'C' .and. tel .gt. 3.0) weight=20.0 if (code2 .eq. 'C' .and. tel .lt. 3.0) weight=10.0 if (code2 .eq. 'O' .and. tel .gt. 3.0) weight=20.0 if (code2 .eq. 'O' .and. tel .lt. 3.0) weight=10.0 if (tcol .eq. ':' .or. rcol .eq. ':') weight=weight*0.5 write(12,911) date,theta,rho,code2,code3,weight,code1 911 format(6x,a9,4x,a6,9x,a9,6x,a1,a3,f4.1,6x,a6) go to 600 c 999 stop end