Maneke

  • *
  • 24
Spiral trajectory in GPS mode
« on: November 15, 2016, 04:37:46 pm »
Hello,
I'm trying to get a correct hover fly in PositionHold. My drone is flying well in Stabilized mode but in PositionHold mode it drift in pitch and roll axis faster and faster so I need to switch back in stabilized mode to stop the spiral flight.
I've tried to play with some settings in VtolPathFollowerSettings such as HorizontalVelMax or HorizontalVelPID but I didn't notice any good changes.
Does someone knows how to set the PositionHold mode ?

Re: Spiral trajectory in GPS mode
« Reply #1 on: November 15, 2016, 05:24:33 pm »
What you describe sounds like what we call "toilet bowl" and is caused by mag misalignment.  The mag misalignment is usually caused by being fooled by magnetic fields coming from the high current (thick) wires.

Twist ALL your thick wire pairs and triplets (battery to connector, connector to PDB, PDB to ESC, ESC to motor).  Use an external (aux) mag.

Don't play with your aux mag board rotation numbers just to try to get all the mag alignment numbers closer to zero.  These rotation numbers should generally be multiples of +-90.  Also "race mount" motors must be accounted for.  Read the aux mag wiki.
https://librepilot.atlassian.net/wiki/display/LPDOC/Aux+Mag+Setup+and+Calibration
« Last Edit: November 15, 2016, 05:27:40 pm by TheOtherCliff »

Maneke

  • *
  • 24
Re: Spiral trajectory in GPS mode
« Reply #2 on: November 15, 2016, 06:23:30 pm »
Thank you TheOtherCliff
I have a Naza clone GPS with a aux Mag sensor but it's true that the Mag value is around 10% and may be too much.
I'll do what you say (twisting the wires) and see if the mag works better.

Maneke

  • *
  • 24
Re: Spiral trajectory in GPS mode
« Reply #3 on: November 16, 2016, 02:53:09 pm »
Hello,
All my wires are now twisted, I made the mag calibration again (outdoor this time) and made a new test flight. Unfortunately I still have that "toilet bowl".
I have an external mag in the Naza GPS and it's mounted on a quite high mast so I guess that it's far away enough from the magnetic fields.
On the mag screen the internal mag is less than 1% and the external is about 1,5%. I've attached the screenshot.
Do you see anything else that I could check ?

jtrout19

  • ****
  • 334
Re: Spiral trajectory in GPS mode
« Reply #4 on: November 16, 2016, 04:39:20 pm »
Vibrations caused me a whole load of issues. Did you balance your props are they spinning level?

Re: Spiral trajectory in GPS mode
« Reply #5 on: November 16, 2016, 05:03:38 pm »
It looks like your problem is that your "Utilization Mag" is set to "Both" so it is using both the aux mag and the onboard mag.

Set it to "Aux Only" or similar.

Maneke

  • *
  • 24
Re: Spiral trajectory in GPS mode
« Reply #6 on: November 16, 2016, 05:46:12 pm »
It looks like your problem is that your "Utilization Mag" is set to "Both" so it is using both the aux mag and the onboard mag.

Set it to "Aux Only" or similar.
I've already test on Aux only and internal only but that doesn't change anything