BRouter: gap-fill along roads + release hardening

Stage 4 — gap fill: GPS.fillGaps(points) routes each GPS dropout (dt>gap
threshold, chord>60m) with the shortest road path and splices the routed points
in (flagged estimated), falling back to the chord when the road is >3x the chord
(graph detoured). A 🧩 button on the track detail draws the road-filled path as
a cyan dashed overlay — non-destructive (stats recompute over filled points is a
follow-up). Also fixes doBrouter: parseRouteGPX returns {name,points}, not an
array (planning would have kept the straight line).

Release hardening: network_security_config.xml permits cleartext only to the
mirror/RouteServer hosts (base off, debug-overrides on) — wired via
android:networkSecurityConfig; proguard keeps btools.** so release minification
doesn't strip the embedded engine.
This commit is contained in:
4aiman 2026-09-09 17:43:56 +03:00
commit cd98078682
5 changed files with 80 additions and 3 deletions

View file

@ -94,7 +94,18 @@ app data dir; профиль trekking (идея 2) и shortest (идея 1); л
**Success:** записанный трек с дропаутом GPS показывает дорожный фолловинг вместо хорды, кроме
случая «дорога в разы длиннее».
**Tests:** трек с известным дропаутом на дороге → заполнение по дороге; дропаут на поле → хорда.
**Status:** not started
**Status:** СДЕЛАНО (v1, non-destructive). `GPS.fillGaps(points)` (gps.js): для каждого гэпа
(dt>gapThreshold и хорда>60м) прокладывает `shortest`, вставляет дорожные точки (флаг `estimated`);
фолбэк на хорду если дорога > 3× хорды. Кнопка «🧩» на детали трека — рисует дорожно-заполненный
путь голубым пунктиром оверлеем (данные не меняет). Пересчёт статистики по заполненным точкам —
следующий шаг (сейчас только визуализация).
## Release-хардненинг (item 4, сделано)
- `network_security_config.xml` (res/xml): cleartext OFF глобально в release, разрешён только хостам
зеркала/RouteServer (192.168.1.1 / 192.168.1.18 / mirror.invalid); `debug-overrides` — всё в debug.
Подключён в AndroidManifest (`android:networkSecurityConfig`).
- `proguard-rules.pro`: `-keep class btools.** { *; }` + `-dontwarn btools.**` — минификация release
не вырежет встроенный движок.
## Stage 5 — Полировка (опционально)
**Goal:** удобство и корректность.