Jacarebs

  • *
  • 22
  • My drone will eventually get along with my mag
Drift and tilting while on the ground
« on: February 14, 2017, 02:25:12 am »
Hey!

I've been reading some topics on the forum for a while and I've been searching the web a lot about this problem but could not find a solution. The problem is that I've got the Revo FC (https://hobbyking.com/en_us/openpilot-cc3d-revolution-revo-32bit-flight-controller-w-integrated-433mhz-oplink.html), which I came to know that, originally, there would be either CC3D or the Revo board, the one with both names would be a chinese copy. Anyways, I've been trying to get the Ublox Neo-6M GPS (https://hobbyking.com/en_us/mini-ublox-neo-6m-gps-for-cc3d-revolution-flight-controller-w-built-in-compass.html) working. As far as I've researched, I came to know that the mag in this GPS does not come wired, which I ended up wiring and connected it to my FC. I compiled the 15.09+r969-g19fa385 version of LibrePilot and could check that the auxiliary mag was indeed working. I tried calibrating it many times and also used both mags to get the best readings every time. The GPS also gets a lock perfectly fine, with easily 10 sats. The problem is that as soon as I get a position lock, the readings on LibrePilot just goes nuts. I mean, look at the first attachment, the drone is tilted 90 degrees and the altimeter says it's 4.3m up in the air, moving at 0.5m/s, when it is actually resting on the floor. On the map, the drone is constantly moving, as seen on the second attachment. All of these readings were done in an open field area, to be clear.

I honestly don't know what else I need to do. The Attitude Estimation Algorithm is set to INS13 and the GPS configuration is set to the main port, with a 57600 baud rate and the UBX protocol. The flexi port, to which the aux mag is connected, is set to I2C, as was discussed by me and some other friends on reddit (https://www.reddit.com/r/diydrones/comments/4xy4be/ublox_neo6m_gps_with_builtin_compass/).

Please, help! I want to fly this baby real bad and I've been in this mess for so long!

Thanks, guys!

f5soh

  • *****
  • 4572
    • LibrePilot
Re: Drift and tilting while on the ground
« Reply #1 on: February 14, 2017, 10:01:22 am »
Hi,

Altitude is relative to previous Home defined.
About the wrong Attitude, be sure the AuxMag orientation is set correctly.



Jacarebs

  • *
  • 22
  • My drone will eventually get along with my mag
Re: Drift and tilting while on the ground
« Reply #2 on: February 14, 2017, 05:40:50 pm »
Strangely, as soon as I took the board out of the drone and did it, it worked like a charm, hahahaha. Well, I'm a bit reluctant to believe that it was that easy, though. I will try to validate these results as hard as I can before flying it. Thanks for the help, buddy! :) I will test it today and see if I can fly it. I will report the result as soon as I can.

Thanks!

Re: Drift and tilting while on the ground
« Reply #3 on: February 14, 2017, 08:15:45 pm »
Do you have System -> Settings -> AuxMagSettings.BoardRotation set to 0,180,0 or 180,0,180 (they are the same).  You must do this manually for some older versions.  Also, there was an issue where you needed to reset the mag stuff before running mag calibration.  This is all much easier and better in 16.09.  :)

Jacarebs

  • *
  • 22
  • My drone will eventually get along with my mag
Re: Drift and tilting while on the ground
« Reply #4 on: February 14, 2017, 09:33:15 pm »
Do you have System -> Settings -> AuxMagSettings.BoardRotation set to 0,180,0 or 180,0,180 (they are the same).  You must do this manually for some older versions.  Also, there was an issue where you needed to reset the mag stuff before running mag calibration.  This is all much easier and better in 16.09.  :)

Thanks! The only reason I did not use the 16.09 version is because I'm relying on 4G data to acess the internet, since I'm far com the city, and my data plan is running on its limit. I will download it as soon as I get back. I could get the mag working, tho. I will test my drone today, probably, and will report the results :). From the calibrations, I could sort the mag out, but I will double check it following your comment :).