I need to get the linear acceleration in the robot's direction of travel (RoboRio, Java). What AHRS call do I want? Frankly, I am confused by your documentation. In the Javadoc, it says (under
getWorldLinearAccelY):
World linear acceleration refers to raw acceleration data, which has had the gravity component removed, and which has been rotated to the same reference frame as the current yaw value. The resulting value represents the current acceleration in the Y-axis of the body (e.g., the robot) on which the sensor is mounted.
If this call is in fact returning the acceleration along the Y-axis of the *body*, then why is it called "getWorldAccel", not "getBodyAccel"?
And, the above Javadoc description doesn't agree with what you say in the Terminology section under "World Reference Frame":
To account for this, navX-MXP’s motion processing adjusts each linear acceleration value by rotating it in the opposition direction of the current yaw angle. The result is an acceleration value that represents acceleration with respect to the area in which navX-MXP operates, which is known as “World Reference Frame”. This world-frame linear acceleration value is much simpler to use for tracking motion of an object, like a robot, which might rotate while it moves.
So...to get the acceleration in the robot's direction of travel (body coords), what do I use? getWorldLinearAccelY(), or getRawAccelY()???