diff options
author | Gary E. Miller <gem@rellim.com> | 2018-10-18 14:28:18 -0700 |
---|---|---|
committer | Gary E. Miller <gem@rellim.com> | 2018-10-18 14:28:18 -0700 |
commit | 707c25223294c10f0c7743432fe09b47ded805f4 (patch) | |
tree | 0c8358a94fb3335252ee7a4ea242731df5c4abf8 | |
parent | e15d295d4f0aac68f22603644656053f6d4518f4 (diff) | |
download | gpsd-707c25223294c10f0c7743432fe09b47ded805f4.tar.gz |
xgps: adjust colors to fit some of the RINEX 3 ranges.
-rwxr-xr-x | xgps | 11 |
1 files changed, 8 insertions, 3 deletions
@@ -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") |