onSensor

abstract fun onSensor(sensorType: SensorType, timestampNs: Long, x: Float, y: Float, z: Float)

Sensor calibrated data callback

Measurement units:

  • Accelerometer: m/s^2

  • Magnetometer: mGauss

  • Gyroscope: rad/s

Parameters

sensorType

the sensor type

timestampNs

the frame timestamp in nano seconds

x

the x axis sensor data, depends on the sensorType

y

the y axis sensor data, depends on the sensorType

z

the z axis sensor data, depends on the sensorType