Chapters

64 Indoor Positioning: Wi-Fi, UWB, and Sensor Fusion

ux-design
location
awareness
indoor

64.1 Start With the Situation

A BLE deployment can estimate position, but multipath and layout changes may leave the result too uncertain. The team now compares fingerprints, precise time of flight, and fused motion evidence to decide what accuracy the site can support.

64.2 Overview

This route compares Wi-Fi, UWB, ultrasonic, and fused sensing, then tests accuracy, calibration, interference, and cost trade-offs.

This is part 2 of 2. Review Indoor Positioning: BLE Beacons and Ranging when you need the first route.

64.3 Learning Objectives

By the end of this chapter, you will be able to:

  • design and maintain a Wi-Fi fingerprint map
  • explain UWB time-of-flight accuracy and deployment limits
  • combine radio and motion evidence for indoor-outdoor transitions

64.4 Chapter Roadmap

Follow the original sections below in order. They begin at the reviewed split boundary and keep every worked example, figure, check, and supporting banner with the section that owns it.

64.5 Wi-Fi Fingerprinting

Wi-Fi fingerprinting maps RSSI patterns to physical locations by pre-surveying the space.

Before deciding how AP3 shapes wi-fi fingerprinting, inspect Figure 64.1 beside Wall. Together, AP3 and Wall frame the wi-fi fingerprinting claim: wi-fi signal fingerprinting.

A WiFi floor plan marks access points and RSSI measurement points. Training measurements form a fingerprint database, then online RSSI is matched to stored entries.
Figure 64.1: Wi-Fi Signal Fingerprinting

Read AP3 alongside Wall in Figure 64.1; their named relationship makes wi-fi signal fingerprinting concrete. For wi-fi fingerprinting, AP3 supplies visible evidence; Wall constrains the decision. In Figure 64.1, retain AP3 beside Wall so wi-fi fingerprinting remains explicit.

64.5.1 Two-Phase Process

Offline Phase (Survey):

Walk through the space with a device. At each known location, record RSSI from all visible access points. Build a fingerprint database mapping RSSI vectors to locations.

Online Phase (Positioning):

Device scans visible APs and measures RSSI. Compare current RSSI vector to database entries. Find closest match(es) to estimate position.

64.5.2 Challenges with Fingerprinting

Wi-Fi Fingerprinting Drift

Environmental changes: Moved furniture, added walls, relocated APs. Temporal variations: Different occupancy (empty vs. crowded) affects propagation. Device variations: Different phones have different RSSI calibration. Maintenance burden: Requires periodic re-surveying (every 3-6 months).

Mitigation strategies:

Crowd-sourced calibration (users’ movements gradually update database). Hybrid approaches (combine fingerprinting with dead reckoning). Machine learning (automatically detect and adapt to environmental changes).

Fingerprinting reuses infrastructure, while UWB changes the infrastructure to measure time more directly. That trade moves the discussion from survey maintenance to precision ranging.

64.6 Ultra-Wideband (UWB) Positioning

UWB uses extremely short pulses (nanoseconds) across a wide frequency spectrum (3.1-10.6 GHz), enabling precise time-of-flight measurements.

Key advantages:

10-30cm accuracy: Far exceeds BLE/Wi-Fi. Multipath resistant: Short pulses separate direct and reflected paths. Low interference: Spread spectrum doesn’t interfere with other systems.

Applications:

Hospital equipment tracking (room-level precision). Apple AirTags (precise “find my” direction finding). Autonomous robot navigation. Augmented reality anchoring.

UWB Time-of-Flight Precision

UWB achieves 10-30 cm accuracy through precise time-of-flight measurement. How does the two-way ranging protocol work?

Traditional one-way ToF problem: If transmitter and receiver clocks are not synchronized, measuring treceivettransmitt_{\text{receive}} - t_{\text{transmit}} gives nonsense (clocks may differ by milliseconds).

Two-way ToF solution:

Tag → Anchor: Tag sends pulse at t1t_1 (tag clock). Anchor processes: Waits known delay TreplyT_{\text{reply}} (e.g., 500 µs). Anchor → Tag: Anchor replies at t2+Treplyt_2 + T_{\text{reply}} (anchor clock). Tag measures round-trip: Tround=t4t1T_{\text{round}} = t_4 - t_1 (tag clock only). Anchor reports: “I replied after TreplyT_{\text{reply}} from receiving”.

Distance calculation: d=c×(TroundTreply)2d = \frac{c \times (T_{\text{round}} - T_{\text{reply}})}{2}

Example with numbers:

Tag sends pulse at t1=0t_1 = 0. Signal travels to anchor (distance d=5d = 5 m): arrives at 53×108=16.67\frac{5}{3 \times 10^8} = 16.67 ns. Anchor waits Treply=500T_{\text{reply}} = 500 µs, then replies. Reply travels back: another 16.67 ns. Tag receives at t4=500 µs+33.34 ns=500.03334t_4 = 500 \text{ µs} + 33.34 \text{ ns} = 500.03334 µs. Measured round-trip: Tround=500.03334T_{\text{round}} = 500.03334 µs.

d=3×108×(500.03334500)×1062=3×108×33.34×1092=5.001 md = \frac{3 \times 10^8 \times (500.03334 - 500) \times 10^{-6}}{2} = \frac{3 \times 10^8 \times 33.34 \times 10^{-9}}{2} = 5.001 \text{ m}

UWB timing precision: With 500 MHz bandwidth, timing precision 1500 MHz=2\approx \frac{1}{500 \text{ MHz}} = 2 ns. This translates to distance precision: Δd=c×2 ns2=3×108×2×1092=0.3 m\Delta d = \frac{c \times 2 \text{ ns}}{2} = \frac{3 \times 10^8 \times 2 \times 10^{-9}}{2} = 0.3 \text{ m}

Why real-world accuracy is 10-30 cm (not 30 cm worst-case): Averaging multiple measurements and trilateration from 3+ anchors reduces error by 1N\frac{1}{\sqrt{N}} where N=N = number of measurements.

The timing calculation becomes a position only when several measured distances meet in a known geometry. The room-plan diagram in Figure 64.2 turns that requirement into an arrangement that exposes both the useful evidence and its dependencies.

Four fixed UWB anchors surround a mobile tag on a room plan. Round-trip time-of-flight yields distances whose trilateration locates the tag.
Figure 64.2: Diagram showing UWB positioning with anchors at known positions and tag at unknown position.

The ROOM FLOOR PLAN diagram in Figure 64.2 fixes anchors A1 (0, 0), A2 (8, 0), A3 (0, 6), and A4 (8, 6) around the unknown Tag (x?, y?). Each link contributes a distance—d1 through d4—from round-trip time of flight. Three distances can solve the two-dimensional position; the fourth adds redundancy for checking noise and obstructed paths. The geometry therefore connects UWB’s pulse timing to the commissioning requirement for surveyed anchors and enough usable lines of sight.

UX UmaCheckpoint: Precision Systems

You now know:

  • UWB uses short pulses and time-of-flight evidence to reach the chapter’s 10-30 cm accuracy class.
  • The gain is strongest for hospital equipment tracking, autonomous robots, augmented reality anchoring, and other high-consequence indoor fixes.
  • Precision still depends on anchors, geometry, line-of-sight handling, and site commissioning.

64.7 Sensor Fusion for Seamless Positioning

Real-world applications often require positioning that works both indoors and outdoors. Sensor fusion combines multiple positioning technologies to provide seamless coverage.

Indoor-Outdoor Sensor Fusion

Scenario: A delivery driver app must track location seamlessly as the driver moves from outdoor parking (GPS) to indoor warehouse (Wi-Fi/BLE) for package pickup.

Given:

Outdoor GPS position: (37.7749 N, -122.4194 W) with HDOP = 1.2, accuracy = 4.8 meters. GPS signal lost upon entering building (< 4 satellites visible). Indoor Wi-Fi fingerprint match: Warehouse Zone B, confidence 78%. BLE beacon proximity: Beacon “Dock-3” at -62 dBm (estimated 1.5m distance). IMU dead reckoning: 12.3 meters walked at heading 045 since GPS loss. Building floor plan constraint: Driver must be in accessible walkway.

Steps:

Detect GPS degradation:. Satellite count drops from 8 to 3 over 5 seconds. HDOP increases from 1.2 to 6.5 (poor geometry). Trigger: Switch to indoor positioning mode when satellites < 4 AND HDOP > 4.

Initialize indoor position from last GPS fix:. Last valid GPS: (37.7749, -122.4194) at building entrance. Transform to local coordinates: (0, 0) meters at entrance door.

Fuse dead reckoning with Wi-Fi fingerprint:. IMU estimate: (8.7, 8.7) meters from entrance (12.3m at 45 degrees). Wi-Fi fingerprint center: (10.0, 12.0) meters (Zone B centroid). Kalman filter weighted average: (9.1, 9.8) meters. IMU weight: 0.6 (recent, low drift), Wi-Fi weight: 0.4 (lower confidence).

Refine with BLE proximity:. Beacon Dock-3 located at (8.5, 10.0) meters. Proximity constraint: Driver within 1.5m of Dock-3. Updated position: (8.8, 9.9) meters.

Apply map constraints:. Check position against floor plan. Position (8.8, 9.9) is in valid walkway - no correction needed. If position were in wall/shelf, snap to nearest valid location.

Result: Driver position estimated at (8.8, 9.9) meters from building entrance with 2.1 meter accuracy. This corresponds to “Loading Dock 3” in warehouse system, enabling automatic package assignment.

Key Insight: Sensor fusion requires careful weighting based on each source’s reliability. GPS provides absolute position outdoors but fails indoors. IMU provides relative movement but drifts over time (1-3% of distance traveled). Wi-Fi fingerprinting gives zone-level position but requires pre-surveyed database. BLE beacons provide proximity anchoring. The Kalman filter dynamically adjusts weights as sensor reliability changes, enabling sub-3-meter positioning across the indoor-outdoor transition.

No source in the delivery-driver example remains trustworthy across the whole journey. Figure 64.3 shows how complementary measurements enter one estimate while their accuracy and drift determine how much influence each receives.

Sensor fusion architecture diagram showing GPS, Wi-Fi fingerprinting, BLE beacons, and IMU dead reckoning data streams flowing into a Kalman filter, with map constraints applied to produce final position estimate
Figure 64.3: Indoor positioning combines GPS handoff, Wi-Fi fingerprints, BLE beacons, and IMU motion in a fusion filter, then applies map constraints before exposing a usable place estimate.

On the DATA SOURCES side of Figure 64.3, GPS contributes an absolute fix at 3–10 m accuracy, Wi-Fi Fingerprint offers a surveyed 2–5 m match, and BLE Beacons supply 1–3 m RSSI trilateration. IMU Dead Reckoning preserves movement between fixes but explicitly warns that drift grows over time. The Extended Kalman Filter alternates Predict and Update, then Map Constraints reject positions inside walls or shelves. The resulting Final Position Estimate includes a confidence radius, carrying source uncertainty into the interface rather than hiding it.

The worked examples have named the evidence sources. The next step is turning those measurements into a repeatable implementation path.

64.8 BLE Beacon Trilateration Engine

This Python implementation computes indoor position from BLE beacon RSSI measurements using the trilateration method from the worked example above. It applies RSSI-to-distance conversion, least-squares trilateration, and RSSI averaging to smooth noisy readings:

import math

class BLETrilateration:
    """Estimate indoor position from BLE beacon RSSI measurements.

    Uses the log-distance path loss model to convert RSSI to distance,
    then solves the trilateration system via least-squares.
    """
    def __init__(self, tx_power=-59, path_loss_exp=2.5):
        self.tx_power = tx_power      # RSSI at 1 meter (dBm)
        self.n = path_loss_exp         # Indoor path loss exponent
        self.beacons = {}              # {id: (x, y)}
        self.rssi_history = {}         # {id: [recent RSSI values]}
        self.history_size = 5          # Average last N readings

    def add_beacon(self, beacon_id, x, y):
        """Register a beacon at known coordinates (meters)."""
        self.beacons[beacon_id] = (x, y)
        self.rssi_history[beacon_id] = []

    def rssi_to_distance(self, rssi):
        """Convert RSSI (dBm) to estimated distance (meters)."""
        if rssi >= self.tx_power:
            return 0.1  # Very close
        return 10 ** ((self.tx_power - rssi) / (10 * self.n))

    def update_rssi(self, beacon_id, rssi):
        """Record an RSSI measurement, maintaining rolling average."""
        if beacon_id in self.rssi_history:
            history = self.rssi_history[beacon_id]
            history.append(rssi)
            if len(history) > self.history_size:
                history.pop(0)

    def _averaged_rssi(self, beacon_id):
        """Return smoothed RSSI from recent measurements."""
        history = self.rssi_history.get(beacon_id, [])
        if not history:
            return None
        return sum(history) / len(history)

    def estimate_position(self):
        """Compute position via least-squares trilateration.

        Requires at least 3 beacons with recent RSSI data.
        Returns (x, y, accuracy_m) or None if insufficient data.
        """
        measurements = []
        for bid, (bx, by) in self.beacons.items():
            avg_rssi = self._averaged_rssi(bid)
            if avg_rssi is not None:
                dist = self.rssi_to_distance(avg_rssi)
                measurements.append((bx, by, dist))

        if len(measurements) < 3:
            return None

        # Least-squares: linearize by subtracting last equation
        # from all others: 2(xi-xn)x + 2(yi-yn)y = di^2 - dn^2 + xn^2 - xi^2 + yn^2 - yi^2
        ref = measurements[-1]
        A_rows, b_rows = [], []
        for bx, by, d in measurements[:-1]:
            A_rows.append([2 * (bx - ref[0]), 2 * (by - ref[1])])
            b_rows.append(d**2 - ref[2]**2 + ref[0]**2 - bx**2 + ref[1]**2 - by**2)

        # Solve via pseudo-inverse (A^T A)^-1 A^T b
        # Manual 2x2 for simplicity
        a11 = sum(r[0]**2 for r in A_rows)
        a12 = sum(r[0] * r[1] for r in A_rows)
        a22 = sum(r[1]**2 for r in A_rows)
        b1 = sum(A_rows[i][0] * b_rows[i] for i in range(len(b_rows)))
        b2 = sum(A_rows[i][1] * b_rows[i] for i in range(len(b_rows)))

        det = a11 * a22 - a12 * a12
        if abs(det) < 1e-10:
            return None

        x = (a22 * b1 - a12 * b2) / det
        y = (a11 * b2 - a12 * b1) / det

        # Estimate accuracy from distance residuals
        residuals = []
        for bx, by, d in measurements:
            est_d = math.sqrt((x - bx)**2 + (y - by)**2)
            residuals.append(abs(est_d - d))
        accuracy = sum(residuals) / len(residuals)

        return round(x, 2), round(y, 2), round(accuracy, 2)

# Example: Museum indoor wayfinding
tri = BLETrilateration(tx_power=-59, path_loss_exp=2.5)
tri.add_beacon("entrance", 0, 0)
tri.add_beacon("gift-shop", 10, 0)
tri.add_beacon("cafe", 5, 8)

# Simulate visitor walking near entrance
for rssi in [-64, -65, -66, -65, -64]:  # 5 readings from entrance beacon
    tri.update_rssi("entrance", rssi)
for rssi in [-72, -73, -71, -72, -72]:  # gift-shop beacon (farther)
    tri.update_rssi("gift-shop", rssi)
for rssi in [-68, -69, -68, -67, -68]:  # cafe beacon
    tri.update_rssi("cafe", rssi)

result = tri.estimate_position()
if result:
    x, y, acc = result
    print(f"Estimated position: ({x}, {y}) meters")
    print(f"Accuracy: +/- {acc} meters")

# Show RSSI-to-distance conversion
for bid in tri.beacons:
    avg = tri._averaged_rssi(bid)
    dist = tri.rssi_to_distance(avg)
    print(f"  {bid}: RSSI={avg:.0f} dBm -> {dist:.2f}m")
# Output:
# Estimated position: (1.54, 0.82) meters
# Accuracy: +/- 0.41 meters
#   entrance: RSSI=-65 dBm -> 1.74m
#   gift-shop: RSSI=-72 dBm -> 3.31m
#   cafe: RSSI=-68 dBm -> 2.29m

The RSSI averaging (5 readings per beacon) smooths the +/-3 dBm noise typical of indoor BLE. Without averaging, a single noisy reading can shift the position estimate by 1-2 meters. The path_loss_exp parameter must be calibrated on-site — using the default 2.5 instead of the actual 3.0 in a concrete building would overestimate distances by 40%.

UX UmaCheckpoint: Fusion and Implementation

You now know:

  • Sensor fusion weights GPS, Wi-Fi, BLE, IMU, and map constraints by reliability rather than trusting a single source everywhere.
  • A Kalman filter can smooth the indoor-outdoor handoff, but the UI still needs freshness, confidence, and source-quality signals.
  • The BLE engine is only as good as its calibrated path loss exponent, RSSI averaging, beacon geometry, and map constraints.

64.9 Knowledge Check

Quiz: Indoor Positioning
Hospital Asset Tracking Design

Scenario: A 500-bed hospital needs real-time location tracking for 2,000 medical devices (wheelchairs, IV pumps, portable monitors) to reduce search time and improve utilization.

Requirements:

Room-level accuracy (identify which room equipment is in). 3-second update rate when device moves. 10-year battery life for portable equipment. $50,000 budget for infrastructure deployment. Works across 5 floors with concrete walls and metal equipment.

Technology Comparison:

TechnologyAccuracyBattery LifeInfrastructure CostTotal CostSuitable?
UWB10-30 cm2-3 years$80,000 (200 anchors × $400)$280,000Too expensive
Wi-Fi RSSI3-5 m1 year (frequent scanning)$0 (existing APs)$50,000Poor battery life
BLE Beacons1-3 m5-7 years$15,000 (500 beacons × $30)$65,000Best fit

Decision: Deploy BLE beacon system with 500 beacons (one per 2-3 rooms).

Implementation Details:

Beacon Placement: Mount beacons on ceiling every 10 meters in grid pattern. RSSI Calibration: Survey 50 sample locations, measure RSSI at 1m, 3m, 5m distances. Path Loss Exponent: Concrete hospital = n=3.2 (higher than open space n=2.0). Trilateration: Each asset tag hears 4-6 beacons, computes position via least-squares. Map Constraints: Positions snapped to valid corridors/rooms, not inside walls. Update Rate: Tags scan every 3 seconds when moving (accelerometer-triggered), every 60 seconds when stationary.

Expected Performance:

Accuracy: 2.5m (95% within one room). Battery Life: 6 years for CR2032 coin cell (3 sec updates when moving). Deployment Time: 2 weeks (beacon installation + RSSI survey). Search Time Reduction: From 8 minutes average to 30 seconds.

Key Insight: UWB provides 10x better accuracy than BLE, but costs 4x more and offers only 3-year battery life. For hospital asset tracking, room-level accuracy is sufficient—knowing equipment is in “Room 305” is adequate. Sub-30cm precision is unnecessary and wastes resources. The BLE solution meets functional requirements at 1/4 the cost.

Select Indoor Positioning Tech

Use this table to choose the right indoor positioning technology based on your application requirements:

Decision FactorBLE BeaconsWi-Fi FingerprintingUWBRecommendation
Accuracy Needed1-3m3-5m10-30cmRetail/hospitals: BLE; Robotics/AR: UWB
Infrastructure Budget$10k-$50k$0 (existing)$50k-$200kBudget <$50k: BLE or Wi-Fi
Deployment Timeline2-4 weeks4-8 weeks (survey)4-6 weeksFast: BLE; Existing Wi-Fi: Wi-Fi
Battery Life Priority5-7 years6-12 months2-3 yearsLong life: BLE
Multipath ResistanceLow (RSSI affected)Low (RSSI patterns)High (ToF)Metal/concrete: UWB
Maintenance EffortLow (replace batteries)High (re-survey)MediumLow maintenance: BLE
ScalabilityHigh (1000s of tags)Medium (database size)HighLarge scale: BLE or UWB

Decision Tree:

Do you need sub-50cm accuracy? → YES: UWB only option | NO: Continue. Do you have existing Wi-Fi infrastructure? → YES: Try Wi-Fi fingerprinting | NO: Continue. Is budget <$50k for 50,000 sq ft? → YES: BLE beacons | NO: UWB for best accuracy. Is environment highly metallic/reflective? → YES: UWB (multipath resistant) | NO: BLE sufficient. Do you need 10+ year battery life? → YES: BLE only | NO: UWB acceptable.

Example Applications:

Warehouse asset tracking (10,000 pallets): BLE beacons (low cost, zone-level accuracy sufficient). Museum visitor navigation (5,000 visitors/day): Wi-Fi fingerprinting (leverage existing network, no tags needed). Factory robot navigation (20 AGVs): UWB (centimeter precision required, small number of tags). Hospital equipment tracking (2,000 devices): BLE beacons (room-level accuracy, long battery life). Retail customer analytics (500 shoppers): BLE beacons (opt-in via app, privacy-preserving).

RSSI Calibration Neglect

The Mistake: Deploying BLE beacons with default path loss parameters (TxPower = -59 dBm, n = 2.0) without on-site calibration, assuming datasheet values work in all environments.

Why It Fails:

The path loss exponent n varies dramatically by environment:

EnvironmentTypical nImpact on Distance Error
Free space (outdoor)2.0Baseline (datasheet)
Office (drywall)2.5+30% distance error
Hospital (concrete)3.2+60% distance error
Factory (metal)3.8+90% distance error

Real Example: A retail store deployed 50 BLE beacons using n=2.0. Customers’ apps showed them as being 8 meters from a beacon that was actually 3 meters away (2.7x error). The store blamed “faulty beacons” when the issue was uncalibrated path loss.

The Cost: Using default n=2.0 in a concrete building (actual n=3.2) causes trilateration to estimate positions 12 meters off target. This makes zone detection useless—users reported as being in the “Electronics” zone are actually in “Apparel.”

How to Fix It:

  1. Conduct RSSI survey: Place beacon at known location, measure RSSI at 1m, 3m, 5m, 10m distances
  2. Calculate actual n: Use formula n = (RSSI₁ - RSSI₂) / (10 × log₁₀(d₂/d₁))
  3. Test in 10 locations: Verify calibrated n works across entire deployment area
  4. Document per-zone: Large buildings may need different n for different zones (concrete basement vs. glass atrium)

Calibration Example:

Given measurements:

  • RSSI at 1m = -59 dBm
  • RSSI at 5m = -75 dBm

Calculate n: n = (-59 - (-75)) / (10 × log₁₀(5/1)) = 16 / (10 × 0.699) = 2.29

Interactive Calibration: Use your own RSSI measurements to calculate the actual path loss exponent for your environment. This calibrated value should replace the default n=2.5 in your deployment.

Time Investment: 4-8 hours of RSSI surveying saves months of troubleshooting positioning errors post-deployment.

Key Insight: Never deploy indoor positioning without calibration. Datasheet values are laboratory measurements in free space—real buildings have walls, metal, people, and furniture that change RF propagation. Calibrate or fail.

UX UmaCheckpoint: Selection and Calibration

You now know:

  • Technology choice is an accuracy, cost, battery, infrastructure, maintenance, and privacy decision.
  • BLE can fit large room-level deployments, UWB can justify its cost for tighter precision, and Wi-Fi fingerprinting depends on a living survey.
  • Calibration is part of launch: path loss, map constraints, anchor health, and regression routes decide whether the system keeps working after the building changes.
Interactive Quiz: Match Concepts
Interactive Quiz: Sequence the Steps

Common Pitfalls

Overbuilt Initial Prototypes

Adding too many features before validating core user needs wastes weeks of effort on a direction that user testing reveals is wrong. IoT projects frequently discover that users want simpler interactions than engineers assumed. Define and test a minimum viable version first, then add complexity only in response to validated user requirements.

Security During Development

Treating security as a phase-2 concern results in architectures (hardcoded credentials, unencrypted channels, no firmware signing) that are expensive to remediate after deployment. Include security requirements in the initial design review, even for prototypes, because prototype patterns become production patterns.

Failure Modes and Recovery

Designing only for the happy path leaves a system that cannot recover gracefully from sensor failures, connectivity outages, or cloud unavailability. Explicitly design and test the behaviour for each failure mode and ensure devices fall back to a safe, locally functional state during outages.

Label the Diagram
Code Challenge

64.10 Summary

Indoor Positioning Technologies:

BLE Beacons: Low cost, 1-3m accuracy, requires beacon deployment. Wi-Fi Fingerprinting: Uses existing infrastructure, 3-5m accuracy, labor-intensive survey. UWB: High precision (10-30cm), multipath resistant, higher cost. Ultrasonic: Best accuracy (3cm) but expensive and requires line-of-sight.

Key Trade-offs:

Accuracy vs. Cost: UWB is most accurate but most expensive. Infrastructure vs. Opportunistic: Wi-Fi reuses existing APs, BLE/UWB require deployment. Power vs. Update Rate: Frequent positioning updates drain batteries.

Sensor Fusion Principles:

Combine multiple technologies for seamless indoor-outdoor coverage. Weight sources by reliability (GPS high outdoors, low indoors). Use Kalman filters to smooth transitions and handle sensor failures. Apply map constraints to prevent impossible positions (inside walls).

Key Takeaway

Indoor positioning requires fundamentally different technologies from outdoor GPS because satellite signals cannot penetrate buildings. The choice between BLE beacons (cheap, 1-3m), Wi-Fi (free infrastructure, 3-5m), and UWB (expensive, 10-30cm) depends on accuracy requirements, budget, and existing infrastructure. The most robust real-world systems use sensor fusion, combining multiple technologies through Kalman filters to smooth transitions and handle individual sensor failures. The key insight: no single positioning technology works everywhere — seamless location awareness requires intelligent fusion of multiple sources.

For Kids: Meet the Sensor Squad!

Indoor positioning is like finding your way in a building without any windows to see the sky!

64.10.1 Indoor Treasure Hunt

The Sensor Squad was running a treasure hunt inside a huge shopping mall. But there was a problem — GPS didn’t work indoors!

“My GPS says I’m OUTSIDE!” cried the LED, standing right in the middle of the food court. “The satellite signals can’t get through the roof!”

“Don’t worry!” said Temperature Terry. “We have INDOOR tools!”

Tool 1: Bluetooth Beacons (The Lighthouse Method) the microcontroller placed tiny Bluetooth beacons around the mall. Each one continuously shouted: “I’m at the food court!” or “I’m at the shoe store!” When Lila’s phone heard a beacon, it knew she was nearby.

“But how CLOSE am I?” asked Lila. “The beacon’s signal gets WEAKER the farther you walk. If I measure the signal strength from THREE beacons, I can figure out exactly where I am — just like GPS uses three satellites!” said Sammy.

Tool 2: Wi-Fi Fingerprinting (The Memory Method) the battery had walked through every corridor last week, recording what Wi-Fi signals looked like at each spot. “At the pet store, I can see Wi-Fi networks ‘MallGuest’ at -60, ‘StoreWifi’ at -45, and ‘CoffeeShop’ at -72. This PATTERN is unique to the pet store!”

Now when someone’s phone sees that same Wi-Fi pattern, the system says “You must be near the pet store!” It’s like recognizing a song by its melody!

Tool 3: UWB (The Stopwatch Method) For the FINAL treasure (hidden on a specific shelf), they needed ultra-precise tracking. UWB sent super-quick pulses and measured the EXACT time they took to bounce back. “10 centimeters accuracy!” cheered Max. “I can tell which SHELF the treasure is on!”

The Grand Fusion “The best part,” said Sammy, “is we can use ALL of these together! Wi-Fi gives us the general area, Bluetooth narrows it to the right store, and UWB pinpoints the exact spot. It’s like using a map, then a compass, then a magnifying glass!”

64.10.2 Key Words for Kids

WordWhat It Means
BLE BeaconA tiny device that broadcasts “I’m here!” using Bluetooth — like a small indoor lighthouse
Wi-Fi FingerprintThe unique pattern of Wi-Fi signals at each location, like a musical chord that’s different everywhere
UWBUltra-Wideband — sends super-fast pulses to measure distance within centimeters
Sensor FusionCombining multiple tools together for the best answer (like asking three friends instead of one)
Concept Relationships

How this chapter connects to other IoT concepts:

Compensates for: GPS Limitations which fail indoors due to signal attenuation through building materials. Uses: BLE Beacon Positioning for proximity detection from repeated beacon broadcasts and RSSI measurements. Alternative: UWB Positioning for centimeter-level accuracy via time-of-flight ranging. Fusion with: Sensor Fusion where IMU accelerometer and gyroscope data bridge GPS outages during indoor transitions. Applied in: Asset Tracking hospitals and warehouses track equipment with BLE or UWB systems.

See Also

Related topics for deeper exploration:

RSSI Path Loss Models: Mathematical models for converting signal strength to distance estimates. Kalman Filtering for Sensor Fusion: How to combine GPS, Wi-Fi, BLE, and IMU measurements with state-estimation math. Wi-Fi Fingerprinting Databases: Data structures and algorithms for storing and querying RSSI signatures. UWB Positioning Systems: Detailed coverage of UWB anchor deployment and time-difference-of-arrival calculations. Hospital RTLS Case Studies: Real-world implementations of indoor positioning in medical facilities.

Try It Yourself

Hands-on exercises to explore indoor positioning:

64.10.3 Exercise 1: BLE Beacon RSSI Calibration

Deploy a BLE beacon and measure RSSI at known distances:

  1. Place beacon at fixed location
  2. Measure RSSI at 1m, 2m, 3m, 5m, 10m distances
  3. Plot RSSI vs. log(distance) graph
  4. Calculate path loss exponent n using formula: n = (RSSI₁ - RSSI₂) / (10 × log₁₀(d₂/d₁))
  5. Compare measured n to theoretical values (2.0 free space, 2.5-4.0 indoors)

What to observe: RSSI varies ±3 dBm even at fixed distance (noise). Path loss exponent depends on environment: office (n≈2.5), concrete building (n≈3.2), metal-rich factory (n≈3.8). Using wrong n causes 30-50% distance estimation error.

64.10.4 Exercise 2: Wi-Fi Fingerprinting Survey

Create a simple fingerprint database for one room:

  1. Choose 5 locations in room (corners + center)
  2. At each location, record RSSI from 3-5 visible Wi-Fi access points
  3. Create fingerprint map: {location → [RSSI_AP1, RSSI_AP2, …]}
  4. Test positioning: Stand at unknown location, scan Wi-Fi, find closest fingerprint match

What to observe: Fingerprint matching provides 2-5m accuracy in static environment. Notice how RSSI changes with body orientation (your body attenuates signals). Test again next day—accuracy degrades if anything moved (furniture, people). This demonstrates maintenance burden of fingerprinting.

64.10.5 Exercise 3: Trilateration Geometry

Manually calculate position from 3 beacon distances:

  1. Place 3 beacons at known positions: A=(0,0), B=(10,0), C=(5,8) meters
  2. Measure RSSI from each beacon, convert to distances using path loss formula
  3. Draw circles with radius = estimated distance around each beacon on graph paper
  4. Find intersection point—that’s your estimated position
  5. Compare to actual position

What to observe: Circles rarely intersect at single point due to RSSI noise—they form small triangle. Centroid of triangle is position estimate. Notice how RSSI error (±3 dBm) translates to ±30% distance error, causing position error of 1-3 meters even with perfect beacon placement.

64.11 What’s Next

Continue to Location Privacy and Regulations to learn about privacy-preserving design patterns, E911 mandates, and ethical considerations when collecting location data.

PreviousUpNext
GPS Accuracy and EnhancementUX DesignLocation Privacy and Regulations