简体   繁体   中英

Simultaniously read accelerometer and gyroscope

I tried to extend the Android sample under movesense-mobile-lib so that it reads accelerometer and gyroscope simultaniously. To do that I subscribed to both

/Device/Measurement/LinearAcceleration and /Device/Measurement/AngularVelocity

However, only one of the streams is read. How can I read both sources simultaniously?

EDIT: The issue has been fixed in the latest movesense-mobile-lib release

The multiple streams work by subscribing to both paths just as you assumed and you should be getting both callbacks. However it looks like there is a bug in Android mobile library and this does not actually work.

I've entered an issue in the bug tracker so you can follow the progress:

https://bitbucket.org/suunto/movesense-mobile-lib/issues/9/simultaneous-subscription-to

Simultaneous Accelerometer & Gyro subscription and data analysis should get easier when the (6- and 9-axis) IMU interface is implemented in Movesense device lib , but you can also make your own combining service that combines the data from Acceleration and AngularVelocity and use that until the bugfix or IMU service is released.

Full disclosure: I work for Movesense team

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM