[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gpsd-dev] [PATCH 2/2] gpsprof: accept valid samples only.
From: |
Robin H. Johnson |
Subject: |
[gpsd-dev] [PATCH 2/2] gpsprof: accept valid samples only. |
Date: |
Sun, 28 May 2017 13:51:31 -0700 |
Signed-off-by: Robin H. Johnson <address@hidden>
---
gpsprof | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/gpsprof b/gpsprof
index 05483506..ef491678 100755
--- a/gpsprof
+++ b/gpsprof
@@ -179,7 +179,8 @@ class spaceplot(plotter):
def sample(self):
# Watch out for the NaN value from gps.py.
- self.fixes.append((self.session.fix.latitude,
self.session.fix.longitude, self.session.fix.altitude))
+ if (self.session.valid & (gps.ONLINE_SET | gps.PACKET_SET |
gps.LATLON_SET)):
+ self.fixes.append((self.session.fix.latitude,
self.session.fix.longitude, self.session.fix.altitude))
return True
def header(self):
--
2.13.0