Skip to content

Instantly share code, notes, and snippets.

@patrickelectric
Created July 26, 2014 02:03
Show Gist options
  • Save patrickelectric/044ec6b836f671ca4ce1 to your computer and use it in GitHub Desktop.
Save patrickelectric/044ec6b836f671ca4ce1 to your computer and use it in GitHub Desktop.
/// IMU DATA
#if 1
c_common_gpio_toggle(LED_builtin_io);
c_io_imu_getRaw(accRaw, gyrRaw, magRaw);
c_datapr_MahonyAHRSupdate(attitude_quaternion, velAngular, gyrRaw[0],gyrRaw[1],gyrRaw[2],accRaw[0],accRaw[1],accRaw[2],magRaw[0],magRaw[1],magRaw[2]);
//c_datapr_MahonyAHRSupdate(attitude_quaternion,gyrRaw[0],gyrRaw[1],gyrRaw[2],accRaw[0],accRaw[1],accRaw[2],0,0,0);
c_io_imu_Quaternion2Euler(attitude_quaternion, rpy);
c_io_imu_EulerMatrix(rpy, velAngular);
c_common_gpio_toggle(LED_builtin_io);
#endif
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment