Page 1 of 1

Changing board orientation

Posted: Tue Sep 30, 2014 10:59 pm
by hydro psyche
Hey guys,

What multiwii code do I have to adjust if I want to mount my board 90 or 270 degrees from "normal" forward orientation?

Re: Changing board orientation

Posted: Wed Oct 01, 2014 3:25 pm
by waltr
Search this forum as it has been discussed.

Re: Changing board orientation

Posted: Wed Oct 01, 2014 5:34 pm
by hydro psyche
I swore I've seen it before, but now can't find it here...not sure if I was looking for the wrong thing. I found something on another forum related to changing the #define FORCE_ACC_ORIENTATION(X, Y, Z) settings, which I'm testing. thanks

Re: Changing board orientation

Posted: Thu Oct 02, 2014 12:49 am
by hydro psyche
So the #define reference in my last post seems like the right place to make this adjustment for a 90 degree clockwise rotation, however I'm not quite sure how the values need to be changed...I can't find anything that diagrams what X, Y, Z, -X, -Y, and -Z actually represent when looking at the board. I made some trial and error edits but nothing really seemed to make any difference when I hooked up to the GUI...no matter what change I made, the artificial horizon in the GUI just looked like I had a board mounted at 90 degrees clockwise with no code changes whatsoever. Does anyone have any idea what this should be and if I'm looking at the right code to change?

Re: Changing board orientation

Posted: Thu Oct 02, 2014 11:24 am
by Hypermobile
First determine what your standard orientation is. (search for correct board in def.h)


for Example

X=Y
Y=X
Z=-Z

Rotate the Board 90 degrees Clockwise

you need to CounterClockwise that in the Software.
So X=Y becomes X=-X
and Y=X becomes Y=Y

Make you own Picture...and try to understand what happens

Check with this: http://www.multiwii.com/wiki/?title=Config.h
How should be the sensor axis directions
TILT the MULTI to the RIGHT (left side up):
MAG_ROLL, ACC_ROLL and GYRO_ROLL goes up
MAG_Z and ACC_Z goes down

TILT the MULTI forward (tail up):
MAG_PITCH, ACC_PITCH and GYRO_PITCH goes up
MAG_Z and ACC_Z goes down

Rotating the copter clockwise (YAW):
GYRO_YAW goes up
The copter stays level:
MAG_Z is positive ; ACC_Z is positive

Re: Changing board orientation

Posted: Thu Oct 02, 2014 12:57 pm
by hydro psyche
Hypermobile wrote:First determine what your standard orientation is. (search for correct board in def.h)


for Example

X=Y
Y=X
Z=-Z

Rotate the Board 90 degrees Clockwise

you need to CounterClockwise that in the Software.
So X=Y becomes X=-X
and Y=X becomes Y=Y

Make you own Picture...and try to understand what happens

Check with this: http://www.multiwii.com/wiki/?title=Config.h
How should be the sensor axis directions
TILT the MULTI to the RIGHT (left side up):
MAG_ROLL, ACC_ROLL and GYRO_ROLL goes up
MAG_Z and ACC_Z goes down

TILT the MULTI forward (tail up):
MAG_PITCH, ACC_PITCH and GYRO_PITCH goes up
MAG_Z and ACC_Z goes down

Rotating the copter clockwise (YAW):
GYRO_YAW goes up
The copter stays level:
MAG_Z is positive ; ACC_Z is positive


Thanks for posting this...I actually wound up figuring it out on my own using the method you describe by looking at the mag and acc values in the gui as I was moving the quad around and was able to figure out what adjustments needed to be made. Drawing the picture is definitely the best way to go...I was lazy and tried to visualize it in my head which led to a couple of iterations of edits before I got it right. I'll post the code values for anyone interested when I get home.