Using an IMU to measure distance/direction traveled

Hi, am I correct in understanding that an IMU can be used to measure the distance and direction traveled in 3 dimensions? I have an application where the starting lat/long could be determined by GPS. However, after that point this device goes deep underwater where there is no GPS signal. Could an IMU be used to measure the distance and direction traveled once underwater? If so then it seems to me that my software could determine its current lat/long without needing GPS coverage.

Anyone done this sort of thing before?

Thanks.

For several reasons, consumer grade IMUs are too noisy and inaccurate to be useful for dead reckoning. They are useful for 3D orientation.

An explanation of just one of the problems is presented here: https://web.archive.org/web/20201111202 … n-velocity

Drat. I had a feeling it wasn’t going to be as easy as I thought. Thanks for the link.

In principle a magnetometer can be used as a digital compass, and report the direction of travel. It would have to be carefully calibrated in place as magnetic fields, current carrying conductors and iron containing materials distort the Earth’s magnetic field.

Relative velocity can be estimated from motor speed, after calibration.

I am getting reasonable readings with an uncalibrated ICM20948 in Python using some AHRS code I copied from some Waveshare examples. So hook it up and give it a try and see it it works for you. I have a 3 part Maker Portal article on calibrating the MPU9250 I am going to try to convert to the ICM20948.

What needs to be tested for is repeatability and stability.

As far as the mag part of things each time you move to a new location the local magnetic field will change. The power lines in my house and in the street will give a different field compared to the local park. Time of day and day of week could also change the field. As local weather is wet and cold it will be weeks before I try the local parks.

Dale in Stump Town in the PNW