TECHNICAL NOTE & DEEP-DIVE·May 2025·6 min read

Geospatial RF Telemetry at Scale: MongoDB 2dsphere Indexing & Signal Heatmaps

How NetVision visualizes 4G/5G cellular coverage using geospatial MongoDB queries, raw RF telemetry extraction from mobile telephony hardware, and IDW contour interpolation.

#MongoDB#Geospatial#Node.js#React Native#RF Telemetry

The Cellular Black Box Problem

Cellular signal strength indicators (the 1-4 bars displayed on phone status bars) are notoriously deceptive. They reflect proprietary OEM filtering curves rather than actual radio frequency metrics. When diagnosing carrier drop-offs or planning remote IoT deployments, engineers require raw physical parameters: RSRP (Reference Signal Received Power), RSRQ (Reference Signal Received Quality), and SINR (Signal-to-Interference-plus-Noise Ratio). NetVision was designed to harvest these metrics directly from modem basebands and plot them against geo-located cellular tower masts.

ARCHITECTURAL TAKEAWAYS
  • ›Status bar signal bars hide interference and signal degradation.
  • ›RSRP and SINR provide true insight into cellular link health.
  • ›Correlating radio telemetry with geospatial tower databases reveals dead zones.

Extracting Hardware RF Telemetry

Using Android's `TelephonyManager.getAllCellInfo()`, we query active and neighbor cell towers. For LTE connections, we capture CellIdentityLte (MCC, MNC, CI, TAC, PCI) and CellSignalStrengthLte. To conserve battery during active surveying, polling is throttled when the device accelerometer detects the user is stationary.

telemetryService.ts
typescript
export interface CellTelemetryPayload {
  carrier: string;
  networkType: 'LTE' | 'NR_5G' | 'WCDMA';
  pci: number; // Physical Cell ID
  tac: number; // Tracking Area Code
  rsrp: number; // dBm (-140 to -44)
  sinr: number; // dB (-20 to +30)
  coordinates: [number, number]; // [lng, lat]
}

MongoDB 2dsphere Geospatial Indexing

With over 1.2 million base station antennas across regional databases, querying towers within a user's viewport required sub-millisecond indexing. We defined a spherical 2dsphere index on GeoJSON Point objects, executing `$nearSphere` queries bounded by max distance thresholds.

towerController.js
javascript
const findNearbyTowers = async (lng, lat, radiusMeters = 5000) => {
  return await Tower.find({
    location: {
      $nearSphere: {
        $geometry: {
          type: "Point",
          coordinates: [lng, lat]
        },
        $maxDistance: radiusMeters
      }
    }
  }).select("operator radio cellId pci location azmuth");
};

Inverse Distance Weighting (IDW) Heatmaps

Rather than displaying sparse point pins, NetVision calculates an interpolated coverage gradient. Using Inverse Distance Weighting (IDW), each grid pixel on the map estimates signal power by factoring known nearby telemetry measurements inversely proportional to distance squared.

Multi-Carrier Telemetry Normalization

Different cellular bands (e.g. Band 3 at 1800MHz vs Band 28 at 700MHz) penetrate foliage and urban structures differently. NetVision normalizes path-loss exponents based on carrier frequency, enabling fair cross-carrier reliability scoring for travelers and field operations.

Production Benchmarks & Takeaways

By coupling low-level telephony hooks with geospatial spherical indexing and mathematical field interpolation, mobile clients can transform unorganized signal noise into actionable geographic intelligence.

ENGINEERED & DOCUMENTED BY RAZI AHMED MZERO HALT CADENCE