Print DOPs (PDOP, HDOP, VDOP) on a single line

This commit is contained in:
Teemu Ikonen 2023-09-23 13:27:33 +03:00
parent a5453cf85f
commit 90384a0e27
1 changed files with 7 additions and 3 deletions

View File

@ -430,6 +430,12 @@ class SatelliteApp(Gtk.Application):
fixage = to_str(data.get("fixage"), "%0.0f s")
return "%s / %s" % (up_age, fixage)
def get_dops(xkey):
pdop = to_str(data.get("pdop"), "%1.1f")
hdop = to_str(data.get("hdop"), "%1.1f")
vdop = to_str(data.get("vdop"), "%1.1f")
return f"{pdop} / {hdop} / {vdop}"
mode2fix = {
"2": "2 D",
"3": "3 D",
@ -459,9 +465,7 @@ class SatelliteApp(Gtk.Application):
("true_course", "True Course",
lambda x: to_str(x, "%0.1f deg ")
+ (bearing_to_arrow(x) if x is not None else "")),
("pdop", "PDOP", lambda x: to_str(x)),
("hdop", "HDOP", lambda x: to_str(x)),
("vdop", "VDOP", lambda x: to_str(x)),
("pdop", "PDOP/HDOP/VDOP", get_dops),
]
descs = []
vals = []