Files
dragonpilot/system/ubloxd/tests/print_gps_stats.py
Adeeb Shihadeh c97911dbad ubloxd: move to system/ (#27536)
* ubloxd: move to system/

* more fixes

* add missing sconscript

* fix valgrind tests

* uncomment
2023-03-08 16:11:18 -08:00

21 lines
521 B
Python
Executable File

#!/usr/bin/env python3
import time
import cereal.messaging as messaging
if __name__ == "__main__":
sm = messaging.SubMaster(['ubloxGnss', 'gpsLocationExternal'])
while 1:
ug = sm['ubloxGnss']
gle = sm['gpsLocationExternal']
try:
cnos = []
for m in ug.measurementReport.measurements:
cnos.append(m.cno)
print("Sats: %d Accuracy: %.2f m cnos" % (ug.measurementReport.numMeas, gle.accuracy), sorted(cnos))
except Exception:
pass
sm.update()
time.sleep(0.1)