ios – Recording IMU information in watchOS at 60hz or higher frequency stops randomly for someday in between of recording

[ad_1]

I’m recording IMU information from watch sensors utilizing Core Movement Framework system movement updates at 60hz utilizing watch exercise periods more often than not it really works tremendous however generally 3/10 there’s a giant hole in information captured from the sensor e.g. for 10 minutes it didn’t report something additionally information recorded doesn’t at all times report at 60hz frequency, Following is code for identical any recommendations?

        let movement = CMMotionManager()
        movement.deviceMotionUpdateInterval = 1/60
        movement.startDeviceMotionUpdates(to: queue) { (deviceMotion: CMDeviceMotion?, error: Error?) in
            if error != nil {
                print("Encountered error: (error!)")
            }
            if let deviceMotion = deviceMotion {
                self.saveIMUReading(deviceMotion: deviceMotion)
            }
        }

FYI as readings are generated at close to 60hz I save a bit of each 1000 entries within the JSON file, Your data or help on this topic can be of nice assist Thanks.

[ad_2]

Leave a Reply