data.py 297 B

123456789101112
  1. from collections import namedtuple
  2. LocationData = namedtuple('LocationData', 'hwid lat lon eig prec yaw press')
  3. def have_location(x):
  4. return x.lat != None and x.lon != None
  5. def maybe_entry(x):
  6. return x.eig < 5 and x.prec > 40
  7. def maybe_indoor(x):
  8. return x.eig < 1 and x.prec > 400