Re: Revo AuxMag
« Reply #285 on: May 25, 2016, 01:38:12 pm »
Mateusz,

Thanks for your advice, I think you're right actually, that it is a board rotation issue. I am just going through now, trying to figure out which numbers go in which boxes.

The following link describes correcting your board for magnetic inclination - which axis should this correction be made on? Roll or pitch?

Mateusz

  • *
  • 808
Re: Revo AuxMag
« Reply #286 on: May 25, 2016, 02:00:33 pm »
To my knowledge setting home location which is required for arming anyway sets magnetic inclination automatically since magnetic field is not homogeneous across earth, inclination is needed for mag. Inclination has nothing to do with rotation of mag in roll pitch or yaw directions.

Mateusz

  • *
  • 808
Re: Revo AuxMag
« Reply #287 on: May 25, 2016, 02:08:34 pm »
To my knowledge setting home location which is required for arming anyway sets magnetic inclination automatically since magnetic field is not homogeneous across earth, inclination is needed for mag. Inclination has nothing to do with rotation of mag in roll pitch or yaw directions.
In other words if curious read here https://en.m.wikipedia.org/wiki/Magnetic_dip
But no need to set that.
Only you need to set Mag rotation with respect to FC board. Default is 0,0,0 as that works with OP GPSv9 platinum. Other GPS units may have mag soldered differently.

Re: Revo AuxMag
« Reply #288 on: May 25, 2016, 04:39:09 pm »
Forgot to post the link;

https://librepilot.atlassian.net/wiki/display/LPDOC/Aux+Mag+Setup+and+Calibration

Quote
Set and verify AuxMagSettings.BoardRotation
- Set GCS -> System -> Settings -> AuxMagSettings -> BoardRotation (correctly)
- - Look up (Google) "magnetic inclination" for your location.  For me in USA it is about 62 degrees.  So north for me is north and 62 degrees down also.
- - https://en.wikipedia.org/wiki/File:World_Magnetic_Inclination_2010.pdf
- - When making these changes, use the red up arrow (Save) at the top of the screen.  That will make it permanent, and also put it into effect immediately (no reboot required for changes to this setting).
- - Watch AuxMagSensor.  BoardRotation is correct if you point the nose of the GPS/mag north (and e.g. 62 down) and see a high positive number (+400) for X and flip the GPS/mag so tail is now pointing north and you see X has become a large negative number (-400).  These +-400 can easily be +100-800 or +600-300 for example.  If you are truly pointing the GPS/mag north, X will be the largest change and the change will make the number a lot more negative (about 800 more negative, taking it from about +400 to about -400)
.

What does this section refer to? Are these instructions redundant if you have your home location set?
« Last Edit: May 25, 2016, 04:49:50 pm by JCalver88 »

Re: Revo AuxMag
« Reply #289 on: May 25, 2016, 07:20:06 pm »
Settings Home Location is a different thing.

I haven't used Basic+Mag+GPS.  I always use INS13.  I always use AuxMagSettings.Usage=AuxOnly.  Don't forget to calibrate your mags.

Those AuxMag instructions are long winded, but it is important to read and understand, otherwise you are as bad off as a cave man that I throw my car keys to and tell him to go get a hamburger.  :)  Well almost...

(note that I just pushed a source code change (25 May 2016) that makes the following numbers correct again)
GPSV9 and DJI GPS/mags both start with BoardRotation=0,0,0
Most PixHawk GPS/mags start with BoardRotation=0,180,0 (180,0,180 also works.  Prove it by flipping your hand around.)
These are ALL numbers you start with.  If you have race tilt motors that are tilted 15 degrees, you must subtract 15 from Attitude->Settings->RotateVirtual->Pitch (so usually -15) and you must add 15 to AuxMagSettings.BoardRotation.Pitch (so 195 for many PixHawk GPS/mags).
If you don't have race tilt motors, you leave those numbers alone.

Think of a single dice (a western right handed dice) that must be glued on in the correct orientation.  "One" must be pointing forward.  But that isn't enough.  Two must be pointing right and three must be pointing down.  (If your dice is left handed, 3 will be pointing up and there is nothing you can do about it.)

The 3D (forward-backward, right-left, down-up) (forward, right, and down are all positive direction) mag sensor just tells what it sees.  Example: For me in North America where north is also 62 degrees down if I point the quad nose north and 62 degrees down, the FC should see +400 on the forward-backward (x) mag sensor.  If the sensor is installed incorrectly (same thing as BoardRotation set wrong), it may see +400 on the left and right mag sensor. will get confused and the HUD will wobble roll and flip around constantly (INS13 at least).

BoardRotation MUST be set correctly.  If you have your PixHawk GPS/mag installed pointing forward, that is usually pitch=180 (or roll=180, pitch=0, and yaw=180 also works).

The instructions posted are a way of determining whether you have BoardRotation set correctly.  My BoardRotation is set correctly and I am in North America where north is north and also about 62 degrees down.  If I point my quad nose at north I get about +400 on x (and small values on y and z).  If I flip the quad to point the tail at north then I get -400 on x (and still small values on y and z).  Repeat for y and right side.  Repeat for z and down.  This tells me that BoardOrientation is correct.  Set your AuxMagSettings.BoardRotation.Pitch to 180.  Look up your magnetic inclination (dip) on the following map.  Verify that your x, y, and z now look correct.

https://upload.wikimedia.org/wikipedia/commons/d/de/World_Magnetic_Inclination_2015.pdf

For northern hemisphere north is also downward.  For southern hemisphere north is also upward.  Don't worry, it is just the magnetic field direction.  :)

My main test quad uses INS13 with a 30 back degree tilted FC/PixHawkGPS/mag stack that simulates 30 degree race tilt motors.
« Last Edit: May 25, 2016, 10:19:35 pm by TheOtherCliff »

Re: Revo AuxMag
« Reply #290 on: May 25, 2016, 09:39:21 pm »
Wait.  Looks like the AucMagSettings.BoardRotation stuff has been changed.  :(
GPSV9 and DJI are no longer 0,0,0 and I need 180,0,90 for PixHawk.
That is not right.  I will fix it.

Re: Revo AuxMag
« Reply #291 on: May 25, 2016, 10:17:39 pm »
For those of you building your own from source code

I fixed it both in bitbucket alessiomorale/librepilot.git  shared/LP-72_Sparky2_support
and bitbucket theothercliff/librepilot.git  shared/LP-72_Sparky2_support

GPSV9 and DJI now use AuxMagSettings.BoardRotation = 0,0,0 as they should
and most PixHawk use 0,180,0 (or the equivalent 180,0,180)

Re: Revo AuxMag
« Reply #292 on: May 26, 2016, 10:33:34 am »
The instructions posted are a way of determining whether you have BoardRotation set correctly.  My BoardRotation is set correctly and I am in North America where north is north and also about 62 degrees down.  If I point my quad nose at north I get about +400 on x (and small values on y and z).  If I flip the quad to point the tail at north then I get -400 on x (and still small values on y and z).  Repeat for y and right side.  Repeat for z and down.  This tells me that BoardOrientation is correct.  Set your AuxMagSettings.BoardRotation.Pitch to 180.  Look up your magnetic inclination (dip) on the following map.  Verify that your x, y, and z now look correct.

Sorry for pressing the point, I just want to make sure I understand you correctly.

So, when I point the nose of my quad north, and 62 degrees towards the floor, it should read +400? Or when I point the nose north, and level to the ground it should read +400?

Thanks for your detailed explanations

Oulala69

  • *
  • 30
  • DIY 450 mini revo AIRGEAR 350 NEO-8N GCS 16.09-RC2
Re: Revo AuxMag
« Reply #293 on: June 14, 2016, 01:26:23 pm »
Dear all, is there a way to find a GCS version (next branch version) to support external Mag ?

I am not able to compile a version my self, so if someone have a windows 32bits version to share, i would love it and test it

in advance thank you

Have good flights

Re: Revo AuxMag
« Reply #294 on: June 15, 2016, 03:22:52 pm »
Here is a link to the latest version I was able to build.

Sadly, it still has bootup issues (revo may not boot up, or boots,  but ESCs do not initialize) when auxmag is connected to flexiport vi I2C.

https://drive.google.com/file/d/0B2_XeG7fVEtAajlJUmVRb0trM00/view?usp=drivesdk

Jhinta

  • ***
  • 198
Re: Revo AuxMag
« Reply #295 on: June 15, 2016, 03:39:11 pm »
Set your esc to 490 it will boot

Verstuurd vanaf mijn LG-D855 met Tapatalk

Re: Revo AuxMag
« Reply #296 on: June 17, 2016, 10:48:31 am »
Set your esc to 490 it will boot

Verstuurd vanaf mijn LG-D855 met Tapatalk
Thx! It does indeed seem to do the trick.

Sent from my GT-I9505 using Tapatalk


Re: Revo AuxMag
« Reply #297 on: June 17, 2016, 04:59:29 pm »
The instructions posted are a way of determining whether you have BoardRotation set correctly.  My BoardRotation is set correctly and I am in North America where north is north and also about 62 degrees down.  If I point my quad nose at north I get about +400 on x (and small values on y and z).  If I flip the quad to point the tail at north then I get -400 on x (and still small values on y and z).  Repeat for y and right side.  Repeat for z and down.  This tells me that BoardOrientation is correct.  Set your AuxMagSettings.BoardRotation.Pitch to 180.  Look up your magnetic inclination (dip) on the following map.  Verify that your x, y, and z now look correct.

Sorry for pressing the point, I just want to make sure I understand you correctly.

So, when I point the nose of my quad north, and 62 degrees towards the floor, it should read +400? Or when I point the nose north, and level to the ground it should read +400?

Thanks for your detailed explanations

Sorry for late reply.

The "north" in above discussion means "north and down".  The +400 means "max value" which could be 400 to 500 (and maybe even 300 to 800 or so for an uncalibrated mag).  The point is that if you point head or tail of each axis along the magnetic direction (north and down in northern hemisphere, north and up for southern hemisphere, look up the magnetic inclination or magnetic dip for your location), then that axis should show large plus for head or minus for tail ... and the other axes should show much less, ideally zero if you point exactly along magnetic direction.

Re: Revo AuxMag
« Reply #298 on: June 30, 2016, 03:57:19 am »
It seems that 'auxmag' is broken in the latest 'next' builds.
I2C status is green even when the compass is not powered.  ???

If the external compass is powered, the values in the system/data objects tab seems correct (and change if you turn the external compass), but the compass on the firmware tab does nothing. It changes direction only if you turn the Revo board. For some reason it seems that it uses it's onboard mag even if you select auxmag.

Re: Revo AuxMag
« Reply #299 on: June 30, 2016, 08:28:55 am »
I2C is a bus that can have several things plugged in at the same time.  In our case, the code looks toward the day when you may have more than one thing plugged in to I2C, like aux mag and airspeed.

I am going to make a guess that the I2C port on the FC is working fine, but it just didn't find anything to talk to.