c-----Program to produce a utm for a given lat, lon pair common /consts/ PI, FOURTHPI, deg2rad, rad2deg common /ellipses/ ellipsnum(24), ellipsname(24), ell_eqrad(24), ell_eccsq(24) integer ellipsnum character*20 ellipsname real*8 ell_eqrad real*8 ell_eccsq real*8 PI real*8 FOURTHPI real*8 deg2rad real*8 rad2deg real*8 Lat real*8 Long real*8 UTMNorthing real*8 UTMEasting real*8 SwissNorthing real*8 SwissEasting integer RefEllipsoid character UTMZone integer ZoneNumber call constants c 24 is WGS-84. RefEllipsoid = 24 c Lat = 47.37816667 c Long = 8.23250000 write(*,'(a,$)') ' Enter a UTM (N,E) pair: ' read(*,*) UTMNorthing, UTMEasting write(*,*) "Starting position(UTMNorthing, UTMEasting): " , UTMNorthing , " " , UTMEasting UTMZone = "T" ZoneNumber = 18 write(*,*) ' Enter Zone Number (e.g. 18 for New England): ' read(*,*) ZoneNumber write(*,*) ' Enter UTM Zone (e.g. T for New England): ' read(*,'(a)') UTMZone call utmtoll(RefEllipsoid, UTMNorthing, UTMEasting, UTMZone, Lat, Long, ZoneNumber) write(*,*) "Calculated Lat, Long position(Lat, Long): ",Lat," ",Long call lltoutm(RefEllipsoid, Lat, Long, UTMNorthing, UTMEasting, UTMZone, ZoneNumber) write(*,*) "Calculated UTM position(Northing, Easting, Zone): " write(*,*) UTMNorthing, UTMEasting, ZoneNumber, UTMZone stop end