Why is my loiter performance poor?

I have watched plenty of videos showing copters running Navio 2 with locked in positions to the extent that pilots can walk around (or even under) them.

I am having trouble getting my quad to perform like that. I don’t have major issues like obvious toilet bowling or stability problems. I just find that in loiter mode my quad:

  • Will vary its altitude +/- 5 meters
  • Will tend to drift in position +/- 5 meters
    I certainly can’t hover it at eye level and confidently go for a walk around it.
    I also noticed in my last flight that the yaw slowly shifted +/- 20-30deg from the start orientation. But not consistently in one direction

I would love someone to help me troubleshoot. I have attached the logs. Here is my setup and what I’ve done so far:
Navio 2 with Raspberry Pi 2 Model B. Multistar 2213 935kv motors with 10x4.5 nylon props on a deadcat frame for an SK450

The Navio 2 is sitting on a double sided vibration tape and I have checked the logs and I dont think vibrations are a problem looking that data
The Navio sits inside a case and also I have put some foam over the barometer to be extra safe.
I have calibrated the gyros, as well as the compass and I have also done the compass-motor calibration. The 2nd compass is being used as the primary.

I haven’t yet done an auto-tune so it might be PIDs aren’t right yet. But wary of doing it whilst Althold performance is a little sketchy

I note in the logs that the GPS satelittes vary between 11 and 15 during flight. I am not sure if that might affect things.

Occassionally after a short flight I’ll notice the EKF is in an orange state. Generally vel, h. pos and sometimes mag the ones a little high. They usually settle down after a few seconds on the ground.
I never get an “Above ground estimate” flag as green in my Tower app when I use it. But I thought that might be because you can’t get that with barometer and GPS alone.

My current theories are that the compass variances are affecting things. And also that my GPS antenna may be too close to my Navio and that might be preventing it getting a more accurate fix.

Would love some advice. Thanks.

Here are logs from my flights this morning on a windless / light wind day:
16-08-13_11-37-55.bin (1.1 MB)
16-08-13_11-28-08.bin (1.7 MB)

Sounds like you have done all the right things. Without digging into your logs I wound suggest doing an auto tune as I have found this to create a huge difference in performance, second only to balancing and vibe isolation. You can run auto tune for just one axis at a time, switch it on and if things go bad, quickly switch out of autotune or use brake mode to stop the tune.

So I had a flight this afternoon and tried to do autotune. I am not sure if it completed or not cos it seemed to keep going for ages. I might have interrupted it but landed and tried to save the new values. Is there any way I can check if they saved?

During the tune the loiter performance was relatively stable. It did still have positional drift +/- 5 meters, but its vertical drift was better. Probably +/- 2 or 3 meters.

When I took it up again to test to see if the new PIDs had saved I noticed it started toilet bowling which is not something I had seen before. The circle radius was probably 3 meters.
So that has strengthened my hypothesis that the compass is a problem. I know high offsets are a problem with the Navio 2. I read somewhere that apparently this shouldn’t affect flight, but now I am sceptical.

Can someone out there reassure me? My next try will be trying to calibrate compass outdoors and do Mot-compass calibration outdoors too. Then try do auto-tune one axis at a time to increase my confidence the PIDs saved.

Per the wiki, autotune does write some data to the logs, it might show start and completion. But I have never looked. here’s the blurb I am referring to:

Dataflash logging

ATUN (auto tune overview) and ATDE (auto tune details) messages are written to the dataflash logs. Some details of the contents of those messages can be found on the Downloading and Analyzing Data Logs in Mission Planner wiki page.

That being said, unless the copter completely stopped twitching, then the auto tune probably did not complete, it does take a long time, I fi d it better to do the axis individually.

Also regarding the compass, I replaced the brass standoffs and still screws that came with the navio+ with nylon fasteners, I found this reduced the offsets for the compass, didn’t make it all better but helped. Only problem is I couldn’t find offsets that were exactly the same size as the brass ones, they are an odd size like 11mm so I had to cut the nylon ones to size, fyi…