c file BOX.FOR c prog to determine the locations of the end points for the box c required by IONMOD_DUD & IONMOD_IRI c c written by leo mcnamara 14-jul-87 c----- last modified 16-jul-87 c c LINK with SPOINTS c c start point is SS% from the "TX", away from the "RX" c end point is EE% from the "RX", downrange c ss = 10./100. ee = 40./100. c 10 continue write(6,600) 600 format(//' Enter coords of TX and RX for ', a 'circuit.....4f5.0') read(5,500) txlat,txlon,rxlat,rxlon 500 format(4f5.0) if(txlat+tlxon+rxlat+rxlon.eq.0.0) stop ' all done' c flat = txlat flon = txlon glat = rxlat glon = rxlon c c find bearing and range of circuit call distbear (flat,flon,glat,glon,range,bear) type*,' Range & bearing ',range,bear c c coords of point before the TX bearr = bear + 180. if(bearr.gt.360.) bearr = bearr - 360. call latlon (flat,flon,ss*range,bearr,flat1,flon1) call distbear(flat,flon,flat1,flon1,r,b) type*,' TX end ',r,b c c coords of point downrange from RX call latlon (flat,flon,(1.+ee)*range,bear,flat2,flon2) call distbear (glat,glon,flat2,flon2,r,b) type*,' Rx end ',r,b c call distbear (flat1,flon1,flat2,flon2,range,bearr) type*,' END to END ',range,bearr c write(6,602) flat1,flon1,flat2,flon2 602 format(///5x,'END COORDS ',4f8.2///) go to 10 end