Quad drifting when in GPS modes
« on: April 10, 2016, 04:12:54 am »
I compiled the next branch, tried it and attitude mode and it flies stable. I got the neo 7N with the I2C connector, got it all hooked up, calibrated, and even set the pitch to 180. Mag is green, and in the magnetometer settings I set it to aux only and set mag type to flexi. The sliders on the right fluctuate between -1 and 0 every once in a while. Before I tested position hold, I left it on outside for 20minutes, then I brought it in to charge, brought it back outside, let it sit for 3 minutes, spun it 360 in all 3 dimensions, and finally started it up.

I armed it and took off in attitude mode, I got to a decent height, flipped it into POS hold, and it maintained the altitude, but it would yaw slightly, and drift back and to the right. I've done it multiple times with the same results no matter where it's pointing.

I made sure the mag had the correct heading, it's facing forward, and it had 12 SATs.

What could be the issue? Could it be a PID issue? Something calibrated wrong? Bad GPS? Bad mag? Any help is appreciated.

anypis

  • *
  • 26
Re: Quad drifting when in GPS modes
« Reply #1 on: July 09, 2016, 12:06:13 pm »
I guess I have the same problem. So I didn't open a new topic.
ı want to know if anybody can help on this issue.
I made all calibrations outside and after getting gps fix board started to roll and vibrate virtually. Then I recalibrate board, mag and atti. Video shows when the quad is stable outside.

« Last Edit: July 09, 2016, 04:27:38 pm by hwh »

chromvis

  • *
  • 117
Re: Quad drifting when in GPS modes
« Reply #2 on: July 09, 2016, 05:31:31 pm »
Anypis. You are using internal (onboard) magnetometer, your GPS accuracy is low (get yellow after a while), and it looks like your level calibration is OFF. Onboard magnetometer will give you erratic data while flying due to high currents in surrounding wires, system gets confused and usually it results in jerking flight at best. Copter may ewen fly away.

TyniStego. I got this situation several times with LP and with Ardupilot. In several cases the cause was vibration, but not always. I did not yet figure out how to measure vibration with LibrePilot. I got bad tilt to the right in flight for perfectly calibrated copter and it was too stiff mounting of FC on 4 posts with through screws and cushion rings. It appears that one side of FC was completely fixed in place while other could still move. I just remount FC with vibration dampening pad and everything became normal. Altough I never got in Velocity roam same smooth flight as in Attitude mode. On perfectly tuned with atotune copter I had to decrease P and D, and increase I to get decent (barely acceptable behavior in velocity roam mode).

Re: Quad drifting when in GPS modes
« Reply #3 on: July 25, 2016, 04:54:53 pm »
Yaw drift (actually a yawing a few degrees to a new heading) is usually a mag issue.  Aux mags are not a fix for bad motor wiring.  You still need good twisted motor wiring and a good PDB.  A small amount (say 10 degrees) is usually acceptable.  A larger amount will cause toilet bowl and / or fly away because it thinks it is telling it go get closer to desired location when it is really telling it to fly farther away because it doesn't know the correct direction.

Position drift is a GPS issue.  Set it on the ground and watch how much the GCS says the vehicle is moving over the course of say 10 minutes.