I am using react-native-sensor to grab the raw data from the sensor.
setUpdateIntervalForType(SensorTypes.gyroscope, 100)
gyroscope.subscribe(({ x, y, z, timestamp }) => {
let pitch = Math.atan2(-x, -z) * 180 / Math.PI;// In degrees
let roll = Math.atan2(-y, -x) * 180 / Math.PI;// In degrees
let yaw = Math.atan2(y, -z) * 180 / Math.PI;// In degrees
this.setState({pitch: pitch, roll: roll, yaw: yaw})
})
How do i know that the device was spined 360
