From 9af0ab644fb048e8f638cbeda83bdac94b1f9a8f Mon Sep 17 00:00:00 2001 From: Fred Wright Date: Thu, 22 Sep 2016 16:28:35 -0700 Subject: 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 --- contrib/webgps.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'contrib/webgps.py') 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 \ -- cgit v1.2.1