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 /contrib/webgps.py | |
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 'contrib/webgps.py')
-rwxr-xr-x | contrib/webgps.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/contrib/webgps.py b/contrib/webgps.py index 0a801b5e..2e9a8187 100755 --- a/contrib/webgps.py +++ b/contrib/webgps.py @@ -244,7 +244,10 @@ function draw_satview() { # Draw the satellites for s in self.satellites: - x, y = polartocart(s.elevation, s.azimuth) + el, az = s.elevation, s.azimuth + if el == 0 and az == 0: + continue # Skip satellites with unknown position + x, y = polartocart(el, az) fill = not s.used and 'lightgrey' or \ s.ss < 30 and 'red' or \ s.ss < 35 and 'yellow' or \ |