mubash3r Posted July 3, 2024 Report Share Posted July 3, 2024 Hello everyone! I am experimenting with MPU6050. I am working with Jeff Rowberg's library using DMP (MotionApps v2.0)). MPU6050 gives acceleration on x, y & z axis. I want to know, at what speed the object is moving. Please suggest the proper way for this purposeĀ Thanks & regards. Quote Link to comment Share on other sites More sharing options...
Jeff Rowberg Posted July 3, 2024 Report Share Posted July 3, 2024 Fundamentally, you want to take the linear acceleration output (accel data with gravity removed) and then integrate it over time. The integral of acceleration is velocity. However, practically this is quite difficult to do with reasonable accuracy. You need to obtain and process acceleration data at consistent and precise intervals--sometimes more precise than the IMU or your MCU are able to achieve. Errors in each computed data point compound over time, so you drift rapidly away from accurate values. This process is called dead reckoning (and is often extended with a second integration of velocity to find position), and it's just plain hard to do well, especially with inexpensive consumer IMUs and microcontrollers. Ideally, you can augment the data with something like a GPS for an external reference point. For example, if you've computed a 5m/sec velocity but your GPS says you're staying in the same place, you can use this info to reset your velocity to zero and stay closer to accurate output. Here's one of many other discussions about the topic: https://forum.arduino.cc/t/imu-calculating-velocity/902488/26?page=2 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.