Changing board orientation

This forum is dedicated to all issues and questions related to your individual setups and configurations
Post Reply
hydro psyche
Posts: 17
Joined: Sat Mar 22, 2014 9:32 pm

Changing board orientation

Post 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?

waltr
Posts: 733
Joined: Wed Jan 22, 2014 3:21 pm
Location: Near Philadelphia, Pennsyvania, USA

Re: Changing board orientation

Post by waltr »

Search this forum as it has been discussed.

hydro psyche
Posts: 17
Joined: Sat Mar 22, 2014 9:32 pm

Re: Changing board orientation

Post 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

hydro psyche
Posts: 17
Joined: Sat Mar 22, 2014 9:32 pm

Re: Changing board orientation

Post 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?

Hypermobile
Posts: 94
Joined: Mon Jan 13, 2014 8:53 pm

Re: Changing board orientation

Post 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
Attachments
XY.jpg
(16.25 KiB) Not downloaded yet

hydro psyche
Posts: 17
Joined: Sat Mar 22, 2014 9:32 pm

Re: Changing board orientation

Post 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.

Post Reply