(self, port: str)
| 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). |
| 118 | SESSION_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. |
| 122 | SESSION_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 | |
| 137 | def _ts_to_epoch(s): |
| 138 | """Session timestamp -> epoch seconds or None. |
nothing calls this directly
no outgoing calls
no test coverage detected