#!/bin/bash

# -r cone-radius in arcseconds [5]
# -s show  [defualt: no show]
# -t string which acts output filed separation ["\t"]

DFS="\t"
SHOW=
RADIUS=5


while getopts r:t:s optval
do 
   case $optval in
	r) RADIUS=$OPTARG;;
	t) DFS=$OPTARG;;
	s) SHOW=1;;
   esac
done

if ! [ $RADIUS -eq $RADIUS ] 2>/dev/null
then
 echo "error: cone radius must be an integer"
 exit -1
fi 
SR=$(echo "scale=6;$RADIUS/3600" | bc)
echo $SR

shift $((OPTIND-1))

if [ $# -ne 2 ]
then
    echo "error: need RA, DEC; no more or less"
    exit -1
fi

RA=$1
DEC=$2
echo $RA, $DEC

