GPredict tracking output to python?

Hello,

My team and I are building a satellite tracking platform very similar to the SatNogs system. We are running GPredict on a Raspberry Pi to track the satellites. We’ve also written a python code on the Pi that can control two A4988 motor drivers hooked up to two Nema17s, and that works fine. However, we don’t know how to get the tracking information (Az and El coordinates) from GPredict to our python code. I’ve been searching google and this forum but haven’t found a solution I could understand. Does anyone here have a recommendation?

Thanks!

2 Likes

welcome!

I would recommend writing motor control code that implements the Easycomm protocol

Then, you use rotctld (part of hamlib) which talks to your rotor controller and provides an IP based interface for control. gpredict can speak to this interface (as can the satnogs client itself).

Now, all that said, we already have an open source arduino based rotator controller that works with A4988s and Nema 17’s. You’re free to use and modify this for your needs. The code for this controller implements that easycomm protocol, so when you plug it in to a linux machine, you would use rotctld to speak to it and provide the IP interface. You can find details on that controller here: https://wiki.satnogs.org/SatNOGS_Rotator_Controller The hardware design and firmware is all open source.

Cheers!

2 Likes

KB9JHU,

Thanks for your feedback.

We’re not planning on using a dedicated rotor controller. We were planning on having GPredict on our Pi send the coordinates to the python script on the same Pi which will then control the A4988 drivers. We don’t know how to have GPredict talk to python. Can GPredict write the coordinates to a text file that the python script can be monitoring?

So, gpredict is expecting to talk with rotctld (hamlib) over IP. Your options are to either write your own IP listener that acts just like rotctld, or write a rotator driver that rotctld can then talk to.

See “Commands” and “Protocol” here. It wouldn’t be that hard to do, as there aren’t too many commands to implement.

http://manpages.ubuntu.com/manpages/trusty/man8/rotctld.8.html#commands

(I guess another method would be to write your own rotator support into hamlib itself too)