From 1c326ab19c532a9a8e62a1f05cf918302d1ab407 Mon Sep 17 00:00:00 2001 From: 4aiman Date: Sat, 12 Sep 2026 22:55:51 +0300 Subject: [PATCH] Nogo areas: routing avoids impassable spots (planner + engine + RouteServer) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Stage 1 of the nogo/reroute work. Mark impassable circles that BRouter routes around, end to end: - DB nogo_areas table + CRUD; drawNogoAreas() red circles (tap to remove). - BRouter.route(points, profile, nogos): &nogos=lon,lat,r on the RouteServer and nogos in the embedded-engine request; Rust brouter_route passes it through; Kotlin builds OsmNodeNamed(radius,isNogo,nogoWeight=NaN) -> rc.nogopoints + prepareNogoPoints (needs an APK rebuild for offline use). - Planner: ⛔ button toggles nogo-placement (tap map/line), each leg re-routes around nogos. Recording map: ⛔ marks the current spot impassable. Detail map shows the circles. Verified the RouteServer detours around a nogo (2873m -> 3329m). --- PROJECT_MAP.md | 4 +- README.md | 1 + docs/plans/2026-09-12-nogo-reroute.md | 109 ++++++++++++++++++ docs/session-logs/2026-09-12_nogo-reroute.md | 33 ++++++ frontend/js/db.js | 34 ++++++ frontend/js/main.js | 86 +++++++++++++- frontend/js/router.js | 22 +++- .../main/java/dev/baldav/app/MainActivity.kt | 28 ++++- src-tauri/src/lib.rs | 9 +- 9 files changed, 310 insertions(+), 16 deletions(-) create mode 100644 docs/plans/2026-09-12-nogo-reroute.md create mode 100644 docs/session-logs/2026-09-12_nogo-reroute.md diff --git a/PROJECT_MAP.md b/PROJECT_MAP.md index 0f8352e..21dd339 100644 --- a/PROJECT_MAP.md +++ b/PROJECT_MAP.md @@ -22,12 +22,12 @@ | Файл | Строк | Назначение | |------|-------|------------| | `js/main.js` | ~5900 | Экраны, навигация, модалки, графики, нутриенты, HR UI, компас (EMA + gimbal lock), ландшафт (3 режима), дороги. `appConfirm`/`appPrompt` (in-app диалоги вместо нативных, в стеке окон). Страница «Сохранённые маршруты», оверлей маршрута на записи и просмотре (`whenMapReady` — await готовности карты, не таймаут). Панель де-джиттера на детали трека (ползунки окно/итерации, живое превью, сохранить/откат, `reopenDetail` — переоткрытие детали без наложения оверлеев). `showRouteDetail` — предпросмотр маршрута (карта+профиль высоты+тап-высоты+фуллскрин), `showRouteEditor` — создание/правка маршрута (тап карты=точка в конец, тап линии=вставка в сегмент, тащить=двигать, тап точки=удалить; `makeMarker` возвращает маркер для push/splice). `appConfirm`/`appPrompt`/`appAlert` — in-app диалоги (нативных `alert/prompt/confirm` не осталось; `