liveBook · Manning

Accelerometer

As explained in Web Components in Action

An accelerometer is a sensor that measures linear acceleration along one or more axes.

An accelerometer measures a phone’s linear acceleration: how quickly it moves in a particular direction. In immersive interfaces, its readings help track head movement. section 15.2

It works alongside a gyroscope and magnetometer. Sensor fusion combines their measurements to estimate how the user’s head moves through the real world and update a 3D scene. section 15.2

Phone-based virtual reality

Place a phone in a simple headset and look around. The accelerometer contributes movement information while the gyroscope measures rotation and the magnetometer supplies compass direction, enabling head-controlled viewing. section 15.2

How Web Components in Action covers it

How deep it goes
Defines directional movement detection and its role in sensor fusion, but defers the mathematics and code of sensor fusion.
Examples
Demonstrates phone-based head movement in a cardboard virtual-reality headset.
What you can do after
Evaluate how phone sensors contribute to head tracking and immersive 3D viewing.
How it connects
Connects accelerometers with gyroscopes, magnetometers, sensor fusion, head tracking, and 3D scenes.

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.