MAVLINKGPS

Inside the Fused Location Provider (FLP)

Deconstructing the Black Box

When you ask Android for ACCESS_FINE_LOCATION, you aren't just turning on a GPS chip. You are engaging a massive, multi-sensor fusion engine called the Fused Location Provider (FLP).

The Inputs

The FLP consumes data from three primary hardware layers:

  1. GNSS HAL: Raw satellite data (GPS, GLONASS, Galileo, BeiDou).
    • Strengths: High accuracy outdoors.
    • Weaknesses: Fails indoors, slow cold start.
  2. Network Provider: Scans for WiFi BSSIDs (Router MAC addresses) and Cell Tower IDs.
    • Strengths: Works instantly indoors. No sky view needed.
    • Weaknesses: Lower accuracy (10m - 50m).
  3. Sensor Hub: Accelerometer, Gyroscope, Magnetometer, Barometer.
    • Strengths: High frequency (200Hz+). Detects steps/movement.
    • Weaknesses: Drifts over time.

The Fusion Engine

Just like ArduPilot's EKF3, the Android FLP uses a Kalman Filter to blend these inputs.

  • Scenario: You walk into a mall.
  • GPS: Signal fades and vanishes.
  • Network: The phone sees 50 WiFi routers. It queries Google's massive database to triangulate your position based on signal strength (RSSI).
  • Sensors: The accelerometer detects your "Step Count" and walking direction (PDR - Pedestrian Dead Reckoning).
  • Result: The blue dot continues to move smoothly through the mall, transitioning seamlessly from Satellite to WiFi navigation.

AOSP vs. GMS

It is important to note that the smart version of the FLP is proprietary.

  • AOSP (Android Open Source Project): Contains a basic FusedLocationProvider that simply passes through the best available provider.
  • GMS (Google Mobile Services): Contains the advanced logic, WiFi RTT (Round Trip Time) ranging, and the massive cloud database of WiFi router locations.

MAVLink GPS relies on the GMS implementation to provide "Concrete Penetrating" navigation.

Source Code Reference