![Kauai Labs navX2-MXP User Manual Download Page 53](http://html1.mh-extra.com/html/kauai-labs/navx2-mxp/navx2-mxp_user-manual_3634856053.webp)
Examples
Collision Detection (FRC)
Full LabVIEW Source code on Github
Motion Detection (FRC)
Detecting motion/no-motion can be simply detected by determining if a body’s linear acceleration
exceeds a small threshold.
Using the data directly from accelerometers, this is not as easy as it seems, since raw accelerometer
readings contain both acceleration due to gravity as well as acceleration due to a body’s motion. One
method for detecting motion with raw acceleration data is to use a
, which lets quickly-
changing information through but blocks information that doesn’t change frequently.
However, a more comprehensive and reliable approach is to subtract the acceleration due to gravity from
the raw acceleration values. The result value is known as “world linear acceleration”, representing the
actual amount of acceleration due to motion, and is calculated automatically by the navX-sensor’s motion
processor. Whenever the sum of the world linear acceleration in both the X and Y axes exceeds a “motion
threshold”, motion is occurring.
FRC C++ Example
50