Stand alone Gpredict dummy rotator programmed in Python

Hi,
I have written a light dummy rotator for Gpredict in Python that does not require Hamlib.
It is working quite well and returns Az/El when activating engage and when following a satellite.
It is part of a project of activating a radiotelescope using Equatorial mounting not altazimutal as it is most frequently used in radioamateur world.
Consequently I convert Az/El coordinates into RA/Dec coordinates to control the telescope for high orbit satellite tracking (GPS, Galileo, Geo). This part also is working fine.
I am intrigued by Right Ascension displayed in main Gpredict window together with declination of satellites when requested.
Our computation agrees with declination but unfortunately I cannot figure out how the Right Ascension is computed. Usually RA is expressed in hours, min, sec, not in degrees. However it is not difficult to perform the translation.
Our routines are already validated by astronomy application SkyChart so we are not anxious about our computations.
The problem is that Gpredict displays a value of RA I would like to reproduce in order to be in total accordance with Gpredict.
Can someone give an explanation ?
Here is an example in attached screen copy link.

73 de Bernard f6bvp / ai7bg

1 Like

Add the image that was broken in the initial post.

Thanks for repairing the image.
In the meantime we found the bug in our computation that was breaking the computation of RA.
Now it works and we completely agree with Gpredict display.
Much better !
Sorry for the noise.
Best regards.
Bernard, f6bvp / AI7BG

2 Likes

Hello, I’m trying to do the same, but I’m not getting any coordinates back with a Python code.
C:\Users\Michel\Desktop\ham\gpredict\hamlib\bin>rotctld -m 1 -t 4533 -vvvvvvvv
rotctld, Hamlib 4.5.5 Apr 05 11:43:08Z 2023 SHA=6eecd3
Report bugs to hamlib-developer@lists.sourceforge.net

rot_init called
initrots4_dummy: _init called
rot_register (1)
rot_register (2)
dummy_rot_init called
set_conf: called
rot_open called
dummy_rot_open called
dummy_rot_open: dummy rotator so simulating speed
Opened rot model 1, ‘Dummy’
Backend version: 20220531.0, Status: Stable
Connection opened from ::ffff:127.0.0.1:65364

my Python

import socket

ParamĂštres de connexion

HOST = ‘127.0.0.1’ # Localhost
PORT = 4533 # Port utilisé par Gpredict

try:
# Création de la connexion
with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as s:
s.connect((HOST, PORT))
print(f"Connecté à {HOST}:{PORT}")

    while True:
        data = s.recv(1024)  # Lire jusqu'Ă  1024 octets
        if not data:
            break
        print("Reçu:", data.decode('utf-8'))

except ConnectionRefusedError:
print(“Connexion refusĂ©e. Assurez-vous que Gpredict envoie des donnĂ©es sur le port 4533.”)
except KeyboardInterrupt:
print(“\nArrĂȘt du script par l’utilisateur.”)

As I stated in the other topic it might be due to IPV4 vs IPV6