#!/bin/csh -f
#+
#
# azel x y
#
# moves the telescope x arcsec in azimuth, y in elevation.
#
#-
#
# 20051122 - MB: added -noask flag to wfao
#

# Boiler plate for "-h" support for command autohelp.

if ("$1" == "-h") then
    help $0 | more
    exit $status
endif

# Boilerplate for syncheck.
# Note that the boiler plate should be transparent for all usages,
# but to make correct use of syncheck you will need to specify the
# correct pattern.

 set noglob
 set CheckStatus = `syncheck -command $0 $* -pattern float float` 
 unset noglob

if ("$CheckStatus" != "OK") then
    help $0 | more
    exit 2
endif

# End of help/syncheck boiler plate.

if (${#argv} == 2) then
  wfao -noask
  modify -s dcs silent azoff=$1 eloff=$2 rel2curr=t
  sleep 3
  waitfor -s dcs axestat=tracking
else
  echo "Usage: azel x y"
endif
