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

Method __init__

wardriving.py:165–175  ·  view source on GitHub ↗
(self, data_dir, session_id=None)

Source from the content-addressed store, hash-verified

163 v = '' if v is None else str(v)
164 if any(c in v for c in ',"\r\n'):
165 return '"' + v.replace('"', '""') + '"'
166 return v
167
168
169def _align_rows_to_track(recs, track):
170 """Pure: keep GPS-pinned rows, re-time them to the track, sort by time.
171
172 `recs` are export dicts with first/last ('YYYY-MM-DD HH:MM:SS') and
173 lat/lon; `track` is [(epoch, lat, lon)] sorted by epoch. A row's position
174 is where its signal peaked, but its FirstSeen is when it was first heard,
175 so the two can be minutes and kilometres apart; route-building services
176 then see the trail jump back and forth. Each row gets the track moment,
177 inside its own seen window, that is closest to its position. Rows without
178 a usable position are dropped, and - when the session has a track - so are

Callers

nothing calls this directly

Calls 2

_init_dbMethod · 0.95
setFunction · 0.50

Tested by

no test coverage detected