Home        Store        Learn        Blog

Measuring distance traveled with an IMU sensor?

Hi, I’m working on a project where our device gets dropped into the water and at some later time surfaces on its own. As the device sinks to the ocean floor it may drift a substantial distance from where it was on the surface. What I’d like to do is have this device know where it is sitting on the ocean floor in lat/long coordinates. If it knew it was at x/y at the surface and it has drifted 300ft north and 25ft to the east then we can do some math and know our new lat/long.
I’m wondering if an IMU such as this one SparkFun 9DoF IMU Breakout - ICM-20948 (Qwiic) - SEN-15335 - SparkFun Electronics would be able to provide that information. Has anyone here done this sort of thing before? Would love to hear your experiences if so.

Hi @MattHixson,

Generally positioning data from an IMU alone is quite inaccurate, especially over long distances or for purposes like navigation. That said, the calculations themselves are essentially just double-integration of the accelerometer values, with the direction corrected for by the other sensor readings (gyroscope for rotation, magnetometer for initial/steady orientation). This stackexchange response may be a useful reference.

Given your use-case is seemingly a passive device that’s only affected by drift (as opposed to say a vehicle with controlled motion, and electrical and vibration noise from thrusters), it may be that the integration approach is sufficiently accurate for your purposes. If possible I’d recommend you try it out, and do some tests to determine the amount/rates of error you end up with.

If a self-contained approach is insufficient, the next simplest would likely be an absolute acoustic positioning approach, where you have a transmitting beacon that can send one or more acoustic pulses, which are detected by three or more receivers, from which the position can be triangulated. That’s understandably more expensive and complex than an IMU-based solution, but such is life when attempting positioning underwater.

1 Like

In the real world, what you describe isn’t possible. The amount of noise generated by inexpensive IMU sensors causes position estimations to rapidly diverge from reality unless they are supplemented by data from other sensors. After a couple days of data collection, I’d guess that your position estimate would be off by a hundred miles or more.

What you describe is theoretically possible with perfect IMU data (logs emailed from a divine being, perhaps), but you still have to account for the movement of the earth during data collection, or your position estimates will drift an unlimited amount over time.

This article breaks down the challenges nicely. Page 19 gets into IMUs, inertial navigation systems and Kalman filters.