one more thing: the Satellite (Sky) view oscillates between two different states when both GPGSV and PUBX03 (UBX03) are enabled:
This seems bad:
... while this looks OK:
The parsed data seems to be valid, so the problem is probably in the _process_UBX03() funcion (nmea_handler.py).
The function makes a dictionary of tuples:
gsvdict[key] = (
gnss,
svid,
getattr(data, f"azi{i+1:02}"),
getattr(data, f"ele{i+1:02}"),
str(getattr(data, f"cno{i+1:02}")),
now,
)
Later it moves the tuples around:
for key in gsv_dict:
self.gsv_log[key] = gsv_dict[key]
... and unpacks the tuples back into variables:
for key in self.gsv_log:
gnssId, svid, elev, azim, snr, lastupdate = self.gsv_log[key]
The 3rd and 4th fields are swapped, i.e. the elevation and azimuth have switched places!
It might be useful to have an assert statement to check that a satellite's elevation never exceeds 90 degrees.
PyGPSClient Bug Report Template
(Reported via email by Matti Öhman)
one more thing: the Satellite (Sky) view oscillates between two different states when both GPGSV and PUBX03 (UBX03) are enabled:
This seems bad:![image1](https://github.com/semuconsulting/PyGPSClient/assets/28569967/6a045357-e67f-4c55-bc21-52b6949c73e5)
... while this looks OK:![image2](https://github.com/semuconsulting/PyGPSClient/assets/28569967/7e74d428-5177-4b9e-95c0-71c532e0c13a)
The parsed data seems to be valid, so the problem is probably in the _process_UBX03() funcion (nmea_handler.py).
The function makes a dictionary of tuples: gsvdict[key] = ( gnss, svid, getattr(data, f"azi{i+1:02}"), getattr(data, f"ele{i+1:02}"), str(getattr(data, f"cno{i+1:02}")), now, )
Later it moves the tuples around: for key in gsv_dict: self.gsv_log[key] = gsv_dict[key]
... and unpacks the tuples back into variables: for key in self.gsv_log: gnssId, svid, elev, azim, snr, lastupdate = self.gsv_log[key]
The 3rd and 4th fields are swapped, i.e. the elevation and azimuth have switched places!
It might be useful to have an assert statement to check that a satellite's elevation never exceeds 90 degrees.
Additional context
Add any other context about the problem here.