if [ $# == 4 ] then RA=$1 DEC=$2 NAME=$3 DATE=`date +%d.%m.%Y` SOMMERZEIT=$4 # 1 or 0 #calc Julian day a=`echo "(14 - \`date +%m\`)/12" | bc` y=`echo "\`date +%Y\` + 4800 - $a" | bc` m=`echo "\`date +%m\` + 12*$a - 3" | bc` JDN=`echo "\`date +%d\` + (153*$m+2)/5 + 365*$y + $y/4 - $y/100 + $y/400 - 32045" | bc` JDN00GMT=`echo $JDN+0.5 | bc -l` #tomorrow #### all this goes to skychart.gpl ########## cat > skychart.gpl <= 21600){ labelxpos=labelxpos-86400 } while (labelxpos <= -21600){ labelxpos=labelxpos+86400 } minimum=0 if (labelxpos >= 21600){ labelxpos=labelxpos-43200 minimum=1 } if (DEC_deg < 48.) { labelypos=DEC_deg+90-LAT_d+2 }else{ labelypos=-DEC_deg+90+LAT_d+2 } if (minimum == 1){ labelypos=labelypos-90. } if (DEC_deg < 48.) { set label center "$NAME" at labelxpos,labelypos font ",10" }else{ set label center "$NAME" at labelxpos,labelypos font ",10" } plot alt(x) lc 3 notitle set output exit EOL gnuplot ./skychart.gpl mv skychart.pdf $SCRIPTS/ acroread $SCRIPTS/skychart.pdf & else echo "usage: skychart.sh [RA(h)] [DEC(deg)] [OBJECTNAME] [DAYLIGHT_SAVING (1/0)]" echo " e.g.: skychart.sh 15.28 7.02 A2052 1" fi