Getting Pointing Information from gpredict for use in an External Program

Ham Radio

Special thanks to KN4UU’s post on:

Thought it might be more helpful to go in a bit more detail (also so I won’t forget).

One day, when I get time (yea right) I want to make a custom satellite tracker. The thought is to use inexpensive Raspberry Pi and an Arduino to do the stepper control. I would run gpredict on the Pi, and write a serial string containing the azimuth and elevation data to the Arduino. I would ssh/vnc into the Pi to select the satellite I wanted to point to. The Arduino would have a cheap inclinometer and compass connected and would simply use a control loop to move the device via stepper motors until the the position data matches the target. The first step is to compute the pointing data.

Gpredict does a good job of this. So, we now need to get the pointing data out of gpredict in a fashion we can send to an Arudino. This method basically uses rotctld as a pass-thru and only uses a small fraction of its functionality (not really how it was intended to be used).

Start gpredict

Setup a dummy interface in gpredict

Start rotctld in a shell (you need to install hamlib, if you have not already done so)

Select Antenna Control from the main drop down

Select the satellite your want to track:

Click engage, then track buttons

You should see the read numbers change in the azimuth and elevation change and continually update .. you may need to change the targets to get the numbers tracking.. I had to do some ‘fiddling’ around to get the read positions to continually update.

To Grab the point data externally, issue the command:

echo “-p” | nc -w 1 localhost 4533

Note the port number matches the interface config in gpredict, if it is a separate computer, replace localhost with the address of the computer. From here you can pull the needed data from the string using grep, etc.

Comments are closed.