#!/bin/csh -f
#+
# azel -- move the telescope x arcsec in azimuth and y arcsec in elevation
#
# Purpose:
#	Move the telescope the given number of arcseconds in the
#	azimuth and elevation directions.
#
# Usage:
#	azel x y
# 
# Arguments:
#	x = distance to move in azimuth [arcsec]
#	y = distance to move in elevation [arcsec]
# 
# Output:
# 
# Restrictions:
#	- "x" and "y" must be real values
# 
# Exit values:
#	 0 = normal completion
#	 1 = wrong number of arguments
#
# Example:
#	1) Move the telescope 10 arcseconds in the positive azimuth
#	direction and 20 arcsec in the negative elevation direction:
#		az 10 -20
#-
# Modification history:
#	Date unknown	RWG	Original version
#	2000-Jul-05	GDW	Added documentation
#	2013-Oct-05	GDW	Add wftel
#-----------------------------------------------------------------------

# check args...
if (${#argv} != 2) then
  echo "Usage: az x y"
  exit 1
endif

# Grab the current value of autpause...
set autresum = `wftel -p`

# make a move...
modify -s dcs silent azoff=$1 eloff=$2 rel2curr=t

# wait for guider update...
wftel -v $autresum
exit
