← Back to release summary

GravitySensor API

Category
Capabilities (Fugu)
Type
Chromium catches up
Status
Enabled by default (Chrome 91)
Intent stage
Shipped

Summary

Expose the GravitySensor API, which provides a 3-axis reading of the gravity force, to users.

Motivation

A gravity sensor is used to measure the force of gravity around the x, y, z axes. As https://crbug.com/1163993 states, it is already possible for users to manually derive readings close to a GravitySensor’s by manually inspecting an Accelerometer and a LinearAccelerometer’s readings, but this can be cumbersome and depend on the accuracy of the values provided by those sensors. Platforms such as Android can provide gravity readings as part of the platform, which should be cheaper in terms of computation, provide more accurate values depending on the user’s hardware and easier to use in terms of API ergonomics.

Standards & signals

Explainers: https://github.com/arskama/GravitySensor/blob/main/explainer.md

View on chromestatus.com