Analysis in docs/brouter-findings.md: how BRouter knows roads (.rd5 segments), routes and reaches low elevation gain (profile uphill/downhill cost + kinematics), the three call surfaces, and an evaluation of two ideas — fill GPS gaps along roads, and offline waypoint route planning. License is MIT; the engine has no desktop-only deps, so it embeds on Android ART. Stage 1 (embed + bridge, compiles into the apk; on-device route not yet run): - vendored brouter-1.6.3-all.jar into the Android module (dexes cleanly) and bundled the trekking/shortest profiles + lookups.dat as assets, copied to files/brouter/profiles2 on launch - MainActivity: a brouter_command.txt handler on the existing FileObserver runs btools.router.RoutingEngine off the UI thread (recipe taken via javap from ServerHandler) and returns the track as GPX - Rust brouter_route command: same file bridge as GPS (request + command, poll for the result), registered in the invoke handler - frontend/js/router.js: BRouter.route(points, profile) -> GPX (parseRouteGPX) - LICENSE-brouter (MIT notice) kept alongside the vendored engine Segments (.rd5, ~13-23 MB per 5x5 tile) are delivered later (Stage 2, wired download inside BalDav). IMPLEMENTATION_PLAN.md tracks the 5 stages.
31 lines
1.1 KiB
HTML
31 lines
1.1 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="ru">
|
|
<head>
|
|
<meta charset="UTF-8" />
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0" />
|
|
<title>BalDav</title>
|
|
<link rel="stylesheet" href="lib/leaflet.css" />
|
|
<link rel="stylesheet" href="css/styles.css" />
|
|
</head>
|
|
<body>
|
|
<div id="app"></div>
|
|
|
|
<!-- Load order matters: db.js and bmr.js expose window.DB / window.BMR,
|
|
then main.js uses them. Tauri injects window.__TAURI__ before page scripts. -->
|
|
<script src="lib/leaflet.js"></script>
|
|
<script src="lib/leaflet-rotate.js"></script>
|
|
<script src="lib/hammer.min.js"></script>
|
|
<script src="lib/chart.min.js"></script>
|
|
<script src="lib/chartjs-plugin-zoom.min.js"></script>
|
|
<script src="lib/jszip.min.js"></script>
|
|
<script src="lib/zxing-wasm.js"></script>
|
|
<script src="js/db.js"></script>
|
|
<script src="js/bmr.js"></script>
|
|
<script src="js/tilecache.js"></script>
|
|
<script src="js/gps.js"></script>
|
|
<script src="js/router.js"></script>
|
|
<script src="js/sync.js"></script>
|
|
<script src="js/chzn.js"></script>
|
|
<script src="js/main.js"></script>
|
|
</body>
|
|
</html>
|