Arduino Forum

Topics => Science and Measurement => Topic started by: fabianbambam on Jan 30, 2020, 05:50 pm

Title: Measuring distance with IMU sensor and GPS
Post by: fabianbambam on Jan 30, 2020, 05:50 pm
Hi,


I'm working with a BNO-055 Bosch IMU sensor and I was looking for ways to get the distance traveled using this kind of sensors.

I'm not totally sure but I was reading that it was not possible but before writing this, I saw this thread (https://forum.arduino.cc/index.php?topic=243986.0) and I wanted to know from your part if you feel this could be possible with my sensor, using double integration

Hopefully as much accurate as possible, I wanted to know if you have any resources that I could use to apply this an arduino dev board capable.

If there is any help that I could get from you that will be happily received.

Thanks!
Title: Re: Measuring distance with IMU sensor and GPS
Post by: fabianbambam on Jan 30, 2020, 07:40 pm
I also have a GPS module in my project, maybe I could use that to achieve this. What do you think ?
Title: Re: Measuring distance with IMU sensor and GPS
Post by: jremington on Jan 30, 2020, 08:46 pm
GPS works great outdoors, but expect distance measurements to be in error by +/- 2 meters in the very best cases, and often much worse.

Best tutorial at https://www.movable-type.co.uk/scripts/latlong.html
Title: Re: Measuring distance with IMU sensor and GPS
Post by: MarkT on Jan 31, 2020, 01:10 am
GPS will give you course direction and speed so you can integrate this up as you go, as well as calculating as-the-crow-flies distances.

You can also just record regular waypoints and sum the steps between them.

A MEMS IMU gives you no useful information, it cannot determine velocity even.  MEMS IMUs give orientation only as they do not contain high precision accelerometers, so cannot be used for dead-reckoning except over very short timescales.
Title: Re: Measuring distance with IMU sensor and GPS
Post by: fabianbambam on Jan 31, 2020, 09:30 pm
Hi,

Thank you so much for your responses.

GPS will give you course direction and speed so you can integrate this up as you go, as well as calculating as-the-crow-flies distances.

You can also just record regular waypoints and sum the steps between them.

A MEMS IMU gives you no useful information, it cannot determine velocity even.  MEMS IMUs give orientation only as they do not contain high precision accelerometers, so cannot be used for dead-reckoning except over very short timescales.
So you mean that the BNO-055 Bosch IMU sensor is not able to get the distance traveled by itself? It has an accelerometer, gyroscope and magnetometer.

I think I will not be able to use the GPS, so I will have to look for a way without using the GPS module.
Title: Re: Measuring distance with IMU sensor and GPS
Post by: Idahowalker on Feb 01, 2020, 02:04 pm
There is a function in the TinyGPS++ library that can calculate the distance between to points using the Lat. and Lon.

The function works taking the begin and end points doing some math and spitting out a distance. What I have done is keep the previous starting Lat and Lon and use it, during each iteration, to calculate.