summaryrefslogtreecommitdiff
path: root/xgps
diff options
context:
space:
mode:
authorGary E. Miller <gem@rellim.com>2018-10-18 14:28:18 -0700
committerGary E. Miller <gem@rellim.com>2018-10-18 14:28:18 -0700
commit707c25223294c10f0c7743432fe09b47ded805f4 (patch)
tree0c8358a94fb3335252ee7a4ea242731df5c4abf8 /xgps
parente15d295d4f0aac68f22603644656053f6d4518f4 (diff)
downloadgpsd-707c25223294c10f0c7743432fe09b47ded805f4.tar.gz
xgps: adjust colors to fit some of the RINEX 3 ranges.
Diffstat (limited to 'xgps')
-rwxr-xr-xxgps11
1 files changed, 8 insertions, 3 deletions
diff --git a/xgps b/xgps
index 8e041357..1e8853ad 100755
--- a/xgps
+++ b/xgps
@@ -263,6 +263,8 @@ class SkyView(Gtk.DrawingArea):
def set_color(self, spec):
"Set foreground color for drawing."
+
+ # Gdk.color_parse() deprecated in GDK 3.14
gdkcolor = Gdk.color_parse(spec)
r = gdkcolor.red / 65535.0
g = gdkcolor.green / 65535.0
@@ -443,13 +445,16 @@ class SkyView(Gtk.DrawingArea):
(x, y) = self.pol2cart(sat.az, sat.el)
# colorize by signal to noise ratio
- if sat.ss < 10:
+ # RINEX 3 uses 9 steps: 1 to 9. Corresponding to
+ # <12, 12-17, 18-23, 24-29, 30-35, 36-41, 42-47, 48-53, >= 54
+ if sat.ss < 12:
self.set_color("Gray")
elif sat.ss < 30:
self.set_color("Red")
- elif sat.ss < 35:
+ elif sat.ss < 36:
+ # RINEX 3 says 30 is "threshold for good tracking"
self.set_color("Yellow")
- elif sat.ss < 40:
+ elif sat.ss < 42:
self.set_color("Green3")
else:
self.set_color("Green1")