I have to add the PyEphm library into my Python setup on the Raspberry Pi, but look at bit of sample code I found at :
Note how readable this code is !
Tip of the hat to “jboone”.
It’s not like the FORTRAN you may have endured in school, or the C and Pascal* I grew up with. (Not that C is a bad thing)
Basically, we’re telling the computer a bit about where we live (you’ll need to edit this), then a bit about characteristics of the satellite we want to keep tabs on.
While in a loop, the script prints out the heading and elevation where you need to point your telescope / antennas.
The real magic happens in the “compute” function (or is it a method) . If you haven’t programmed in a while, the print command has some formatting in it to keep the numbers from having excessive leading zeros and lots of junk behind the decimal point. Keeps the printouts neat that way.
Note that most all the math is hidden from view. 100% of the hairy scary stuff like vectors and trig are hidden. We just have to call the right functions and the Python library does the rest.
iss: altitude 78.1 deg, azimuth 249.8 deg
iss: altitude 79.1 deg, azimuth 250.7 deg
iss: altitude 80.2 deg, azimuth 251.7 deg
iss: altitude 81.2 deg, azimuth 253.0 deg
iss: altitude 82.2 deg, azimuth 254.7 deg
iss: altitude 83.3 deg, azimuth 256.9 deg
iss: altitude 84.3 deg, azimuth 259.9 deg
I’m excited to try this out later on for the RPi.
*Pascal is bad.