f5soh

  • *****
  • 4572
    • LibrePilot
Re: GPS assist and Heli
« Reply #15 on: November 18, 2017, 09:45:44 am »
You need to test the PositionHold first, be sure is solid without toilet bowling in all cases.
Be prepared to go back in Attitude mode if something wrong occurs.


karla

  • *****
  • 629
Re: GPS assist and Heli
« Reply #16 on: November 18, 2017, 10:36:35 am »
Tried position hold today - toilet bowl  ::)
Whats the first actions to fix it?
The mags and calibration looks good, but I noticed the compass is spinning round.


f5soh

  • *****
  • 4572
    • LibrePilot
Re: GPS assist and Heli
« Reply #17 on: November 18, 2017, 12:52:03 pm »
Toilet bowling means the heli do a correction of position, but not in the right direction/heading.
Can be a mag disturbed by strong currents or wrong orientation of AuxMag.

Be sure the Mag alarm still green while main motor is running at full load.
Set Mag usage to AuxMag only and keep away your GPS/Mag away from strong currents.
Twist all power wires or at least keep red/black wires close together.

Re: GPS assist and Heli
« Reply #18 on: November 19, 2017, 12:43:20 am »
aux mag orientation is important

look at Flight Data page.  Is PFD stable or is it flipping around violently, like completely upside down and flipping around like a fish out of water.

karla

  • *****
  • 629
Re: GPS assist and Heli
« Reply #19 on: November 19, 2017, 05:05:27 am »
Thank you both.
I will double check all what you mentioned and test in the field later today.

Just want to confirm something.
The Revo board is mounted inside the Trex frame, on one of the sides and therefor needs to be virtually rotated like this:



But the external mag is a OP v9 GPS (kind of) and mounted pointing forward on the tail boom, so it should be rotated 0,0,0. Now, does the fact that the Revo and the external Mag are mounted differently make a problem for the mags to align and the INS13 attitude estimation algorithm?



In the PFD the model is turning correctly when I move the heli around, yaw left right, pitch and roll. The fc also make compensations in the correct directions.

To further complicate this a bit, is the compensation of 5 degrees roll I use to make this heli hover at zero stick input (the tail rotor effect). This is how I set it up.
First a put in the virtual rotate the board in the Attitude | Settings, then using complementary attitude estimation algorithm I do the Board level calibration. Then I fly it in Attitude mode and adjust the BoardLevelTrip roll and pitch until it hovers without any stick input.
After this I change to INS13 and hover in attitude mode and adjust the external mag rotation to hover without any stick input. As good as it allows.
Maybe there is a better procedure?



In the field, the external mag is always green and internal mag at warning or red. I have not worried so much that they don't align since the internal mag is almost always wrong... should I?
« Last Edit: November 19, 2017, 05:29:06 am by karla »

Re: GPS assist and Heli
« Reply #20 on: November 19, 2017, 05:37:32 am »
Different FC vs. aux mag orientations is fine if you configure it correctly; just remember that the angles (FC and uax mag) are relative to the driftless Attitude mode hover orientation.  I have to scratch my head and check the code or read wiki and extrapolate/empirical when doing strange FC mounting.  If the PFD moves correctly (including roll left makes PFD go right) and stabilization moves in the correct direction, then you have  proven it is correct.

Level hover:  That is the way I set it up:  RotateVirtual (Attitude mode using CF/Basic) and aux mag orientation trimming (Attitude mode using INS13).  It makes sense and I haven't found anyone to say it wasn't the way to do it if you want it perfect.

That OnBoard mag does really look bad.  Is there a magnet close by the FC?

I sometimes use an FC or GPS/mag sitting still on the wooden table and view a mag sensor (not mag state) scope while I move the thing under test close to it.  If there is a mag field in the thing, this will show you.  It will also show you how close you can get before the mag sensor is affected.  This helps when deciding how far the aux mag needs to be away from component X.  You could move the heli FC close to the table FC and look for a change...

f5soh

  • *****
  • 4572
    • LibrePilot
Re: GPS assist and Heli
« Reply #21 on: November 19, 2017, 11:17:00 am »
Quote
Level hover:  That is the way I set it up:  RotateVirtual (Attitude mode using CF/Basic) and aux mag orientation trimming (Attitude mode using INS13).  It makes sense and I haven't found anyone to say it wasn't the way to do it if you want it perfect.

Latest INS13 used in Next will not need anymore this level of precision because Mag will not contradict the roll+pitch estimate derived from accelerometers. Complementary+Mag+GPS can be used as well using Next.

@karla Can you post your config file ?

karla

  • *****
  • 629
Re: GPS assist and Heli
« Reply #22 on: November 19, 2017, 11:19:00 am »
I sometimes use an FC or GPS/mag sitting still on the wooden table and view a mag sensor (not mag state) scope while I move the thing under test close to it.  If there is a mag field in the thing, this will show you.  It will also show you how close you can get before the mag sensor is affected.  This helps when deciding how far the aux mag needs to be away from component X.  You could move the heli FC close to the table FC and look for a change...
Thanks. I will remember this one.
K

karla

  • *****
  • 629
Re: GPS assist and Heli
« Reply #23 on: November 19, 2017, 11:24:43 am »
That OnBoard mag does really look bad.  Is there a magnet close by the FC?

I know, its really messy inside the heli, power cables close, 600mW FPV transmitter back to back and OSD board 2 mm away plus a Video source switch. The onboard mag is doomed and forever confused :) Forget him.

karla

  • *****
  • 629
Re: GPS assist and Heli
« Reply #24 on: November 19, 2017, 12:02:21 pm »
I checked all things you mentioned
. Aux mag mounted correct way - yes forward looking
. Aux mag orientation okay (0.0.0) - yes
. Mag only Aux - yes
. Mag green - yes
. Mag green at full throttle - yes still at 0.0-1.5% error
. PFD horizon not jumping around like fish without water - calm when good # of sats, bit jumpy when less.
. Alignment of Onboard and Aux mag - well, when onboard gets better then alignment better so I don't worry.



First when I got to the field I had, smack 11 sats on 3 minutes! flew one lipo pack.
Next round I had to wait for 45 min get a 3D position, and not a very good one. Flew another lipo pack.

I could only engage Position hold mode for some seconds each time since it was obviously not going well, and I want to regain control before out of control. It was typically first reducing throttle and then increasing it and then compensating too much, too abrupt with pitch backwards, then I did not want to experience more of that but bailed out ...

When sats where good then the flight with Attitude was much smoother and just like flying with Complimentary. When sats where just barley ok then flying was unpredictable and not locked in.

I am not using Next now but LP 16.09.

@Laurent,
Attached is the oav file and one log file where I engage Position hold some 3 times very short.

My own thinking is that the mags a pretty okay, the sats and my GPS might be crappy and maybe I should just try to calibrate my PIDs better, since now they are very laxed and could get much more snappy.
Any other settings to make the position hold adjustments not so violent?
« Last Edit: November 19, 2017, 12:12:15 pm by karla »

f5soh

  • *****
  • 4572
    • LibrePilot
Re: GPS assist and Heli
« Reply #25 on: November 19, 2017, 12:50:46 pm »
You may switch to Next and get rid of INS13 / 3D Mag issues in 16.09 and also made possible Complementary+Mag+GPS usage.

First at all, did you try a simple Attitude stabilization + AltitudeVario/AltitudeHold ?
Try setting the SystemSettings > ThrustControl to Collective maybe.
In all cases the Stabilization tab > AltitudeHold settings will need some tuning.

You can also set SystemSettings > VtolPathFollowerSettings > ThrustControl to Manual so you will remove the Throttle changes while switching to PositionHold and only check the position behavior (and possible toilet bowling)

Simple check about Mag: point the Heli to the North and check if the compass matches heading in PFD.

karla

  • *****
  • 629
Re: GPS assist and Heli
« Reply #26 on: November 20, 2017, 03:22:04 am »
Thanks, that was a bunch of good tips.
When this is reasonably resolved I will come back to the GPS assist, I could not enable it even though I disabled the sanity check of the flight modes. Its due to an Error of the ? -symbol (config), that prevents it from arming.

Re: GPS assist and Heli
« Reply #27 on: November 20, 2017, 04:14:29 am »
Quote
Level hover:  That is the way I set it up:  RotateVirtual (Attitude mode using CF/Basic) and aux mag orientation trimming (Attitude mode using INS13).  It makes sense and I haven't found anyone to say it wasn't the way to do it if you want it perfect.

Latest INS13 used in Next will not need anymore this level of precision because Mag will not contradict the roll+pitch estimate derived from accelerometers. Complementary+Mag+GPS can be used as well using Next.

I remember hearing about that.  Is it an option to use 2D vs. 3D mags?  I imagine that 3D mags are better in the following use case which (as I imagine) causes problems in Basic/CF AttiEstAlgo and now will cause the same problem in INS13:

Fly a quad in Attitude mode for a long time in a straight line using forward pitch stick (like flying 2km FPV).  After a while, you must add more and more pitch to keep it flying forward.

f5soh

  • *****
  • 4572
    • LibrePilot
Re: GPS assist and Heli
« Reply #28 on: November 20, 2017, 10:26:54 am »
Quote
Fly a quad in Attitude mode for a long time in a straight line using forward pitch stick (like flying 2km FPV).  After a while, you must add more and more pitch to keep it flying forward.
Think when you are in a train, after the acceleration phase at start and when speed is stabilized for hundreds of kilometers in a straight line:
- do you fell horizontal acceleration ?
- do you need to bank your body to compensate something ?
- when you take a drink, liquid surface is inclined ?
In my opinion this situation do not cause any issues.

One known situation is when you are flying circles for some time, due to centrifugal forces.

f5soh

  • *****
  • 4572
    • LibrePilot
Re: GPS assist and Heli
« Reply #29 on: November 20, 2017, 11:24:39 am »
Quote
When this is reasonably resolved I will come back to the GPS assist, I could not enable it even though I disabled the sanity check of the flight modes. Its due to an Error of the ? -symbol (config), that prevents it from arming.
Maybe you are trying to arm while the flightmode switch is one GPS/GPSAssisted mode ?
You must choose one flightmode with only primary stabilization for arming.