Split the int timestamp from frac timestamp so you don't lose precision when using, say, UTC time. Cleaned up some cruft while I was at it. This also allows devices which don't have timestamps to tag based on samples elapsed since the flowgraph started.

This commit is contained in:
Nick Foster
2012-12-12 17:40:01 -08:00
parent 3be6e9fd6e
commit 1e2b8a4f46
9 changed files with 68 additions and 76 deletions

View File

@@ -30,11 +30,11 @@ class output_print(air_modes.parse):
air_modes.parse.__init__(self, mypos)
def parse(self, message):
[data, ecc, reference, timestamp] = message.split()
[data, ecc, reference, timestamp_int, timestamp_frac] = message.split()
timestamp = int(timestamp_int) + float(timestamp_frac)
ecc = long(ecc, 16)
reference = float(reference)
timestamp = float(timestamp)
if reference == 0.0:
refdb = -150.0