Loiter Issue - Unable to resolve

I have set my quad up and it flies great in stabilize mode and alt-hold works well.

However, I have been unable to maintain loiter in nil wind conditions.  Approx 1-2 seconds after selecting loiter (from approx 10m agl) the quad will begin to track anti-clockwise from its original position in an large arc approx 15m in diameter.  Speed increases and if I were to leave it in loiter it would fly into the ground at a shalllow angle after a few seconds.  I immediately thought toilet bowling!  BUT:

I have an Adafruit HMC5883L compass module specified to run on 3.3v or 5v power/logic - perfect for APM.  3DR 2.6 board with Arducopter 3.15 quad firmware, sonar and 433mhz Mavlink groundlink.

My 2 compassmot results were 3% and 2% respectively.  The compass is mounted on a post and the mount is braced, solid and cannot move.

Hdop figures are good.  

I have tried disabling COMPASS_AUTODEC and inputing the figure manually.

My live calibration technique is as per Chris Anderson's demo video and I generally get over 800 samples before completion.

Vibration levels in the log file data are within recommended specs.

My frame is an S500 - very solid with minimal flex and  balanced with underslung battery.

Note:  I have also noticed that the quad occasionally looses orientation in stabilize mode i.e. pitch forward may result in roll left etc etc.   Sometimes this will self fix and othertimes I must land and then take off again.  I originally thought that this maybe something to do with Simple/Super Simple modes triggering - but they are all disabled in the parameters.  I have not determined the cause but suspect it occurs after yawing maneuvers. 

If I were to guess I would suggest a compass error but surely this would manifest at all times and in stabilize mode?  I'm stuck!  Any advice appreciated as always.  

Thanks

2014-08-05 18-28-13.log

You need to be a member of diydrones to add comments!

Join diydrones

Email me when people reply –

Replies

  • If it helps anyone I solved the orientation issue in stabilize mode today:

    I had CH7 set to engage SSimple Mode.  Turns out CH7 settings on my Taranis meant that although the CH7 switch was 'OFF' the PWM output didn't drop below 1550 meaning that Super Simple mode must have been engaging as if the switch was 'ON'.

    I changed the settings so that 'Off' meant PWM of 970 and 'ON' meant 2000 and this issue has dissapeared.  

    I'm able to fly stabilize mode without issue now and promptly started pushing the limits in my garden until I knicked the willow tree and crashed!

    Happy though:)

  • 100KM

    Agreed with other Ben here. I have seen the exact behavior on a well calibrated quad when my compass orientation was set wrong by accident. Does the red line for current heading on mission planner move and orient correctly as you rotate the quad?

    • I've been troubleshooting my drone shooting off when in loiter for days now. Once I read your comment Ben I checked my compass was oriented correctly and lo and behold it was 180 degrees out. Now it is fixed.

      It's hard to see in any of my logs the actual problem but I would have thought that an error should be detected between the GPS and compass that the headings were wrong.

  • I had this problem back in my early setup days. I found that even though the printed arrows on my external compass seemed to be correct, and calibration seemed to go ok, I still was getting the 'arc into another direction' reaction.

    What helped me was to look at the flight screen in Mission Planner and see how the quadcopter icon was aligned and pointing, and sure enough, it was pointing 90 degrees off for me.

    I then changed the compass setup so that '180 rotation' was now '90 degrees rotation' and this worked for me.

    I also found that I was having trouble setting compass declination, but figured it out by clearing the eeprom in terminal, and then installing an earlier version of mission planner and using it to set. My issue was described here: http://diydrones.com/forum/topics/declination-in-another-dimension?...

    Anyway, setting the compass direction and setting declination helped me to achieve steady loiter. Also, putting my compass & gps on a mast improved results too.

    • Thanks Ben,

      I would say you're on the money with your assesment.  I checked in Mission Planner and the compass readings were very close to 90 degrees off what my smartphone was telling me so it would appear that the printed markings on the breakout board are wrong..  I have changed the mounting parameters in Mission Planner and it is now orientated correctly.

      I have yet to test fly but would be surprised if this doesn't offer my solution.

      Thanks for your help.

      Simon Chandler,

      Worcester, UK.

      • awesome! I helped someone! :D :D :D

        • Yes you did  :).

          I flight tested yesterday and loiter was rock solid in nil wind - works very well with the sonar at low alt.  RTL is perfect as well.   I was really loosing confidence in APM after fly offs and a couple of failsafe crashes.   I even ordered a Naza M v2 kit with telemetry link which I think may be on Ebay soon.   It's nice but the capabilities are really limited in comparison with APM.  Their PC groundstation software is a nightmare as well.

          But... once this compass issue was identified all of my other work and research was vindicated.  Steep learning curve but I feel satisfied I can work with APM now.

          You live and learn ;).

          Thanks again everyone who commented.

          Simon Chandler.

          Worcester, UK.

  • Tune your declination with channel 6 (set it up in extended tuning section), set it change between -3 and 3 (-30 degrees and 30 degrees) then tune it until you get rid of the toilet bowl. Also do multiple compass calibrations away from computers and metal and compare the values.

    (that should fix the loiter issue)

    Your compassmot and vibes are good so i am not sure what could be causing the issues in stab

    GL

  • Try unplugging and disabling the sonar.

    • Sonar disconnect did not fix the loiter issue.  Turns out my compass orientation was out by 90 degrees because the breakout board orientation markings have been printed wrong.  Thanks for your suggestion.

This reply was deleted.

Activity