Sensor variables reference
  • 18 May 2022
  • 3 Minutes to read
  • Dark
    Light
  • PDF

Sensor variables reference

  • Dark
    Light
  • PDF

Article Summary

Accelerometer

The device's current acceleration. Note that the z property includes Earth's gravitational acceleration.

The values below describe properties of the sensorVars.accelerometer.latestValue variable, and as such, the schema of the items in the sensorVars.accelerometer.values array.

PropertyValuesDescription
xNegative or positive decimal, e.g. -6.71.Acceleration along the X axis, as m/s².
yNegative or positive decimal, e.g. 2.05.Acceleration along the Y axis, as m/s².
zNegative or positive decimal, e.g. 4.29.Acceleration along the Z axis, as m/s².
timestampISO 8601 format string, e.g. 2019-08-27T12:50:38.976Z.Timestamp of when the value was recorded.

Barometer

The atmospheric pressure around the device.

The values below describe properties of the sensorVars.barometer.latestValue variable, and as such, the schema of the items in the sensorVars.barometer.values array.

PropertyValuesDescription
pressurePositive decimal, e.g. 101.2.Atmospheric pressure, in kilopascals.
timestampISO 8601 format string, e.g. 2019-08-27T12:50:38.976Z.Timestamp of when the value was recorded.

Compass

The device's current heading.

The values below describe properties of the sensorVars.compass.latestValue variable, and as such, the schema of the items in the sensorVars.compass.values array.

PropertyValuesDescription
headingPositive decimal between 0…360, e.g. 64.71.The direction in which the device is facing, given as degrees from true north. 0 degrees represents true north, and the direction is determined clockwise (which means that east is 90 degrees and west is 270 degrees).
timestampISO 8601 format string, e.g. 2019-08-27T12:50:38.976Z.Timestamp of when the value was recorded.

Geolocation

The device's current position, altitude, heading and speed.

The values below describe properties of the sensorVars.geolocation.latestValue variable, and as such, the schema of the items in the sensorVars.geolocation.values array.

PropertyValuesDescription
latitudeNegative or positive decimal, e.g. 60.1699.Latitude of the device, in decimal degrees.
longitudeNegative or positive decimal, e.g. 24.9384.Longitude of the device, in decimal degrees.
altitudeNegative or positive decimal, e.g. 4.29.Altitude of the device, in meters, relative to sea level. If the device does not provide this information, this value will be null.
accuracyPositive decimal, e.g. 1235.04.Accuracy of the latitude and longitude parameters, in meters.
altitudeAccuracyPositive decimal, e.g. 15.11.Accuracy of the altitude parameter, in meters.
headingPositive decimal between 0…360, e.g. 90.4.The direction in which the device is traveling, given as degrees from true north. 0 degrees represents true north, and the direction is determined clockwise (which means that east is 90 degrees and west is 270 degrees).
speedPositive decimal, e.g. 0.35.Velocity of the device, in meters per second.
timestampISO 8601 format string, e.g. 2019-08-27T12:50:38.976Z.Timestamp of when the value was recorded.

Gyroscope

The device's current rotation.

The values below describe properties of the sensorVars.gyroscope.latestValue variable, and as such, the schema of the items in the sensorVars.gyroscope.values array.

PropertyValuesDescription
xNegative or positive decimal, e.g. -6.71.Angular velocity of the device along its X axis, in m/s².
yNegative or positive decimal, e.g. 2.05.Angular velocity of the device along its Y axis, in m/s².
zNegative or positive decimal, e.g. 4.29.Acceleration along the Z axis, as m/s².
timestampISO 8601 format string, e.g. 2019-08-27T12:50:38.976Z.Timestamp of when the value was recorded.

Magnetometer

The device's current position relative to the Earth's magnetic field.

The values below describe properties of the sensorVars.magnetometer.latestValue variable, and as such, the schema of the items in the sensorVars.magnetometer.values array.

PropertyValuesDescription
xNegative or positive decimal.Magnetic field of the device along its X axis, in microteslas.
yNegative or positive decimal.Magnetic field of the device along its Y axis, in microteslas.
zNegative or positive decimal.Magnetic field of the device along its Z axis, in microteslas.
timestampISO 8601 format string, e.g. 2019-08-27T12:50:38.976Z.Timestamp of when the value was recorded.

Was this article helpful?