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

Method stop

gps_manager.py:296–312  ·  view source on GitHub ↗

Stop GPS reading.

(self)

Source from the content-addressed store, hash-verified

294 # in-flight accumulator that stitches the multi-message GSV sequence
295 # (each sentence carries ≤4 satellites) back into one sweep.
296 self._sats_by_talker = {}
297 self._gsv_accum = {}
298 # Last-known position — the most recent confirmed fix, kept in memory and
299 # mirrored to disk so it survives reboots. Lets the sky view place stars
300 # from roughly the right spot before this boot's receiver gets its own
301 # fix (a u-blox cold start can take minutes). A later real fix always
302 # wins; this is only ever a starting point.
303 self.state_file = state_file
304 self.last_known = None # {'lat','lon','alt','t'} or None
305 self._last_persist = 0.0
306 if state_file:
307 self._load_last_known()
308 # Time-to-first-fix bookkeeping. A cold start has to demodulate the
309 # ephemeris (~30 s of uninterrupted reception), so a receiver that keeps
310 # browning out or is being desensed shows satellites in view while TTFF
311 # never completes. Recording when the reader started and when the first
312 # fix landed makes that visible instead of inferred.
313 self.start_time = 0
314 self.first_fix_time = 0
315 self.connected = False

Callers 2

attachMethod · 0.95
detachMethod · 0.95

Calls 2

infoMethod · 0.80
closeMethod · 0.45

Tested by

no test coverage detected