# Accelerometer

## Editor’s Draft, 1 January 1970

This version:
  https://w3c.github.io/accelerometer/
Latest published version:
  https://www.w3.org/TR/accelerometer/
Previous Versions:
  https://www.w3.org/TR/2019/WD-accelerometer-20190307/
Version History:
  https://github.com/w3c/accelerometer/commits/master/index.bs
Feedback:
  public-device-apis@w3.org with subject line “`[accelerometer] … message topic …`” (archives)
Editor:
  Anssi Kostiainen (Intel Corporation)
Former Editor:
  Alexander Shalamov (Intel Corporation)
Bug Reports:
  via the w3c/accelerometer repository on GitHub
Test Suite:
  web-platform-tests on GitHub

Copyright © 1970 W3C® (MIT, ERCIM, Keio, Beihang). W3C liability, trademark and permissive document license rules apply.

## Abstract

This specification defines `Accelerometer`, `LinearAccelerationSensor` and `GravitySensor` interfaces for obtaining information about acceleration applied to the X, Y and Z axis of a device that hosts the sensor.

## Status of this document

This is a public copy of the editors’ draft. It is provided for discussion only and may change at any moment. Its publication here does not imply endorsement of its contents by W3C. Don’t cite this document other than as work in progress.

If you wish to make comments regarding this document, please send them to public-device-apis@w3.org (subscribe, archives). When sending e-mail, please put the text “accelerometer” in the subject, preferably like this: “[accelerometer] …summary of comment…”. All comments are welcome.

This document was produced by the Devices and Sensors Working Group.

This document was produced by a group operating under the W3C Patent Policy. W3C maintains a public list of any patent disclosures made in connection with the deliverables of the group; that page also includes instructions for disclosing a patent. An individual who has actual knowledge of a patent which the individual believes contains Essential Claim(s) must disclose the information in accordance with section 6 of the W3C Patent Policy.

This document is governed by the 1 March 2019 W3C Process Document.

## 1. Introduction

The `Accelerometer`, `LinearAccelerationSensor` and `GravitySensor` APIs extends the Generic Sensor API [GENERIC-SENSOR] interface to provide information about acceleration applied to device’s X, Y and Z axis in local coordinate system defined by device.

## 2. Examples

    let sensor = new Accelerometer();
    sensor.start();

    sensor.onreading = () => {
        console.log("Acceleration along X-axis: " + sensor.x);
        console.log("Acceleration along Y-axis: " + sensor.y);
        console.log("Acceleration along Z-axis: " + sensor.z);
    }

    sensor.onerror = event => console.log(event.error.name, event.error.message);

The following example shows how to use gravity sensor that provides readings in the screen coordinate system. The snippet will print message to the console when the dom screen is perpendicular to the ground and bottom of the rendered web page is pointing downwards.

    let sensor = new GravitySensor({frequency: 5, referenceFrame: "screen"});

    sensor.onreading = () => {
      if (sensor.y >= 9.8) {
        console.log("Web page is perpendicular to the ground.");
      }
    }

    sensor.start();

The following example detects shake gesture along x axis of the device, regardless of the orientation of the dom screen.

    const shakeThreshold = 25;

    let sensor = new LinearAccelerationSensor({frequency: 60});

    sensor.addEventListener('reading', () => {
      if (sensor.x > shakeThreshold) {
        console.log("Shake detected.");
      }
    });

    sensor.start();

## 3. Use Cases and Requirements

The use cases and requirements are listed in the Motion Sensors Explainer and Sensor use cases documents.

## 4. Security and Privacy Considerations

Sensor readings provided by inertial sensors, such as accelerometer, could be used by adversaries to exploit various security threats, for example, keylogging, location tracking, fingerprinting and user identifying.

Research papers published by security community, for instance, [KEYSTROKEDEFENSE], indicate that by throttling the frequency, risks of successful attacks are not fully eliminated, while throttling may greatly affect usefulness of a web application with legitimate reasons to use the sensors.

The [TOUCHSIGNATURES] and [ACCESSORY] research papers propose that implementations can provide visual indication when inertial sensors are in use and/or require explicit user consent to access sensor readings. These mitigation strategies complement the generic mitigations defined in the Generic Sensor API [GENERIC-SENSOR].

## 5. Model

The Accelerometer sensor type’s associated `Sensor` subclass is the `Accelerometer` class.

The Accelerometer has a default sensor, which is the device’s main accelerometer sensor.

The Accelerometer has an associated sensor permission name which is "accelerometer".

A latest reading for a `Sensor` of Accelerometer sensor type includes three entries whose keys are "x", "y", "z" and whose values contain device’s acceleration about the corresponding axes. Values can contain also device’s linear acceleration or gravity depending on which object was instantiated.

The acceleration is the rate of change of velocity of a device with respect to time. Its unit is the metre per second squared (m/s2) [SI].

The frame of reference for the acceleration measurement must be inertial, such as, the device in free fall would provide 0 (m/s2) acceleration value for each axis.

The sign of the acceleration values must be according to the right-hand convention in a local coordinate system (see figure below).

The `LinearAccelerationSensor` class is an `Accelerometer`'s subclass. The `LinearAccelerationSensor`'s latest reading contains device’s linear acceleration about the corresponding axes.

The linear acceleration is an acceleration that is applied to the device that hosts the sensor, without the contribution of a gravity force.

The `GravitySensor` class is an `Accelerometer`'s subclass. The `GravitySensor`'s latest reading contains device’s acceleration due to the effect of gravity force about the corresponding axes.

The gravity is a force that attracts an object to the center of the earth, or towards any other physical object having mass.

### 5.1. Reference Frame

The local coordinate system represents the reference frame for the `Accelerometer`, `LinearAccelerationSensor`, and the `GravitySensor` readings. It can be either the device coordinate system or the screen coordinate system.

The device coordinate system is defined as a three dimensional Cartesian coordinate system (x, y, z), which is bound to the physical device. For devices with a display, the origin of the device coordinate system is the center of the device display. If the device is held in its default position, the Y-axis points towards the top of the display, the X-axis points towards the right of the display and Z-axis is the vector product of X and Y axes and it points outwards from the display, and towards the viewer. The device coordinate system remains stationary regardless of the dom screen orientation (see figure below).

The screen coordinate system is defined as a three dimensional Cartesian coordinate system (x, y, z), which is bound to the dom screen. The origin of the screen coordinate system in the center of the dom screen. The Y-axis always points towards the top of the dom screen, the X-axis points towards the right of the dom screen and Z-axis is the vector product of X and Y axes and it and it points outwards from the dom screen, and towards the viewer (see figure below).

The main difference between the device coordinate system and the screen coordinate system, is that the screen coordinate system always follows the dom screen orientation, i.e. it will swap X and Y axes in relation to the device if the current orientation type changes. In contrast, the device coordinate system will always remain stationary relative to the device.

## 6. API

### 6.1. The Accelerometer Interface

    [SecureContext, Exposed=Window]
    interface Accelerometer : Sensor {
      constructor(optional AccelerometerSensorOptions options = {});
      readonly attribute double? x;
      readonly attribute double? y;
      readonly attribute double? z;
    };

    enum AccelerometerLocalCoordinateSystem { "device", "screen" };

    dictionary AccelerometerSensorOptions : SensorOptions {
      AccelerometerLocalCoordinateSystem referenceFrame = "device";
    };

To construct an `Accelerometer` object the user agent must invoke the construct an accelerometer object abstract operation for the `Accelerometer` interface.

Supported sensor options for `Accelerometer` are "frequency" and "referenceFrame".

#### 6.1.1. Accelerometer.x

The `x` attribute of the `Accelerometer` interface returns the result of invoking get value from latest reading with `this` and "x" as arguments. It represents the acceleration along x-axis.

#### 6.1.2. Accelerometer.y

The `y` attribute of the `Accelerometer` interface returns the result of invoking get value from latest reading with `this` and "y" as arguments. It represents the acceleration along y-axis.

#### 6.1.3. Accelerometer.z

The `z` attribute of the `Accelerometer` interface returns the result of invoking get value from latest reading with `this` and "z" as arguments. It represents the acceleration along z-axis.

### 6.2. The LinearAccelerationSensor Interface

    [SecureContext, Exposed=Window]
    interface LinearAccelerationSensor : Accelerometer {
      constructor(optional AccelerometerSensorOptions options = {});
    };

To construct a `LinearAccelerationSensor` object the user agent must invoke the construct an accelerometer object abstract operation for the `LinearAccelerationSensor` interface.

Supported sensor options for `LinearAccelerationSensor` are "frequency" and "referenceFrame".

#### 6.2.1. LinearAccelerationSensor.x

The `x` attribute of the `LinearAccelerationSensor` interface returns the result of invoking get value from latest reading with `this` and "x" as arguments. It represents the linear acceleration along x-axis.

#### 6.2.2. LinearAccelerationSensor.y

The `y` attribute of the `LinearAccelerationSensor` interface returns the result of invoking get value from latest reading with `this` and "y" as arguments. It represents the linear acceleration along y-axis.

#### 6.2.3. LinearAccelerationSensor.z

The `z` attribute of the `LinearAccelerationSensor` interface returns the result of invoking get value from latest reading with `this` and "z" as arguments. It represents the linear acceleration along z-axis.

### 6.3. The GravitySensor Interface

    [SecureContext, Exposed=Window]
    interface GravitySensor : Accelerometer {
      constructor(optional AccelerometerSensorOptions options = {});
    };

To construct a `GravitySensor` object the user agent must invoke the construct an accelerometer object abstract operation for the `GravitySensor` interface.

Supported sensor options for `GravitySensor` are "frequency" and "referenceFrame".

#### 6.3.1. GravitySensor.x

The `x` attribute of the `GravitySensor` interface returns the result of invoking get value from latest reading with `this` and "x" as arguments. It represents the effect of acceleration along x-axis due to gravity.

#### 6.3.2. GravitySensor.y

The `y` attribute of the `GravitySensor` interface returns the result of invoking get value from latest reading with `this` and "y" as arguments. It represents the effect of acceleration along y-axis due to gravity.

#### 6.3.3. GravitySensor.z

The `z` attribute of the `GravitySensor` interface returns the result of invoking get value from latest reading with `this` and "z" as arguments. It represents the effect of acceleration along z-axis due to gravity.

## 7. Abstract Operations

### 7.1. Construct an accelerometer object

input

  accelerometer_interface, an `Accelerometer` interface identifier or an interface identifier whose inherited interfaces contains `Accelerometer`.

  options, a `AccelerometerSensorOptions` object.

output

  An `Accelerometer` object.

1. Let allowed be the result of invoking check sensor policy-controlled features with Accelerometer.

2. If allowed is false, then:

   1. Throw a `SecurityError` `DOMException`.

3. Let accelerometer be a new instance of the interface identified by accelerometer_interface.

4. Invoke initialize a sensor object with accelerometer and options.

5. If options.`referenceFrame` is "screen", then:

   1. Define local coordinate system for accelerometer as the screen coordinate system.

6. Otherwise, define local coordinate system for accelerometer as the device coordinate system.

7. Return accelerometer.

## 8. Automation

This section extends the automation section defined in the Generic Sensor API [GENERIC-SENSOR] to provide mocking information about the acceleration applied to the X, Y and Z axis of a device that hosts the sensor for the purposes of testing a user agent’s implementation of `Accelerometer`, `LinearAccelerationSensor` and `GravitySensor` APIs.

### 8.1. Mock Sensor Type

The `Accelerometer` class has an associated mock sensor type which is "accelerometer", its mock sensor reading values dictionary is defined as follows:

    dictionary AccelerometerReadingValues {
      required double? x;
      required double? y;
      required double? z;
    };

The `LinearAccelerationSensor` class has an associated mock sensor type which is "linear-acceleration", its mock sensor reading values dictionary is defined as follows:

    dictionary LinearAccelerationReadingValues : AccelerometerReadingValues {
    };

The `GravitySensor` class has an associated mock sensor type which is "gravity", its mock sensor reading values dictionary is defined as follows:

    dictionary GravityReadingValues : AccelerometerReadingValues {
    };

## 9. Acknowledgements

Tobie Langel for the work on Generic Sensor API.

## 10. Conformance

Conformance requirements are expressed with a combination of descriptive assertions and RFC 2119 terminology. The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in the normative parts of this document are to be interpreted as described in RFC 2119. However, for readability, these words do not appear in all uppercase letters in this specification.

All of the text of this specification is normative except sections explicitly marked as non-normative, examples, and notes. [RFC2119]

A conformant user agent must implement all the requirements listed in this specification that are applicable to user agents.

The IDL fragments in this specification must be interpreted as required for conforming IDL fragments, as described in the Web IDL specification. [WEBIDL]

## Index

### Terms defined by this specification

- acceleration, in §5
- Accelerometer
  - (interface), in §6.1
  - definition of, in §5
- Accelerometer(), in §6.1
- AccelerometerLocalCoordinateSystem, in §6.1
- Accelerometer(options), in §6.1
- AccelerometerReadingValues, in §8.1
- AccelerometerSensorOptions, in §6.1
- conformant user agent, in §10
- Construct an accelerometer object, in §7
- constructor()
  - constructor for Accelerometer, in §6.1
  - constructor for GravitySensor, in §6.3
  - constructor for LinearAccelerationSensor, in §6.2
- constructor(options)
  - constructor for Accelerometer, in §6.1
  - constructor for GravitySensor, in §6.3
  - constructor for LinearAccelerationSensor, in §6.2
- "device", in §6.1
- device coordinate system, in §5.1
- gravity, in §5
- GravityReadingValues, in §8.1
- GravitySensor, in §6.3
- GravitySensor(), in §6.3
- GravitySensor(options), in §6.3
- linear acceleration, in §5
- LinearAccelerationReadingValues, in §8.1
- LinearAccelerationSensor, in §6.2
- LinearAccelerationSensor(), in §6.2
- LinearAccelerationSensor(options), in §6.2
- referenceFrame, in §6.1
- "screen", in §6.1
- screen coordinate system, in §5.1
- x
  - attribute for Accelerometer, in §6.1
  - dict-member for AccelerometerReadingValues, in §8.1
- y
  - attribute for Accelerometer, in §6.1
  - dict-member for AccelerometerReadingValues, in §8.1
- z
  - attribute for Accelerometer, in §6.1
  - dict-member for AccelerometerReadingValues, in §8.1

https://w3c.github.io/sensors/#dom-mocksensortype-accelerometer Referenced in:

- 8.1. Mock Sensor Type

https://w3c.github.io/sensors/#dom-mocksensortype-gravity Referenced in:

- 8.1. Mock Sensor Type

https://w3c.github.io/sensors/#dom-mocksensortype-linear-acceleration Referenced in:

- 8.1. Mock Sensor Type

https://w3c.github.io/sensors/#sensor Referenced in:

- 5. Model (2)
- 6.1. The Accelerometer Interface

https://w3c.github.io/sensors/#dictdef-sensoroptions Referenced in:

- 6.1. The Accelerometer Interface

https://w3c.github.io/sensors/#automation Referenced in:

- 8. Automation

https://w3c.github.io/sensors/#check-sensor-policy-controlled-features Referenced in:

- 7.1. Construct an accelerometer object

https://w3c.github.io/sensors/#default-sensor Referenced in:

- 5. Model

https://w3c.github.io/sensors/#device-fingerprinting Referenced in:

- 4. Security and Privacy Considerations

https://w3c.github.io/sensors/#mitigation-strategies Referenced in:

- 4. Security and Privacy Considerations

https://w3c.github.io/sensors/#get-value-from-latest-reading Referenced in:

- 6.1.1. Accelerometer.x
- 6.1.2. Accelerometer.y
- 6.1.3. Accelerometer.z
- 6.2.1. LinearAccelerationSensor.x
- 6.2.2. LinearAccelerationSensor.y
- 6.2.3. LinearAccelerationSensor.z
- 6.3.1. GravitySensor.x
- 6.3.2. GravitySensor.y
- 6.3.3. GravitySensor.z

https://w3c.github.io/sensors/#initialize-a-sensor-object Referenced in:

- 7.1. Construct an accelerometer object

https://w3c.github.io/sensors/#keystroke-monitoring Referenced in:

- 4. Security and Privacy Considerations

https://w3c.github.io/sensors/#latest-reading Referenced in:

- 5. Model (2) (3)

https://w3c.github.io/sensors/#local-coordinate-system Referenced in:

- 1. Introduction
- 5. Model
- 5.1. Reference Frame
- 7.1. Construct an accelerometer object (2)

https://w3c.github.io/sensors/#location-tracking Referenced in:

- 4. Security and Privacy Considerations

https://w3c.github.io/sensors/#mock-sensor-reading-values Referenced in:

- 8.1. Mock Sensor Type (2) (3)

https://w3c.github.io/sensors/#mock-sensor-type Referenced in:

- 8.1. Mock Sensor Type (2) (3)

https://w3c.github.io/sensors/#sensor-permission-names Referenced in:

- 5. Model

https://w3c.github.io/sensors/#sensor-reading Referenced in:

- 4. Security and Privacy Considerations (2)
- 5.1. Reference Frame

https://w3c.github.io/sensors/#sensor-type Referenced in:

- 5. Model (2)

https://w3c.github.io/sensors/#supported-sensor-options Referenced in:

- 6.1. The Accelerometer Interface
- 6.2. The LinearAccelerationSensor Interface
- 6.3. The GravitySensor Interface

https://w3c.github.io/sensors/#user-identifying Referenced in:

- 4. Security and Privacy Considerations

https://infra.spec.whatwg.org/#map-entry Referenced in:

- 5. Model

https://infra.spec.whatwg.org/#map-key Referenced in:

- 5. Model

https://infra.spec.whatwg.org/#map-value Referenced in:

- 5. Model

https://w3c.github.io/permissions/#dom-permissionname-accelerometer Referenced in:

- 5. Model

https://www.w3.org/TR/screen-orientation/#dfn-current-orientation-type Referenced in:

- 5.1. Reference Frame

https://www.w3.org/TR/screen-orientation/#dom-screen Referenced in:

- 2. Examples (2)
- 5.1. Reference Frame (2) (3) (4) (5) (6) (7)

https://heycam.github.io/webidl/#idl-DOMException Referenced in:

- 7.1. Construct an accelerometer object

https://heycam.github.io/webidl/#Exposed Referenced in:

- 6.1. The Accelerometer Interface
- 6.2. The LinearAccelerationSensor Interface
- 6.3. The GravitySensor Interface

https://heycam.github.io/webidl/#SecureContext Referenced in:

- 6.1. The Accelerometer Interface
- 6.2. The LinearAccelerationSensor Interface
- 6.3. The GravitySensor Interface

https://heycam.github.io/webidl/#securityerror Referenced in:

- 7.1. Construct an accelerometer object

https://heycam.github.io/webidl/#idl-double Referenced in:

- 6.1. The Accelerometer Interface (2) (3)
- 8.1. Mock Sensor Type (2) (3)

https://heycam.github.io/webidl/#dfn-identifier Referenced in:

- 7.1. Construct an accelerometer object (2)

https://heycam.github.io/webidl/#dfn-inherited-interfaces Referenced in:

- 7.1. Construct an accelerometer object

https://heycam.github.io/webidl/#dfn-interface Referenced in:

- 7.1. Construct an accelerometer object (2) (3)

https://heycam.github.io/webidl/#dfn-throw Referenced in:

- 7.1. Construct an accelerometer object

### Terms defined by reference

- [GENERIC-SENSOR] defines the following terms:
  - "accelerometer"
  - "gravity"
  - "linear-acceleration"
  - Sensor
  - SensorOptions
  - automation
  - check sensor policy-controlled features
  - default sensor
  - fingerprinting
  - generic mitigations
  - get value from latest reading
  - initialize a sensor object
  - keylogging
  - latest reading
  - local coordinate system
  - location tracking
  - mock sensor reading values
  - mock sensor type
  - sensor permission name
  - sensor readings
  - sensor type
  - supported sensor options
  - user identifying
- [INFRA] defines the following terms:
  - entry
  - key
  - value
- [permissions] defines the following terms:
  - "accelerometer"
- [screen-orientation] defines the following terms:
  - current orientation type
  - dom screen
- [WEBIDL] defines the following terms:
  - DOMException
  - Exposed
  - SecureContext
  - SecurityError
  - double
  - identifier
  - inherited interfaces
  - interface
  - throw

## References

### Normative References

[GENERIC-SENSOR]
  Mikhail Pozdnyakov; Alexander Shalamov; Tobie Langel. Generic Sensor API. URL: https://w3c.github.io/sensors/
[INFRA]
  Anne van Kesteren; Domenic Denicola. Infra Standard. Living Standard. URL: https://infra.spec.whatwg.org/
[PERMISSIONS]
  Mounir Lamouri; Marcos Caceres; Jeffrey Yasskin. Permissions. URL: https://w3c.github.io/permissions/
[RFC2119]
  S. Bradner. Key words for use in RFCs to Indicate Requirement Levels. March 1997. Best Current Practice. URL: https://tools.ietf.org/html/rfc2119
[SCREEN-ORIENTATION]
  Mounir Lamouri; Marcos Caceres; Johanna Herman. The Screen Orientation API. URL: https://w3c.github.io/screen-orientation/
[WEBIDL]
  Boris Zbarsky. Web IDL. URL: https://heycam.github.io/webidl/

### Informative References

[ACCESSORY]
  Owusu, Emmanuel, et al. ACCessory: password inference using accelerometers on smartphones. 2012. Informational. URL: https://dl.acm.org/citation.cfm?id=2162095
[KEYSTROKEDEFENSE]
  Song, Yihang, et al. Two novel defenses against motion-based keystroke inference attacks. 2014. Informational. URL: https://arxiv.org/abs/1410.7746
[SI]
  SI Brochure: The International System of Units (SI), 8th edition. 2014. URL: http://www.bipm.org/en/publications/si-brochure/
[TOUCHSIGNATURES]
  Mehrnezhad, Maryam, et al. Touchsignatures: identification of user touch actions and pins based on mobile sensor data via javascript. 2016. Informational. URL: https://arxiv.org/abs/1602.04115

## IDL Index

    [SecureContext, Exposed=Window]
    interface Accelerometer : Sensor {
      constructor(optional AccelerometerSensorOptions options = {});
      readonly attribute double? x;
      readonly attribute double? y;
      readonly attribute double? z;
    };

    enum AccelerometerLocalCoordinateSystem { "device", "screen" };

    dictionary AccelerometerSensorOptions : SensorOptions {
      AccelerometerLocalCoordinateSystem referenceFrame = "device";
    };

    [SecureContext, Exposed=Window]
    interface LinearAccelerationSensor : Accelerometer {
      constructor(optional AccelerometerSensorOptions options = {});
    };

    [SecureContext, Exposed=Window]
    interface GravitySensor : Accelerometer {
      constructor(optional AccelerometerSensorOptions options = {});
    };

    dictionary AccelerometerReadingValues {
      required double? x;
      required double? y;
      required double? z;
    };

    dictionary LinearAccelerationReadingValues : AccelerometerReadingValues {
    };

    dictionary GravityReadingValues : AccelerometerReadingValues {
    };

#accelerometer-sensor-type Referenced in:

- 5. Model (2) (3)
- 7.1. Construct an accelerometer object

#acceleration Referenced in:

- 1. Introduction
- 5. Model (2) (3) (4) (5) (6)
- 6.1.1. Accelerometer.x
- 6.1.2. Accelerometer.y
- 6.1.3. Accelerometer.z
- 6.3.1. GravitySensor.x
- 6.3.2. GravitySensor.y
- 6.3.3. GravitySensor.z
- 8. Automation

#linear-acceleration Referenced in:

- 5. Model (2)
- 6.2.1. LinearAccelerationSensor.x
- 6.2.2. LinearAccelerationSensor.y
- 6.2.3. LinearAccelerationSensor.z

#gravity Referenced in:

- 5. Model (2) (3)
- 6.3.1. GravitySensor.x
- 6.3.2. GravitySensor.y
- 6.3.3. GravitySensor.z

#device-coordinate-system Referenced in:

- 5.1. Reference Frame (2) (3) (4) (5)
- 7.1. Construct an accelerometer object

#screen-coordinate-system Referenced in:

- 2. Examples
- 5.1. Reference Frame (2) (3) (4)
- 7.1. Construct an accelerometer object

#accelerometer Referenced in:

- 1. Introduction
- 5. Model (2) (3)
- 5.1. Reference Frame
- 6.1. The Accelerometer Interface (2) (3)
- 6.1.1. Accelerometer.x
- 6.1.2. Accelerometer.y
- 6.1.3. Accelerometer.z
- 6.2. The LinearAccelerationSensor Interface
- 6.3. The GravitySensor Interface
- 7.1. Construct an accelerometer object (2) (3)
- 8. Automation
- 8.1. Mock Sensor Type

#dom-accelerometer-x Referenced in:

- 6.1.1. Accelerometer.x
- 6.2.1. LinearAccelerationSensor.x
- 6.3.1. GravitySensor.x

#dom-accelerometer-y Referenced in:

- 6.1.2. Accelerometer.y
- 6.2.2. LinearAccelerationSensor.y
- 6.3.2. GravitySensor.y

#dom-accelerometer-z Referenced in:

- 6.1.3. Accelerometer.z
- 6.2.3. LinearAccelerationSensor.z
- 6.3.3. GravitySensor.z

#enumdef-accelerometerlocalcoordinatesystem Referenced in:

- 6.1. The Accelerometer Interface

#dictdef-accelerometersensoroptions Referenced in:

- 6.1. The Accelerometer Interface
- 6.2. The LinearAccelerationSensor Interface
- 6.3. The GravitySensor Interface
- 7.1. Construct an accelerometer object

#dom-accelerometersensoroptions-referenceframe Referenced in:

- 7.1. Construct an accelerometer object

#linearaccelerationsensor Referenced in:

- 1. Introduction
- 5. Model (2)
- 5.1. Reference Frame
- 6.2. The LinearAccelerationSensor Interface (2) (3)
- 6.2.1. LinearAccelerationSensor.x
- 6.2.2. LinearAccelerationSensor.y
- 6.2.3. LinearAccelerationSensor.z
- 8. Automation
- 8.1. Mock Sensor Type

#gravitysensor Referenced in:

- 1. Introduction
- 5. Model (2)
- 5.1. Reference Frame
- 6.3. The GravitySensor Interface (2) (3)
- 6.3.1. GravitySensor.x
- 6.3.2. GravitySensor.y
- 6.3.3. GravitySensor.z
- 8. Automation
- 8.1. Mock Sensor Type

#construct-an-accelerometer-object Referenced in:

- 6.1. The Accelerometer Interface
- 6.2. The LinearAccelerationSensor Interface
- 6.3. The GravitySensor Interface

#dictdef-accelerometerreadingvalues Referenced in:

- 8.1. Mock Sensor Type (2)