liveBook · Manning

Sensor fusion algorithm

As explained in Web Components in Action

A sensor fusion algorithm combines measurements from multiple sensors to estimate motion or orientation more accurately.

How does a phone know which way your head is moving in a VR scene? Its accelerometer measures motion, its gyroscope measures rotation, and its magnetometer supplies compass direction. A sensor fusion algorithm combines those readings to estimate head movement. section 15.2

That estimate can steer the viewpoint in a 3D scene: instead of dragging a mouse to look around, you move your head. Slightly different views shown to each eye create a stereo effect. Sensor fusion supplies the tracking; it does not, by itself, render the scene. The math and code for fusion are left aside here. section 15.2

How Web Components in Action covers it

How deep it goes
Defines the contributing sensors and their combined purpose, but leaves the fusion math and code aside.
Examples
Uses a phone tracking head movement for a split-screen VR scene as the concrete case.
What it assumes
Defines the three phone sensors by function and uses mouse-driven 3D navigation as a familiar comparison.
What you can do after
Evaluate/understand how multiple phone sensors contribute to head tracking, without implementing a fusion algorithm.
How it connects
Connects accelerometers, gyroscopes, and magnetometers to head tracking, stereo 3D scenes, and Web Components.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Web Components in Action. The section links point to the parts of the book it draws on.