Class: Toybox.Sensor.AccelerometerData

Overview

A class to store accelerometer sample data.

Each field specified is an Array of Float or Number values. The values for the x, y, and z axes are in Milli G units. For reference, 1000 Milli G = 1 G. If not null, all fields are of equal size. This is typically used in a callback method used by registerSensorDataListener()

See Also:

Since:

API Level 2.3.0

Supported Devices:

Instance Member Summary collapse

Instance Attribute Details

var pitch as Lang.Array<Lang.Float> or Null

The Array of pitch values as Floats in degrees. Can be null.

Pitch values are calculated with the equation atan2(y, sqrt(x^2 + z^2)).

Since:

API Level 2.3.0

See Also:

Returns:

var power as Lang.Array<Lang.Number> or Null

The Array of vector power values as Numbers in millig-units. Can be null.

Since:

API Level 2.3.0

Returns:

var roll as Lang.Array<Lang.Float> or Null

The Array of roll values as Floats in degrees. Can be null.

Roll values are calculated with the equation atan2(-x, z).

Since:

API Level 2.3.0

See Also:

Returns:

var x as Lang.Array<Lang.Number>

The Array of x axis values as Numbers in millig-units.

Since:

API Level 2.3.0

Returns:

var y as Lang.Array<Lang.Number>

The Array of y axis values as Numbers in millig-units.

Since:

API Level 2.3.0

Returns:

var z as Lang.Array<Lang.Number>

The Array of z axis values as Numbers in millig-units.

Since:

API Level 2.3.0

Returns:


Generated Jun 6, 2024 10:31:53 AM