Page 1 of 1

dev20120225 orientation warning!!!

Posted: Sun Feb 26, 2012 7:22 pm
by nhadrian
Hi all,

I have just uploaded and tested dev20120225 and I saw that there is a serious orientation and axis change in this dev!
There are x-y axis swaps and sign changes in the specified board configs too!!!

So I recommend anybody to check the working of all sensors in GUI before taking off!!!!!

BTW, I'm using quadrino board but with separate HMC5843 so I had to consider the MAG orientations. So now everything works fine, even alt hold with MS5611 (in at least in my living room) .

BR
Adrian

Re: dev20120225 orientation warning!!!

Posted: Sun Feb 26, 2012 11:15 pm
by rbirdie001
Yes, I confirm that everything in sensors orientation was changed!
For me (Crius board - ITG3205,BMA180,HMC5883) worked this configuration surely test it before takeoff!
#define ACC_ORIENTATION(X, Y, Z) {accADC[ROLL] = -X; accADC[PITCH] = -Y; accADC[YAW] = Z;}
#define GYRO_ORIENTATION(X, Y, Z) {gyroADC[ROLL] = Y; gyroADC[PITCH] = -X; gyroADC[YAW] = -Z;}
#define MAG_ORIENTATION(X, Y, Z) {magADC[ROLL] = X; magADC[PITCH] = Y; magADC[YAW] = Z;}
Just a question - is it a purpose or just a mistake?
Roman

Re: dev20120225 orientation warning!!!

Posted: Sun Feb 26, 2012 11:31 pm
by KeesvR
This is what Alex wrote in the changes:

- sensors spec code alignment
viewtopic.php?f=8&t=1259
be careful, some errors might remain
some orientation need to be redefine in config.h for individual sensor BB
setups, but it's cleaner


So its not a mistake.

Re: dev20120225 orientation warning!!!

Posted: Sun Feb 26, 2012 11:42 pm
by Alexinparis
right :)
It's not a mistake.
It's something I should have done months ago to ease the integration of more sensors with the right interpretation from the specs.
I know it will have some side effects for custom BB boards, but it's only a one time change.

Re: dev20120225 orientation warning!!!

Posted: Mon Feb 27, 2012 8:06 am
by Th0rsten
For CRIUS SE this is in Shared:

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

Change the MAG -Z to Z?

Re: dev20120225 orientation warning!!!

Posted: Mon Feb 27, 2012 11:08 am
by MacArell
Hi, changes are like this:

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

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

Work with me, after broken 2 props in 2 time, not same orientation change for ACC and GYRO, but now work fine thank ;)

Re: dev20120225 orientation warning!!!

Posted: Mon Feb 27, 2012 1:11 pm
by Th0rsten
Sorry, but your NEW is in the current Shared Branch. So nothing to do for me.

Re: dev20120225 orientation warning!!!

Posted: Mon Feb 27, 2012 2:18 pm
by MacArell
My example before was for you can see changes, you can see my personal orentations:
my old:
#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 MAG_ORIENTATION(X, Y, Z) {magADC[ROLL] = -X; magADC[PITCH] = Y; magADC[YAW] = -Z;}

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

Re: dev20120225 orientation warning!!!

Posted: Fri Mar 02, 2012 3:34 pm
by ciskje
Also Miniwii with this version have wrong orientation:
Correct one is:

#if defined(MINIWII)
#define ITG3200
#define BMA180
#define ACC_ORIENTATION(X, Y, Z) {accADC[ROLL] = X; accADC[PITCH] = -Y; accADC[YAW] = -Z;}
#define GYRO_ORIENTATION(X, Y, Z) {gyroADC[ROLL] = Y; gyroADC[PITCH] = -X; gyroADC[YAW] = -Z;}
#endif

Re: dev20120225 orientation warning!!!

Posted: Sat Mar 03, 2012 6:30 pm
by Dellow
I'm struggling with this too!
I'm using Crius board with these settings

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

Everything works as it should until the quad goes upside down. If you roll inverted, the compass heading flips 180° and if you pitch inverted the compass heading doesn't change, i.e. Quad pointing to North, roll inverted and it should still point North but instead points South. Quad pointing North and pitch inverted, heading should now be South but remains North.
All sensors show correct readings, ( roll right, mag roll, acc roll and gyro roll increase, mag Z and acc Z decrease etc) as in the faq.
I have tried every combination of orientation but none are correct. Is it me, or has the orientation been changed somewhere else in this sketch?
I have been changing it in def.h, is this correct.
I should also say that I had no problem when using 1.9.

I could do with a sanity check just so I know I haven't totally lost it!

Thanks for any help.

Re: dev20120225 orientation warning!!!

Posted: Sat Mar 03, 2012 7:14 pm
by Th0rsten
Have you tested the "build in" CRIUS_SE?
Sensor orientation has changed in latest DEV.
http://code.google.com/p/multiwii/sourc ... iWii/def.h

Re: dev20120225 orientation warning!!!

Posted: Sat Mar 03, 2012 9:14 pm
by Dellow
Thanks for the reply - yes, I'm using the standard Crius SE definition, and have tried pretty much everything else too.
What I don't understand is that all the sensor values are correct to the normal accepted levels as far as value change on deflection, but the orientation when inverted is not.

Re: dev20120225 orientation warning!!!

Posted: Sat Mar 03, 2012 9:38 pm
by Dellow
Have just tried version 2.0 preversion_1 with default Crius SE defines and still the same. Maybe it's my board?
Hoping someone else has this board and can confirm the behaviour of theirs.
Andy

Re: dev20120225 orientation warning!!!

Posted: Tue Mar 06, 2012 12:38 pm
by ronco
Hi,

ITG 3200's axis are inverted now

this works for me:

Code: Select all

#if defined(ITG3200)
  #define GYRO_ORIENTATION(X, Y, Z) {gyroADC[ROLL] =  Y; gyroADC[PITCH] = -X; gyroADC[YAW] = -Z;}
#endif


edit: it was -X -.-

regards felix

Re: dev20120225 orientation warning!!!

Posted: Tue Mar 06, 2012 7:04 pm
by Th0rsten
Hello Dellow :mrgreen:

Please test these settings für CRIUS_SE:

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

Re: dev20120225 orientation warning!!!

Posted: Tue Mar 06, 2012 9:26 pm
by Waldmensch
I have updated the Page for "WMP Clone mounted on BMA020" with the orientation changes
http://fpv-community.de/wiki/index.php? ... ONE#Ablauf

Re: dev20120225 orientation warning!!!

Posted: Sun Mar 11, 2012 1:15 am
by johnm1
Th0rsten wrote:Hello Dellow :mrgreen:

Please test these settings für CRIUS_SE:

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




I tried this change in 2.0 Pre 1 changing Y; magADC[YAW] = Z; from -Z
, It makes the compass flip 180 every 90 degree rotation on roll and pitch

Re: dev20120225 orientation warning!!!

Posted: Sun Mar 11, 2012 8:26 pm
by Th0rsten
Thanks for the reply.

#define MAG_ORIENTATION(X, Y, Z) {magADC[ROLL] = X; magADC[PITCH] = Y; magADC[YAW] = -Z;}
is the correct line. SE is like the "FREEIMUv035_BMP" as I learned a few days ago.

Re: dev20120225 orientation warning!!!

Posted: Thu Mar 15, 2012 10:02 pm
by dynai
hi,

i've been using my flyduino and FFIMUv1 now for a while on both MULTIWII and Megapirate as for me a change in Multiwiicode is way simpler to do on my own i changed the respective sensor-lines in the def.h file
reason for this, megapirate for some reason has a 90° counter-clock-wise changed orientation of the FFIMU Sensor Board.
Till now i just copied the Sensor-Orientations from the Aeroquad-Shield but as there has been some massive change that didn't work for me.

Here is the orientation i found out for a 90° CCW rotated FFIMUv1 (Megapirate compatible orientation)

Code: Select all

#if defined(FFIMUv1_90) // megapirate compatible
  #define ITG3200
  #define BMA180
  #define BMP085
  #define HMC5843
  #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 MAG_ORIENTATION(X, Y, Z)  {magADC[ROLL]  = -Y; magADC[PITCH]  =  X; magADC[YAW]  = -Z;}
  #define BMA180_ADDRESS 0x80
  #define ITG3200_ADDRESS 0XD0
#endif


what i dont understand, no mather if i use my code changes or if i have the FFIMU in its intended direction (y-dirction on the board pointing to the "front) if i ROLL the copter NORTH becomes SOUTH, if i PITCH it NORTH stays NORTH :shock: :?: :?: :?: shouldn't it be the other way round?

i don't understand this please help

kind regards

Christoph

Re: dev20120225 orientation warning!!!

Posted: Wed Mar 28, 2012 9:23 am
by shaddi
Anyone using the MiniWii-Board from Jussi?

I had to change the Sensor-Orientations for the actual MW 2.0 to the following:

Code: Select all

  #define ACC_ORIENTATION(X, Y, Z)  {accADC[ROLL]  =  -X; accADC[PITCH]  = -Y; accADC[YAW]  = -Z;}


was:

Code: Select all

  #define ACC_ORIENTATION(X, Y, Z)  {accADC[ROLL]  =  X; accADC[PITCH]  = -Y; accADC[YAW]  = -Z;}


Can anybody confirm this?

Re: dev20120225 orientation warning!!!

Posted: Wed Mar 28, 2012 9:34 am
by Noctaro
shaddi wrote:Anyone using the MiniWii-Board from Jussi?

I had to change the Sensor-Orientations for the actual MW 2.0 to the following:

Code: Select all

  #define ACC_ORIENTATION(X, Y, Z)  {accADC[ROLL]  =  -X; accADC[PITCH]  = -Y; accADC[YAW]  = -Z;}


was:

Code: Select all

  #define ACC_ORIENTATION(X, Y, Z)  {accADC[ROLL]  =  X; accADC[PITCH]  = -Y; accADC[YAW]  = -Z;}


Can anybody confirm this?


Hey, look at GUI and compare it to http://www.multiwii.com/faq#How_should_be_the_sensor_axis_directions

greetz Noc

Re: dev20120225 orientation warning!!!

Posted: Wed Mar 28, 2012 9:43 am
by shaddi
Yes, it works correctly. I hoped that somebody with a miniwii-board can confirm this configuration :)

Re: dev20120225 orientation warning!!!

Posted: Sat Mar 31, 2012 7:00 pm
by werkstattonline
Hello everyone

I was really exited and wanted to try the new version of Multiwii. I have seen that sensor orientation has been changed so that you don t have multiple orientation settings for a sensor.

But I am using a simple ITG3205 only config. After uploading I realised that the orientation is wrong now (roll/pitch movement exchanged). Is this a bug :?:

Is this an error or do I have to change every board in my copters so that the orientation is correct again?
That would be pretty stupid. :o

Isn t it possible to define the ITG3200 orientation as it was before (ITG3200 as an own "sensor board")

Thanks for your help and sorry if this has already been answered

Re: dev20120225 orientation warning!!!

Posted: Sat Mar 31, 2012 9:45 pm
by robjames
Go near the bottom of config.h and change the GYRO_ORIENTATION define to this :

#define GYRO_ORIENTATION(X, Y, Z) {gyroADC[ROLL] = Y; gyroADC[PITCH] = -X; gyroADC[YAW] = -Z;}

Make sure it shows proper movement in GUI before flying .

Re: dev20120225 orientation warning!!!

Posted: Sun Apr 01, 2012 9:09 pm
by werkstattonline
Hi Rob

Thanks for the message. Before I saw your tip, I made an own board with different gyro orientation. But your solution is much simpler.

Maybe this should be written somewhere, so that everyone can easily find it.

Re: dev20120225 orientation warning!!!

Posted: Mon Apr 02, 2012 6:49 am
by Alexinparis
It is explicitly written in Change.txt

Board and sensors orientation:
This was something that was not well coded at the beginning.
viewtopic.php?f=8&t=1259
This mod should not affect board definitions (a remapping of axis was done)
About individual sensor orientation: is not the same and it’s normal,
there is no bug to correct here.


Multiwii is not a plug&play soft ;)

Re: dev20120225 orientation warning!!!

Posted: Fri Jun 15, 2012 4:08 pm
by droopy0025
I have an y6 scorpion y650 copter and the crius se multiwii board.

the frame has an prefab mount for my board only problem is that the orientation is rotated by 45 deg.
what code do i need to reorientate the board 45 degree. It could be CCw or Cw as long as i know how to rotate.

thanks Sam