SYSTEM ARCHITECTURE & SPECIFICATION

Cartographic engineering built for Android.

A deep dive into FluxMap's architectural foundations: typed presentation policies, multi-engine map abstractions, sensor-fused stationary gating, and raw GNSS observability.

1. The Structural Seam: FluxWorkspaceChrome & 13 Presets

Unlike conventional mobile applications where themes are superficial color swaps, FluxMap implements a typed presentation policy engine called FluxPresetCatalog.

The dependency flow in FluxMap is strictly one-directional:

persisted ThemePresetId
        │
        ▼
FluxPresetCatalog ──► FluxPresetDefinition ──► resolved FluxDesignSystem
        │                                              │
        ▼                                              ├──► MaterialTheme roles
typed presentation policies ──► shared primitives     └──► FluxTheme custom tokens
        │                                ▲
        ▼                                │
FluxWorkspaceChrome ─────────────────────┘

Core business logic, tracking foreground services, database repositories, map ViewModels, and GPS listeners exist along a single unified execution path. FluxWorkspaceChrome acts as the structural seam: it adapts container density, typography hierarchies (Sans, Monospace, Editorial Serif), HUD docking behavior, and touch target minimums without recreating the activity or resetting the map viewport.

Zero State Disruption

Switching from Flux Core to Field Equipment or Dense Terminal modifies only the persisted layout policy. The active recording session, GPS stream, camera zoom/bearing, and track library selection remain 100% uninterrupted.

2. Multi-Engine Map Abstraction & Offline Workspace

FluxMap abstracts cartographic providers behind a unified interaction layer, allowing seamless switching across three distinct engines:

  • OpenStreetMap (osmdroid): Standard raster tiles rendered from canonical OpenStreetMap endpoints with local persistent disk caching.
  • Mapbox Android SDK: Smooth vector tiles with customizable styling and satellite imagery. Includes an opt-in vector road-and-path overlay to maximize trail contrast below labels and track polylines.
  • Google Maps SDK: Native Android integration via Maps Compose for familiar road and satellite navigation.

Unified Touch Gesture Wrappers

Map control configuration is globally harmonized:

  • Double-Tap to Center: Custom touch wrappers intercept double-tap gestures to smoothly center the viewport on the user's current GPS location.
  • Optimized One-Finger Zoom: Uses a calibrated piecewise logarithmic-linear scale to provide high precision at low drag speeds while allowing rapid zooming at higher velocities.

Map-Centered Offline Workspace

Offline map management is built as a unified interactive workspace rather than disconnected browse and download screens. Users adjust bounding boxes with multi-touch handles directly on the map, inspect tile count and disk size estimates, and trigger reliable background downloads via WorkManager.

3. Tracking Engine & Sensor-Assisted Stillness Gating

Consumer GPS receivers suffer from multipath reflection and ionospheric noise when stationary, resulting in artificial "spiderweb" track drift at coffee stops or traffic lights. FluxMap resolves this with a dual-stage filtering engine:

Filter Stage Sensors Involved Mechanism
Dynamic Noise Filter GPS Speed & Accuracy Dynamically expands distance rejection thresholds when GPS accuracy dilutes, preventing static jitter.
Sensor-Assisted Stillness Gate Linear Accelerometer & Gyroscope Measures physical kinetic energy on-device. When physical stillness is confirmed for >1.0s, point generation is clamped while keeping live HUD indicators active.
Automatic Stop Detection Spatial Radius & Timer Identifies resting periods (≥ 5 min within 30m radius) and creates permanent inspectable StopEntity markers.

4. High-Accuracy GNSS & .fluxraw Container Format

For geodetic and outdoor power users, FluxMap provides direct access to Android's raw GNSS measurement pipeline:

  • Dual-Band Carrier Tracking: Live monitoring of L1/L5 (GPS/Galileo/BeiDou) carrier frequencies, satellite azimuth, elevation angles, and $C/N_0$ carrier-to-noise ratios.
  • Accumulated Delta Range (ADR): Continuous carrier phase tracking with cycle-slip detection flags for post-processing engines.
  • The .fluxraw Package: Completed raw sessions are published into deterministic ZIP packages containing raw NDJSON chunks, verification metadata (SHA-256 digests), and synchronized GPX tracks.
  • RINEX 3.04 Export: Direct generation of observation (.obs) and navigation (.nav) files compatible with RTKLIB, Bernese, and scientific post-processing software.

5. Storage Access Framework & Local Sovereignty

FluxMap does not require an account or a proprietary cloud server. It uses Android's native Storage Access Framework (SAF) to synchronize directly with any user-selected folder (on internal storage, an external SD card, or a local Syncthing/Nextcloud share).

Data integrity is guaranteed: track recording, database commits, and SAF file publishing operate atomically to prevent corrupt files or data loss across system restarts and battery depletion.

NEXT ARTICLE
View App Source on GitHub