#!/bin/csh
# From position in 1875 in decimal degrees given as argument to the program,
# compute the Constellation Name.
# This version uses fcat which executes the "cat" or "gzip -c" or "zcat"
#  depending on the status of the file (compressed or not)
# 
#	Francois Ochsenbein (francois@astro.u-strasbg.fr) CDS, May 2000
#####################################################################
cd `dirname $0`		# To stay in the catalog's directory
echo $* | sed 's/\([+-]\) */ \1/' | gawk '{ a=$1; d=$2+0.; a /= 15.; \
   p = "fcat data.dat" ; c = "???"; while((p|getline) > 0) { \
     if (a>=($1+0.) && a<($2+0.) && d>=($3+0.)) {c = $4; break } } \
   close(p); printf("%8.4f%+8.4f %s\n", a*15.0, d, c) }'
