summaryrefslogtreecommitdiff
path: root/contrib/webgps.py
diff options
context:
space:
mode:
authorGary E. Miller <gem@rellim.com>2018-07-14 14:08:10 -0700
committerGary E. Miller <gem@rellim.com>2018-07-14 14:08:10 -0700
commitec423cffe3105a6f88edc8435d5a9ab131b5b158 (patch)
treed6908803bb20563a9fa80650e5ce56fa3ac1f691 /contrib/webgps.py
parent8347fcdab092a88529aa7eb05d83b18638a14b67 (diff)
downloadgpsd-ec423cffe3105a6f88edc8435d5a9ab131b5b158.tar.gz
contrib/webgps: isnan() -> isfinite()
Thanks to Virgin Orbit for their support on this patch.
Diffstat (limited to 'contrib/webgps.py')
-rwxr-xr-xcontrib/webgps.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/contrib/webgps.py b/contrib/webgps.py
index 0628dea9..15fd0e7f 100755
--- a/contrib/webgps.py
+++ b/contrib/webgps.py
@@ -143,9 +143,9 @@ class SatTracks(gps):
row('Longitude', deg_to_str(self.fix.longitude, 'WE'))
row('Altitude', self.fix.mode == MODE_3D and "%f m" %
self.fix.altitude or 'N/A')
- row('Speed', not isnan(self.fix.speed) and "%f m/s" %
+ row('Speed', isfinite(self.fix.speed) and "%f m/s" %
self.fix.speed or 'N/A')
- row('Course', not isnan(self.fix.track) and "%f°" %
+ row('Course', isfinite(self.fix.track) and "%f°" %
self.fix.track or 'N/A')
else:
row('Latitude', 'N/A')
@@ -154,10 +154,10 @@ class SatTracks(gps):
row('Speed', 'N/A')
row('Course', 'N/A')
- row('EPX', not isnan(self.fix.epx) and "%f m" % self.fix.epx or 'N/A')
- row('EPY', not isnan(self.fix.epy) and "%f m" % self.fix.epy or 'N/A')
- row('EPV', not isnan(self.fix.epv) and "%f m" % self.fix.epv or 'N/A')
- row('Climb', self.fix.mode == MODE_3D and not isnan(self.fix.climb) and
+ row('EPX', isfinite(self.fix.epx) and "%f m" % self.fix.epx or 'N/A')
+ row('EPY', isfinite(self.fix.epy) and "%f m" % self.fix.epy or 'N/A')
+ row('EPV', isfinite(self.fix.epv) and "%f m" % self.fix.epv or 'N/A')
+ row('Climb', self.fix.mode == MODE_3D and isfinite(self.fix.climb) and
"%f m/s" % self.fix.climb or 'N/A')
if not (self.valid & ONLINE_SET):