Last updated: 20080222
Even before PCSAT2 [1] was deployed, radio amateurs were invited to help with reception of PCSAT2 Telemetry along with solar cell data[2]. I attempted this initially back in August 2005.
I forgot about it for a while until late September when, Andrew Rich, VK4TEC, posted a script to the amsat-bb list. And a follow on script he put on his website [3] (click on "Code Samples" then Control D700). Showing basic doppler corrections for his Kenwood TM-D700. That started me thinking and below is the result of that thinking.
Firstly, I already had a Linux server running 24/7 so I could use that for receiving and decoding data, secondly I had a radio sitting idle while I was in work or asleep every day. So why not set the equipment up to work autonomously while I was not at the controls.
My own radio is a Yaesu[4] FT-847 which is computer controllable via its CAT port. I had used Hamlib[5] from a previous project, to control an Icom PCR 1000[3]. Sure enough, it supported the FT-847, so I downloaded hamlib, compiled, and installed it. And, as I only wanted to control the VFO[6] it should do the job.
Andrew's Script used Predict[8] to supply the doppler correction factor required, so I downloaded, compiled and installed Predict.
As I wished to run the tracking software as a 'service' I chose to run it on an unused tty. After some trial and error I managed to get it working by modifying the /etc/event.d/tty6 file to read
##/etc/event.d/tty6
# tty6 - getty
#
# This service maintains a getty on tty6 from the point the system is
# started until it is shut down again.
start on runlevel-2
start on runlevel-3
stop on runlevel-4
stop on runlevel-5
stop on shutdown
respawn /usr/local/bin/run_predict
And the run_predict script contains
##run_predict
/bin/su - predict -s /bin/bash -c "/usr/bin/predict -s < /dev/tty6 > /dev/tty6
I created a specific Predict user rather than allowing the program to run as root. Allowing programs to un-necessarily run as root is frowned upon and generally considered bad practice.
Now that we have a Predict server running, it needs to be kept up to date. Inside in the 'clients' subdirectory is a directory with a name of kep_reload. The 'README' file therein says:
"kep_reload" is a simple utility that forces an immediate reload
of PREDICT's Keplerian database through a socket connection while
PREDICT is running in server mode. It is especially useful in
environments where PREDICT runs continuously, and periodic Keplerian
element updates are made outside of PREDICT, such as through scripts
run through a crontab.
The "kepupdate" script found in this directory is an example of a
Keplerian element update script that can be run on an automated
basis through a crontab. It is designed to be placed in your
home directory under a subdirectory called "cronjobs". It downloads
Keplerian orbital data from www.celestrak.com using the HTTP protocol.
(The "wget" utility, available from the Free Software Foundation, is
required, and is included in many Linux distrubutions.)
Type crontab -e to edit your crontab. Simply add the following entry:
0 8 * * * kepupdate
and your orbital database will update each morning at 8:00 AM
(provided you have a network connection at that time).
Perfect for what we need. So following the instructions I now had a satellite tracking engine that was automatically kept up-to-date.