FPV-G

  • *
  • 16
Revo - incorrect compass reading
« on: April 26, 2016, 05:19:01 am »
Hi,  I did all the calibrations correctly 3 times in Revo.  when i point the arrow in the board towards North , GCS shows South, exactly the opposite.  how to correct this ?

how will this effect the autonomous flight capabilities ?

hwh

  • *
  • 1018
Re: Revo - incorrect compass reading
« Reply #1 on: April 26, 2016, 05:28:17 am »
Autonomous uses the gps coordinates for that type of thing.   The compass takes whatever direction the craft is pointing when it's powered up as North initially.  I'm not positive but I think once the gps comes online and the craft starts moving the compass will correct itself.

f5soh

  • *****
  • 4572
    • LibrePilot
Re: Revo - incorrect compass reading
« Reply #2 on: April 26, 2016, 07:07:23 am »
For Compass you need a FusionAlgorithm that uses Mag.

Can be something like Comp+Mag or INS13Indoor that works without GPS for testing indoor.
Go to UAvoBrowser and search for RevoSetting > FusionAlgorithm

And save using the small Hdd+Red arrow icon.

« Last Edit: April 26, 2016, 07:10:48 am by f5soh »

Mateusz

  • *
  • 808
Re: Revo - incorrect compass reading
« Reply #3 on: April 26, 2016, 09:57:25 am »
Hi,  I did all the calibrations correctly 3 times in Revo.  when i point the arrow in the board towards North , GCS shows South, exactly the opposite.  how to correct this ?

how will this effect the autonomous flight capabilities ?

If you used internal magnetometer, it must point the way you move it and what @f5soh wrote fusion algorithm must be set to use compass in the equation.
If you use external one, then it can be that firmware assumes that magnetometer is oriented the same way as internal one, and when external one is up-side down, you can get right behaving as left, and left as right...etc Then you need either to correct for that in settings or attach magnetometer in the same orientation (not possible if it's inside GPS unit, as GPS antenna must point upwards, you must use Mag settings in that case).

FPV-G

  • *
  • 16
Re: Revo - incorrect compass reading
« Reply #4 on: April 27, 2016, 05:39:01 am »
Thanks all ,  I will try out fusion and get back

darkdave

  • ***
  • 152
Re: Revo - incorrect compass reading
« Reply #5 on: May 02, 2016, 08:10:07 am »
My librepilot is connected to a Ublox GPS in my QAV250. Everytime I turn on my drone it thinks that the position it was facing is true north.

Do I need to make sure it always faces true north each time I power on my drone?

Or is my librepilot damaged? Or do I need an external compass or a GPS with a built in compass? I like to have some suggestions on a model GPS and compass built into it if that is the case.

David

Mateusz

  • *
  • 808
Re: Revo - incorrect compass reading
« Reply #6 on: May 02, 2016, 09:07:56 am »
Hi David,

To my knowledge GPS has no clue where true north is, unless it is moving undisturbed in one direction. The only way for the device to know where the true north is, is to use magnetometer.
If your GPS unit has built-in magnetometer like HMC5883L, I recommend putting GPS unit on a ~14cm stand far from power wires (which should preferably be twisted). If it's Naza compatible GPS, it may be able to transmit magnetometer samples over the same serial wires as GPS signal. If it's other M8N, they may have two I2C wires or you need to break those wires out and make connector yourself.

Then you need to do outdoors calibration (important highligted) by keeping copter in the air and using oplink, far away from your laptop. Copter should be a complete build, which you are not going to change after calibration, otherwise Mag recalibration will be needed.

You also have to make sure your external (AuxMag) is oriented the same way as Mag inside flight controller. If it's not, then it's possible to correct rotation for AuxMag in GCS.

Also note that AuxMag for other than OP GPS units, is supported only in development branch "next". Development code, may compile or may not, but usually it works.

Mateusz

  • *
  • 808
Re: Revo - incorrect compass reading
« Reply #7 on: May 02, 2016, 10:51:39 am »
A good learning place is this post (reading it pays off) The ABC Steps of Autonomous Flight on Multicopters https://forum.librepilot.org/index.php?topic=15.msg36#msg36
and Wiki https://librepilot.atlassian.net/wiki/display/LPDOC/LibrePilot+Documentation

It is long, but don't skip anything, it will be useful especially if you are new.

f5soh

  • *****
  • 4572
    • LibrePilot
Re: Revo - incorrect compass reading
« Reply #8 on: May 02, 2016, 11:40:38 am »
Moved thread

If you use the Basic Fusion Algorithm , the mag is not used.
At power up the gyro start with a "North" and do not use Mag

https://forum.librepilot.org/index.php?topic=1444.msg10657#msg10657

FPV-G

  • *
  • 16
Re: Revo - incorrect compass reading
« Reply #9 on: May 08, 2016, 05:32:15 am »
Thanks every one !!!