MAVLINKGPS

The "Indoor Problem" Explained

The Physics of Fragility

Global Navigation Satellite Systems (GNSS), whether GPS (USA), Galileo (EU), or GLONASS (RU), all suffer from the same fundamental weakness: Physics.

Standard civilian GPS signals operate in the L-Band, specifically L1 at 1575.42 MHz.

  • Wavelength: ~19 cm (7.5 inches).
  • Power: Signals arrive at Earth's surface at approximately -160 dBm. This is equivalent to detecting a 25-watt lightbulb from 10,000 miles away.

Concrete Attenuation

Because the signal is so incredibly weak, it relies on "Line of Sight" (LoS).

  • Drywall/Wood: Passes signal with minor attenuation (3-5 dB loss). You might get a lock in a wood-frame house.
  • Concrete/Steel: Concrete is a mixture of aggregate and water. Water absorbs RF energy at 1.5 GHz. Rebar (steel) acts as a Faraday cage.
  • Result: A standard concrete roof provides 30-40 dB of attenuation. The signal drops below the receiver's thermal noise floor, and the GPS module goes deaf.

The Multipath Nightmare

Sometimes, you do get a signal indoors, but it's worse than no signal at all. This is Multipath Interference.

  1. The Mechanism: GPS calculates position by measuring the "Time of Flight" of the radio wave.
  2. The Error: In an urban canyon or warehouse, the direct signal is blocked. The receiver locks onto a signal that bounced off a nearby building or wall.
  3. The Drift: The bounced path is longer than the direct path. The receiver thinks the satellite is further away, shifting your calculated position by 10-50 meters.
  4. The "Twitch": As the drone moves, the reflection geometry changes rapidly, causing the position solution to jump wildly.

ArduPilot's Perspective

To the Flight Controller, this manifests as a degradation of the GPS_Status enum (defined in libraries/AP_GPS/AP_GPS.h).

  • GPS_OK_FIX_3D (3): Ideal state. Lock on 4+ satellites with good geometry (HDOP < 2.0).
  • GPS_OK_FIX_2D (2): Dangerous. Only 3 satellites visible. Altitude is unknown/unreliable. EKF will likely reject this.
  • NO_FIX (1): Signal lost. The EKF stops fusing position data. If flying in Loiter/Auto, the drone triggers a "GPS Failsafe" and switches to Land or AltHold.

The Network Fusion Solution

"Virtual GPS" solves this by abandoning the L-Band entirely.

  • WiFi: 2.4 GHz signals are stronger and emitted from terrestrial routers inside the building.
  • Cellular: 700-2100 MHz signals from towers have significantly higher transmit power than satellites.
  • The Result: By triangulating these strong, local signals, we can generate a valid 3D position fix where satellite signals simply do not exist.

Source Code Reference