[Help] Sensor orientation reversed

Post Reply
Rhizudin
Posts: 5
Joined: Mon Jul 22, 2013 5:04 am

[Help] Sensor orientation reversed

Post by Rhizudin »

I recently bought a multiwii which has acc,gyro and mag sensors. I bought it from here. But in GUI roll and and pitch direction always reversed. I try to edit the individual sensor orientation in config.h. I give a minus sign but the direction still reversed. What should i do then? :(

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

Re: [Help] Sensor orientation reversed

Post by Hamburger »

a - rotate board physically, or
b - move the X,Y,Z around

Rhizudin
Posts: 5
Joined: Mon Jul 22, 2013 5:04 am

Re: [Help] Sensor orientation reversed

Post by Rhizudin »

Ya, i have rotate the board, if i roll the board right the GUI report left roll and pitch too.
so how to fix it?

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

Re: [Help] Sensor orientation reversed

Post by Hamburger »

invert +- sign for roll&pitch for both gyro&acc

Rhizudin
Posts: 5
Joined: Mon Jul 22, 2013 5:04 am

Re: [Help] Sensor orientation reversed

Post by Rhizudin »

I have change them, but nothing happened. Any idea?

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

Re: [Help] Sensor orientation reversed

Post by Hamburger »

no, if nothing happens with changing signs, then I have no idea.
Here is what I use in config.h for a rotated board

Code: Select all

//  default:
//  #define ACC_ORIENTATION(X, Y, Z)  {accADC[ROLL]  = -Y; accADC[PITCH]  =  X; accADC[YAW]  =  Z;}
//  #define GYRO_ORIENTATION(X, Y, Z) {gyroADC[ROLL] = -X; gyroADC[PITCH] = -Y; gyroADC[YAW] = -Z;}
#define FORCE_ACC_ORIENTATION(X, Y, Z)  {imu.accADC[ROLL]  = -X; imu.accADC[PITCH]  = -Y; imu.accADC[YAW]  =  Z;}
#define FORCE_GYRO_ORIENTATION(X, Y, Z) {imu.gyroADC[ROLL] =  Y; imu.gyroADC[PITCH] = -X; imu.gyroADC[YAW] = -Z;}

Rhizudin
Posts: 5
Joined: Mon Jul 22, 2013 5:04 am

Re: [Help] Sensor orientation reversed

Post by Rhizudin »

I just found them, I have to change the orientation in def.h not in config.h and it works!
Thanks

handsomejackuk
Posts: 97
Joined: Mon Sep 08, 2014 12:25 am

Re: [Help] Sensor orientation reversed

Post by handsomejackuk »

bump this for reference

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

Re: [Help] Sensor orientation reversed

Post by Hamburger »

Not real good.
Setting/overriding sensors orientations with the override.xy from config.h works just fine.

Samar
Posts: 2
Joined: Sun Dec 28, 2014 6:30 am

Re: [Help] Sensor orientation reversed

Post by Samar »

I have a question. If i inverse the orientation on
Gyro and acc orientation in def.h should i also inverse the mag orientation for incorrect roll?

Post Reply