program orbtrans4 c c This program "translates" the WDS-format input file c to the format used in the orbit and plotting programs. c Weights are set equal to 1.0 - they'll be determined c in second program. This one adds the decimal points, c etc. so the second program can read the data properly. c [ orbgrades.2* --> orbgrades.3* ] c character*4 d1,d2,t1,t2,r1,r2 character*3 dd1,type character*2 dd2 character*1 per1,per2,c62,c63,c64,r2a,r2b,r2c,r2d character*12 hcode character*90 title character*10 wds character*20 infile, outfile c open(10,file='dean.1',status='UNKNOWN') open(11,file='dean.2',status='UNKNOWN') c c read and write wds title and orbital elements lines c 200 read(10,907,end=999,err=999) title 907 format(a90) write(11,907) title write(11,991) 991 format('NO') c c read wds data, determine method, and write in orbit file format c 400 read(10,908,end=999,err=999) wds,d1,d2,t1,t2,r1,r2a,r2b,r2c, $ r2d,r2,hcode,xnt,dd1,dd2,naper,c62,c63,c64 908 format(a10,t23,2a4,1x,a3,a2,1x,a3,4a1,t41,a4,9x,a12,t54, $ f1.0,a3,a2,i2,3a1) if (xnt .eq. 0.) xnt=1. if (wds .eq. ' ') go to 500 if (d1 .eq. ' ' .and. d2 .eq. ' ') go to 400 if (t1 .eq. ' ' .and. t2 .eq. ' ') go to 400 if (r1 .eq. ' ' .and. r2 .eq. ' ') go to 400 c type='VIS' if ((c62 .eq. 'G') .or. (c62 .eq. 'H')) type='VPH' if (c62 .eq. 'O') type='VPH' c if (c62 .eq. 'E') type='XVI' c if ((c62 .eq. 'J') .or. (c62 .eq. 'K')) type='XSP' if ((c62 .eq. 'N') .or. (c62 .eq. 'P')) type='XSP' if ((c62 .eq. 'Q') .or. (c62 .eq. 'S')) type='XSP' if ((c62 .eq. 'U') .or. (c62 .eq. 'V')) type='XSP' if ((dd1 .eq. 'MKT') .or. (dd1 .eq. 'NOI')) type='XSP' if (c62 .eq. 'X') type='XSP' c if ((dd1 .eq. 'MCA') .or. (dd1 .eq. 'HRT')) type='CSP' if ((dd1 .eq. 'MSN') .or. (dd1 .eq. 'FEK')) type='CSP' if ((dd1 .eq. 'FU ') .or. (dd1 .eq. 'SHU')) type='CSP' if ((dd1 .eq. 'LU ') .or. (dd1 .eq. 'CHR')) type='CSP' if ((c62 .eq. 'S') .and. (dd1 .eq. 'FEK')) type='CSP' if ((c62 .eq. 'S') .and. (dd1 .eq. 'LU ')) type='CSP' c if (dd1 .eq. 'HIP') type='HIP' if (dd1 .eq. 'TYC') type='TYC' c weight=1.0 c 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 if (r2a .eq. ' ') r2a='0' if (r2b .eq. ' ') r2b='0' if (r2c .eq. ' ') r2c='0' if (r2d .eq. ' ') r2d='0' write(11,909) d1,d2,t1,per1,t2,r1,per2,r2a,r2b,r2c,r2d, $ type,weight,hcode 909 format(6x,a4,'.',a4,4x,a3,a1,a2,7x,a3,a1,4a1,9x,a3,f5.1, $ 5x,a12) go to 400 c 500 write(11,910) 910 format(80x,' ') go to 200 999 stop 'data formatting program finished' end