diff options
author | Fred Wright <fw@fwright.net> | 2016-09-22 16:28:35 -0700 |
---|---|---|
committer | Gary E. Miller <gem@rellim.com> | 2016-09-22 18:21:56 -0700 |
commit | 9af0ab644fb048e8f638cbeda83bdac94b1f9a8f (patch) | |
tree | b0f27b364e934559820caa5186eb1d21a66b7b6f /xgpsspeed | |
parent | fc2ac1b84944c54fc8c9eb30848d6aecd5eb0ce3 (diff) | |
download | gpsd-9af0ab644fb048e8f638cbeda83bdac94b1f9a8f.tar.gz |
Excludes unknown-position sats from skyview displays.
In some cases, the elevation and azimuth information are missing
(i.e., reported as 0) for some satellites. E.g., the Navika-100
receiver fails to report positions for SBAS satellites. This change
avoids showing such satellites at the "north point" of the display.
They are *not* excluded from the textual list.
TESTED:
Ran xgps, xgpsspeed, and webgps.py against data from a Navika-100
receiver, and verified that the SBAS satellites are no longer
inappropriately shown at the top.
Signed-off-by: Gary E. Miller <gem@rellim.com>
Diffstat (limited to 'xgpsspeed')
-rwxr-xr-x | xgpsspeed | 9 |
1 files changed, 6 insertions, 3 deletions
@@ -449,15 +449,18 @@ class NauticalSpeedometer(Speedometer): self.cr.set_source_rgb(r, g, b) def draw_sat(self, satsoup, radius, x, y): - """given a sat's elevation, azimath, SNR, draw it on the skyview + """Given a sat's elevation, azimuth, SNR, draw it on the skyview Arg: satsoup: a dictionary {'el': xx, 'az': xx, 'ss': xx} """ - h = pi / 2 - radians(satsoup['az']) # to xy + el, az = satsoup['el'], satsoup['az'] + if el == 0 and az == 0: + return # Skip satellites with unknown position + h = pi / 2 - radians(az) # to xy self.cr.set_line_width(2) self.cr.set_source_rgb(0, 0, 0) - x0, y0 = NauticalSpeedometer.polar2xy(radius * (90 - satsoup['el']) // 90, h, x, y) + x0, y0 = NauticalSpeedometer.polar2xy(radius * (90 - el) // 90, h, x, y) self.cr.new_sub_path() if gps.is_sbas(satsoup['PRN']): |