GPS: course-up map rotation in landscape + robust screen-off import
- applyBearing: use h, not h - rotOffset. The .rec-screen (map + panel) is CSS-rotated by rotOffset in landscape and setBearing adds another rotate on the map pane; subtracting rotOffset cancelled the screen rotation for the map only, gluing course to the portrait top edge while the panel turned. Using h lets the map turn with the screen -> course points to physical top. - Poll: guard the requestAnimationFrame yield with !document.hidden. rAF never fires while the screen is off, so awaiting it there hung the import loop and froze point import mid-walk (regression from the progressive-draw change). - recoverSession: import missing native points by the SET of existing timestamps instead of ts > maxDbTs. Sparse screen-gated points can have a late max ts, so the old check imported nothing and left the track full of gaps; also pass sensorData so bearing/accel/gyro are stored.
This commit is contained in:
parent
ec5937ea7e
commit
84a2b786ca
7 changed files with 25 additions and 13 deletions
|
|
@ -23,7 +23,7 @@
|
|||
|------|-------|------------|
|
||||
| `js/main.js` | ~5800 | Экраны, навигация, модалки, графики, нутриенты, HR UI, компас (EMA + gimbal lock), ландшафт (3 режима), дороги |
|
||||
| `js/db.js` | ~1500 | SQLite через Tauri IPC. Миграции, CRUD, 41 поле добавок, water_pct, reserves, sync |
|
||||
| `js/gps.js` | ~1200 | GPS запись, физика ккал (power model), altitude filter, BLE HR polling, dead reckoning |
|
||||
| `js/gps.js` | ~1400 | GPS запись, физика ккал (power model), altitude filter, BLE HR polling, dead reckoning. Импорт нативных точек: JS-поллинг (экран-gated) + ПОЛНЫЙ до-импорт по множеству ts на «Стоп»/recoverSession (без потерь при экране-офф), отбор по точности (minAccuracyM), bearing_deg |
|
||||
| `js/sync.js` | ~300 | Синхронизация между устройствами (LAN, PHP сервер на роутере) |
|
||||
| `js/tilecache.js` | 178 | Оффлайн кэш тайлов карты (IndexedDB) |
|
||||
| `js/bmr.js` | ~70 | BMR (Mifflin-St Jeor), РСП из БД (33 нутриента), полураспад |
|
||||
|
|
@ -101,7 +101,7 @@
|
|||
| `supplements` | Добавки (БАД) | name, daily_dose_g, витамины/минералы |
|
||||
| `supplement_log` | Приём добавок | date, supplement_id, dose_g |
|
||||
| `gps_sessions` | GPS тренировки | date, activity_type, distance, kcal, speed, elevation, bike_id |
|
||||
| `gps_points` | Точки трека | session_id, ts, lat, lon, altitude, speed, seq, heart_rate, spo2, bp_sys, bp_dia |
|
||||
| `gps_points` | Точки трека | session_id, ts, lat, lon, altitude_gps_m, altitude_srtm_m, speed_ms, seq, bearing_deg, heart_rate, spo2, bp_sys, bp_dia, accel_rms/max, gyro_pitch/yaw |
|
||||
| `bikes` | Велосипеды | name, weight_kg, wheel, звёзды, surface_type, is_active |
|
||||
| `rdi_standards` | Стандарты РСП (RU/EU/US) | code, name |
|
||||
| `rdi_values` | Нормы нутриентов | standard_id, nutrient_key, value, norm_type (rdi/aup) |
|
||||
|
|
@ -129,7 +129,7 @@
|
|||
### Экраны
|
||||
- **Сегодня** — баланс ккал, еда (продукты + блюда), GPS тренировки, активность, вес, сон, добавки, прогресс-бар жидкости, нутриенты (приход + запасы)
|
||||
- **Продукты** — подтабы [Продукты | Рецепты], поиск, карточки с КБЖУ, добавление в дневник
|
||||
- **Трек** — GPS тренировки (запись с HR), карта с компасом (leaflet-rotate), ландшафтный режим (CSS rotation), графики скорости/высоты/ЧСС, импорт GPX/FTB, dead reckoning, placeholder до GPS, карта дорог (дедуп 2м, вело/пешие)
|
||||
- **Трек** — GPS тренировки (запись с HR), карта с компасом (leaflet-rotate), course-up по GPS-курсу (карта и панель доворачиваются в ландшафт вместе, `bearing = h`), ландшафтный режим (CSS rotation), графики скорости/высоты/ЧСС, импорт GPX/FTB, dead reckoning, placeholder до GPS, карта дорог (дедуп 2м, вело/пешие)
|
||||
- **Добавки** — 41 нутриент (витамины, минералы, жирные кислоты, женьшень, ресвератрол, CoQ10)
|
||||
- **Настройки** — профиль, образ жизни, нормы ЧСС/давления, BLE пульсометр, велосипеды, GPS конфиг, OTA обновления, импорт тайлов, карта дорог
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue