MCPcopy Create free account
hub / github.com/PierreGode/Ragnar / _parse_tpv

Method _parse_tpv

gps_manager.py:525–544  ·  view source on GitHub ↗

Parse a gpsd TPV (Time-Position-Velocity) object.

(self, obj)

Source from the content-addressed store, hash-verified

523 for talker, sats, ts in items:
524 if ts and now - ts > 30:
525 continue
526 cons = self._TALKER_NAMES.get(talker, talker)
527 for s in sats:
528 if s.get('az') is None or s.get('elev') is None:
529 continue
530 out.append({
531 'constellation': cons, 'talker': talker,
532 'prn': s.get('prn'), 'az': s.get('az'),
533 'elev': s.get('elev'), 'snr': s.get('snr'),
534 })
535 return out
536
537 def get_status(self):
538 """Return full GPS status dict."""
539 with self._lock:
540 if self._external_source:
541 source = self._external_source
542 elif self._use_gpsd:
543 source = 'gpsd'
544 else:
545 source = 'serial'
546 return {
547 'connected': self.connected,

Callers 1

_read_loop_gpsdMethod · 0.95

Calls 1

getMethod · 0.45

Tested by

no test coverage detected