#!/usr/bin/bash

    target=$1
    LONGITUDE=-76.03
	while true
	do
		lmst=`lmst.py $LONGITUDE`
		truth=`python -c "t=True if abs($target-$lmst) <  0.02 else False; print t"`
		if [ $truth = True ]
		then
			echo Starting receiver at $lmst
			break
		fi
		echo Waiting for pulsar $NAME to rise at: $target, current LMST is $lmst
		sleep 15
	done
