Sensor coordinate system

This forum is dedicated to all issues and questions related to your individual setups and configurations
Post Reply
smoke
Posts: 2
Joined: Mon Sep 19, 2016 12:04 am

Sensor coordinate system

Post by smoke »

Hello,

What is the coordinate system convention in which the IMU values are reported?

I am reading the raw IMU values using the MSP_RAW_IMU message from a GY-86 breakout board (#define GY_86). The sensor coordinate system is rotated by:

Code: Select all

  #define ACC_ORIENTATION(X, Y, Z)  {imu.accADC[ROLL]  = -X; imu.accADC[PITCH]  = -Y; imu.accADC[YAW]  =  Z;}
  #define GYRO_ORIENTATION(X, Y, Z) {imu.gyroADC[ROLL] =  Y; imu.gyroADC[PITCH] = -X; imu.gyroADC[YAW] = -Z;}
  #define MAG_ORIENTATION(X, Y, Z)  {imu.magADC[ROLL]  =  X; imu.magADC[PITCH]  =  Y; imu.magADC[YAW]  = -Z;}


If I assume the sensor coordinate system follows the "East-North-Up" convention, that is x pointing forward, y left, z up, this seems to transform the values into the "North-East-Down" coordinate system (https://en.wikipedia.org/wiki/Axes_conventions#Conventions_for_aircraft_local_reference_frames).

RPY angles of airplanes and other air vehicles:
Image

If I mount the sensor such that its coordinate system matches with the body frame of the aircraft (x forward, x right, z down), the IMU values would be reported in the world frame (y forward, x left, z down). E.g. when rotating the GY-86 around its x axis, the gyro y value changes.

This this case, the reported roll and pitch (MSP_ATTITUDE) are still switched.

How do I need to mount the coordinate system of my sensor such that I get the correct IMU and orientation of the aircraft?

Thanks.

User avatar
Hamburger
Posts: 2578
Joined: Tue Mar 01, 2011 2:14 pm
Location: air
Contact:

Re: Sensor coordinate system

Post by Hamburger »

sensor readings in the gui must follow the scheme described here
https://www.rcgroups.com/forums/showpos ... stcount=37

Post Reply