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

Method __init__

wardriving.py:110–135  ·  view source on GitHub ↗
(self, port: str)

Source from the content-addressed store, hash-verified

108 if 5170 <= freq <= 5825:
109 return (freq - 5000) // 5
110 # 6 GHz (WiFi 6E)
111 if 5955 <= freq <= 7115:
112 return (freq - 5950) // 5
113 return 0
114
115
116# Callables run with the session id whenever any engine stops a session
117# (the webapp registers auto-upload here).
118SESSION_FINISHED_HOOKS = []
119
120# Callables run with the session id whenever any engine starts a session (the
121# webapp registers ADS-B auto-start here). Mirrors SESSION_FINISHED_HOOKS.
122SESSION_STARTED_HOOKS = []
123
124# A row whose position is within this many metres of the GPS track (inside the
125# row's own first..last-seen window, plus slack) is re-timed to that moment.
126_ALIGN_MAX_M = 50
127_ALIGN_SLACK_S = 15
128# Between two consecutive fixes a row is timed by interpolating along the
129# segment joining them - the track is logged only every ~9 s, so snapping to
130# the nearest fix gave rows 100 m apart the same second (a 300+ km/h "jump"
131# to Wardrift). A segment longer than this, or faster than any car, is a lost
132# fix / glitch and is never interpolated across.
133_ALIGN_SEG_MAX_S = 30
134_ALIGN_SEG_MAX_MPS = 70
135
136
137def _ts_to_epoch(s):
138 """Session timestamp -> epoch seconds or None.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected