Sensor Applications · Study deck

Mobile Sensor APIs: Positioning and Filtering

A phone reports a location, but the number may combine several radios, cached state, and motion estimates.

Physics Phoebe is your guide for this deck.

mobile-sensingweb-apispermissions
Physics Phoebe, the module guide, in a scene from this chapter.
iotclass.org

After studying this chapter

Learning objectives

You will be able to:

  • compare indoor positioning evidence and accuracy claims
  • apply Kalman and particle-filter reasoning without hiding uncertainty
  • Explain: The team must identify where the fix came from and decide how filtering can reduce noise without pretending uncertainty disappeared.
  • Explain: A mobile phone waits on a rail platform beside glass, steel, and a roof.
iotclass.org

Major section

Start With the Situation

The team must identify where the fix came from and decide how filtering can reduce noise without pretending uncertainty disappeared.

  • A phone reports a location, but the number may combine several radios, cached state, and motion estimates.
  • An application programming interface is the software boundary that gives the mobile app a location result.
  • For mobile positioning, this API result still needs a source, time, and stated uncertainty.
iotclass.org

Major section

Solve a Noisy Station-Platform Fix

A mobile phone waits on a rail platform beside glass, steel, and a roof.

  • Wi-Fi signals change as trains arrive.
  • The mobile positioning API still returns one point, but that sensor reading is an estimate, not a pin in the floor.
  • Their sum is 15.24 m².
  • The mobile fix also has an age.

Why it matters

Position filtering can reduce scatter, but a fixed location bias stays.

iotclass.org

Major section

Solve a Noisy Station-Platform Fix (continued)

The six squared terms for mobile positioning are 2.25, 2.25, 9.00, 0.49, 1.00, and 0.25 m².

  • The root is 15.24=3.90 m\sqrt{15.24}=3.90\ \text{m}15.24​=3.90 m.
  • A satellite fix and a Wi-Fi fix can have unlike errors, and one mobile filter setting should not hide that switch.
  • Simply adding the sensor errors gives 8.2 m.
iotclass.org

Major section

Solve a Noisy Station-Platform Fix (continued)

The stated positioning model instead uses root-sum-square.

  • A position from 20 seconds ago can be stale.
  • The mobile system must treat that moving-train fix as old.
  • The filtered location record should keep its measurement time.
  • It should also keep the named sensor source.
iotclass.org

Major section

Solve a Noisy Station-Platform Fix (continued)

If dots scatter on both sides, filtering may help.

  • A satellite fix and a Wi-Fi fix can have unlike errors, and one mobile filter setting should not hide that switch.
  • For mobile positioning, a simple position filter can calm random jumps.
  • A walking model can reject a sudden one-kilometre leap.
iotclass.org

Major section

Solve a Noisy Station-Platform Fix (continued)

During mobile filtering, if every location dot sits 12 m east, averaging keeps it east.

  • The Bat example uses radio to start the clock.
  • Its one-way sound pulse differs from an echo that travels out and back.
  • The median is 11 m, so one large mobile outlier is held back.
iotclass.org

Major section

Concept Relationships

The measurement question determines which phone signal matters, and the API family exposes that signal through a controlled path.

  • Platform support and permission state together decide whether collection can proceed on a target device.
  • Data-quality evidence then explains what the resulting reading can support.
  • Lifecycle requirements distinguish when browser access is sufficient from when native integration is justified.
iotclass.org

Deck summary

Key takeaways

The team must identify where the fix came from and decide how filtering can reduce noise without pretending uncertainty disappeared.

  • A mobile phone waits on a rail platform beside glass, steel, and a roof.
  • The six squared terms for mobile positioning are 2.25, 2.25, 9.00, 0.49, 1.00, and 0.25 m².
  • The stated positioning model instead uses root-sum-square.
  • If dots scatter on both sides, filtering may help.
iotclass.org

Retrieval practice

Recall check 1 of 3

Physics Phoebe says: answer from memory, then check your reasoning.

Q1A phone reports that a worker is in a room using a nearby beacon. What accuracy claim is justified?

AA precise building-wide coordinate inferred from one nearby beacon.
BA coarse beacon-proximity claim checked against the real room.
CA gap-free movement trail inferred from one phone proximity report.
DAn uncertainty-free location merely because an API returned data.
Show answer

Answer: B Hearing a beacon does not by itself give a precise position fix.

iotclass.org

Retrieval practice

Recall check 2 of 3

Physics Phoebe says: answer from memory, then check your reasoning.

Q2A tracker must respect walls in a floorplan. Which filter is a better fit, and how should the result be reported?

AUse a particle filter and report position with its uncertainty.
BAverage coordinates and call the resulting point exact ground truth.
CDiscard uncertainty after each update so the position looks definite.
DUse a linear Kalman model and claim exact position through walls.
Show answer

Answer: A Particles can reject paths through walls while preserving several plausible positions.

iotclass.org

Retrieval practice

Recall check 3 of 3

Physics Phoebe says: answer from memory, then check your reasoning.

Q3A learner builds a browser page that records a phone location for an inspection note. The page stores latitude and longitude but not accuracy, timestamp, permission state, or what happens if permission is denied. What is the strongest review feedback?

AThe plan is complete because latitude and longitude are the only fields that matter
BMark the record incomplete until context and failure handling are added
CThe plan should switch to native mobile access before documenting the measurement question
DThe plan should remove user permission handling because permissions are only a browser implementation detail
Show answer

Answer: B A mobile sensor API plan is reviewable only when the reading, permission state, context, uncertainty, and failure path are documented.

iotclass.org

Print reference

Answers

Answer key.

  1. B · Hearing a beacon does not by itself give a precise position fix.
  2. A · Particles can reject paths through walls while preserving several plausible positions.
  3. B · A mobile sensor API plan is reviewable only when the reading, permission state, context, uncertainty, and failure path are documented.
iotclass.org