Problem with EKF-variance. Loiter always fly foward


I got problem with with Quad. All non gps flight modes works fine, but after activate loiter copter start fly foward. For few seconds i can correct his position but angle is getting deeper and deepers to the front of copter. Take a look on log please.

I see there some weird thing with EKF1- VN and PN, but it does’t tell me anything to solve problem…
its 3.3 rc-3

Thanks :wink:

~5MB on google drive log file


Your vibrations look very odd. like something is tapping the the flight controller.

Also you rcin for pitch has loads of what looks like noise on it…I assume you aren’t wacking the stick up.down? actually they all look noisy

Thanks for some usefull info. I’ll try to stick up all cables. maybe some of those are making that tapping effect.
I need to use some pitch to control copter coz didn’t had enough sprace to let it drift and look what’ll happen.
I’ll lock all lose stuff on quad and try loiter one more time higher and with more space to drift.

Then i give some new logs. Maybe something will clear. Any other sugestions? :wink:

Sorry for post under post but i couldn’t find edit…

Today i made next try in a wider area. I was trying to make only gentle stick inputs and leave to drift loiter as far as i could. At 1st try copter drifted to the back. Few next tries it flew foward and bit left. As i told earlier copter was acceleraiting.

Look at the logs please. I don’t have any idea what the reason could be… its my 1st copter on Ardu…

that log has lots of error flight mode 5’s in it, 5 is loiter. when the error show its not going into to loiter. Not seen that before, your gps looks good.

I am guessing the drift you are seeing is that its in alt hold when you thought you were in loiter. The first 3 attempts didn’t work, later attempts seem to and looking at the DPOS values it looks like it was holding position until alt hold was selected again.

Auto analysis shows

Log File C:/Users/Stuart/AppData/Local/Temp/tmp74A4.tmp.log
Size (kb) 9705.0498046875
No of lines 125755
Duration 1 day, 11:08:09
Vehicletype APM:Copter
Firmware Version V3.3-rc3
Firmware Hash 054f05d2
Hardware Type
Free Mem 0
Skipped Lines 0

Test: Autotune = NA -
Test: Balance/Twist = NA -
Test: Brownout = GOOD -
Test: Compass = WARN - Moderate change in mag_field (25.96%)
Max mag field length (558.25) > recommended (550.00)

Test: Dupe Log Data = GOOD -
Test: Empty = GOOD -
Test: Event/Failsafe = FAIL - ERR found: FLT_MODE
Test: GPS = FAIL - Min satellites: 0, Max HDop: 1.49
Test: IMU Mismatch = FAIL - Check vibration or accelerometer calibration. (Mismatch: 3.01, WARN: 0.75, FAIL: 1.50)
Test: Parameters = GOOD -
Test: PM = NA -
Test: Pitch/Roll = NA -
Test: Thrust = NA -
Test: VCC = GOOD -

Check your compass too, performa cal, compass mot etc. You may be seeing toilet bowling when you do manage loiter.

Oh… i forgot to mention about that errors… I knew about erreors and not triggering Loiter. I heard sounds. Thats why after fail switching to loiter it was so fast switch to altH. Stab and AltH are veery stable. I’m sure that only when i triggered Loiter copter was drifting. Mag errors are probably my fault. I tried to make longer GPS stand to eliminate GPS/MAG problems but it seems, stand is too long and it’s wobble :slight_smile:

I’ll go back to previous GPS setup. And ofc make new mag calibration.

It’s possible to check what is exactly EKF_CHECK-2? Google didn’t help me… I mean its because of IMU or MAG just to check to what component its adressed? I think that “2” on end of error tells what to check yep?

I don’t think that would be the toilet bowls that are so often mentioned… If that will be the reason that bowl should have gigantic radius :smiley: 2-10km? copter was running straight in a decidced direction.

What do that EKF that you can set for ch7,8? (i don’t remember, no copter connected and can’t check) i can disable all EKF use while flying? Because i know that in that version you cannot anymore disable EKF from parameter list, so is it still working for switch?

I’ll put new logs after next attempt.

plotting on google maps shows what you mean.

I don’t think its rcin related. they seem to be close to 1500 when in loiter.

Is the compass oriented properly? I can see its set 0, which is pixhawk default, so is it phsically correct? does its show north when it is placed north on the ground?

Your imx/y/z in ekf3 look like the bad case shown here … -overview/

it says they should not exceed 50, yours do.

Compass is 100% good.

Yep i found that earlier… it exeed 50 but they didn’t tell what to do then… those number are related to what?
I really don’t know… :frowning:

Copter ready for next try…

ohh my mistake… i was looking on other think on that page. Hmm mag problems. I don’t think its why copter is drifting, but i’ll look at it.

Loiter requires good mag. It needs to know exactly where its pointing to get to a waypoint…loiters waypoint is effectively moved about using the sticks.

But when i’m trying to use loiter i don’t use stick at all :slight_smile: he fly away himself… I done mag calibration with disabling auto done and give him more than 7k pints ;p compasmot done. We’ll see. I hope for some effects. Even wobble or big toilet bowl will be nice. Always better than running away :stuck_out_tongue_winking_eye:


Yeah moving the stick doesn’t change what I said, there is a waypoint of sorts…but it has’t moved if you haven’t moved the stick…but the copter is still trying to hold to a point. The copter needs to know what direction it needs to move to get to that point. If it doesn’t know its direction properly, it can keep just heading away…the harder it tries the worse it gets…basically a positive feed back situation.

I am not sure it is mag, but it needs resolving to prove it isn’t. If as you say north is just about north you should only see toilet bowing, not what you are seeing.

what happens if you yaw while it drifts? does it stay on a straight line but yawing, or does it change direction, if so does it correspond to yaw?

It might highlight an avenue for investigation.

I didn’t even check that… i was too busy to control it to check yaw… i’ll check it next time.

Could you please give any of your logs? I don’t even know how the healthy log looks like…

I’ll also check GPS… its gives some weird values on logs. I got M8N from better than oryginal 3dr
but it had some soft crash… Need to make it to default and upload config for Pix one more time…

Ok i made next try. I tried use Yaw while copter is drifting. It don’t change the direction of drift. But i tried to keep it in loiter as long as i could and i saw something interesting. When he drift and i keep him in positin, after few secs he start to drift to the way where he drifted from. Something like hes trying to keep his position but he needs hugh amount of time to think “ops i miss the point” and start to go back. With way too muh speed and angle. And once again miss the spot. I’m stopping him from stick and after few secs once again “ops i miss the point” like a gigantic overshoot…

Here’s the logs: