2

I'm trying to get the position of an object in latitude/longitude. The thing is, I don't want to use a GPS so instead I'm working with a LSM9DS1 which is a 9 Degrees of Freedom IMU (Inertial Measuring Unit) breakout.

I've looked into so many links but I still can't figure it out. I know the result won't be precise but I want an approximative new position.

I understand that :

  • Roll is the rotation about the x axis (between -180 and 180 deg)
  • Pitch is the rotations about the y axis (between -90 and 90 deg)
  • Yaw is the rotation about the z axis (between -180 and 180)

I've seen many algorithms to get those roll, pitch and yaw values so assuming that I have them, how can I update the initial position after a sligth movement and get the new GPS coordinates ?

MelKoutch
  • 180
  • 1
  • 12
  • 1
    You have two coordinate systems (GPS and LSM), a movement (dx,dy,dz) which is in the LSM coordinate system, and a rotation matrix based on (roll, pitch,yaw). You are going to multiply movement * translation between LSM and GPS coordinates, scale it to the GPS distances and add it to your initial GPS position to get your new GPS position. You have to figure out from the device information how to create the rotation matrix and scale the units of distance. – stark Mar 14 '19 at 15:14
  • 1
    Thanks for your answer but I'm afraid I don't understand. You said "multiply movement * translation between LSM and GPS coordinates". I guess I can get the movement with the IMU but how do I get the translation between LSM and GPS ? – MelKoutch Mar 14 '19 at 15:24
  • That's why it's a comment and not an answer. – stark Mar 14 '19 at 17:31
  • 1
    @MelKoutch take a look at the duplicate [My Algorithm to Calculate Position of Smartphone - GPS and Sensors](https://stackoverflow.com/a/19764828/2521214) and read the whole thing (all the posts and comments) before you start coding ... also watch the tech video linked in one of the answers – Spektre Mar 15 '19 at 07:30
  • 2
    Thanks for the link, it seems like there's no need to calculate roll, pitch and yaw after all. – MelKoutch Mar 15 '19 at 08:27

0 Answers0