      program distaz
c
c  Program to return distance, azimuth, and back azimuth
c     between to geographic coordinates
c
c  For seismologic cases, the first point is the station
c
c  T.J.Owens, September 19, 1991
c
      character*20 argv
      integer iargs, iargc
      ounit=6
      iargs=iargc()
      if(iargs.eq.0) then
        write(ounit,*) 'Usage: distaz sta_lat sta_lon evt_lat evt_lon'
	write(ounit,*) '       Returns:  Delta Baz Az'
        stop
      endif
      idum=getarg(1,argv)
      read(argv,100) stnp
      idum=getarg(2,argv)
      read(argv,100) stnl
      idum=getarg(3,argv)
      read(argv,100) epilc
      idum=getarg(4,argv)
      read(argv,100) epipc
  100 format(f10.5)
      call azdist(stnp, stnl, epilc, epipc, delta, az, baz)
      write(ounit,101) delta, baz, az
  101 format(3(f7.3,1x))
      stop
      end
