Quote:
Originally Posted by Jonathan L.
...Actually, I'm having a hard time figuring out which direction on a graph it thinks is forward.
|
One of the many challenging parts of the displacement integration algorithm (referenced in my last post) is that in addition to the double-integration, sensor data filtering, trapezoidal integration, removal of gravity from the accelerometers, etc., the algorithm also has to deal with the potential rotation of the robot during the time when integration is occurring.
Therefore, the X/Y units of displacement are in "world reference" frame. This means that they the Y axis is pointing to whatever direction maps to 0 degrees on the navX-MXP yaw angle. So it's important to ensure that the navX-MXP has completed startup calibration, and that the yaw has been zeroed recently (typically, immediately before integration begins). From that point on, the displacement X/Y axis data is in alignment with that zero reference point.