Limitations of MPU 9250

Hi guys,

I am working on a reinforcement learning car. It would be preferred if I can track the coordinates of the car and also the direction where it's heading. Depending on its state, I'd like to have to move in a certain direction. "North, South, East, West, etc". I've been messing around with MPU9250 but can't figure out how to get it to read earth's magnetic field so I can do that.

  1. can this board read coordinates?
  2. can this board read direction?
    (pretty sure it can but how do I enable it to work with the magnetic field of earth?)

Im looking for a library which may have compass and gps files in it.

MPU9250 is a chip. Where did you get this "board" from?

  1. No, the MPU9250 doesn't read coordinates. You may wish to write an Arduino program to combine readings from an MPU9250 sensor and a GPS. There's probably a few tutorials out there already. What did you find so far?

  2. Yes, it absolutely can read magnetic fields, including the magnetic field of the earth. If you have not too much metal and electric currents nearby then you can get a direction reading that's good enough for many purposes.

Note that regular car GPS units use a lot of trickery to enhance the precision of the GPS signal. Primarily they use the roads they know to "snap" the car onto the road. The GPS accuracy is not good enough to tell you if you are on the road or not. The car GPS just assumes that you aren't off the road.

The magnetometer (compass) section of the MPU9250 can give you heading relative to magnetic North, but the magnetometer must be calibrated in place, or the readings will most likely be useless.

Detailed tutorial on calibration.