diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2005-06-21 23:00:59 +0000 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2005-06-21 23:00:59 +0000 |
commit | 4f516f26ed53fc2a1760770ab34daf6493002ae1 (patch) | |
tree | bc0fdd522fcf27a5452f62e1bebdfb2d413e6580 /gps.py | |
parent | b8b504de19d4646993fdffa7b6376ebc47e508a8 (diff) | |
download | gpsd-4f516f26ed53fc2a1760770ab34daf6493002ae1.tar.gz |
Ensure that date/time field is dumped as ? when...
...NMEA device gives only a partial timestamp.
Diffstat (limited to 'gps.py')
-rwxr-xr-x | gps.py | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -312,15 +312,15 @@ class gps(gpsdata): self.fix.mode = MODE_NO_FIX else: self.timings.sentence_tag = fields[0] - self.fix.time = float(fields[1]) - self.fix.ept = float(fields[2]) - self.fix.latitude = float(fields[3]) - self.fix.longitude = float(fields[4]) def default(i): if fields[i] == '?': return NaN else: return float(fields[i]) + self.fix.time = default(1) + self.fix.ept = default(2) + self.fix.latitude = default(3) + self.fix.longitude = default(4) self.fix.altitude = default(5) if not isnan(self.fix.altitude): self.fix.mode = MODE_2D |