Loiter problems and others (logs attached)

Hello everyone,
I've recently started playing again with my APM 2.0 (with mediatek GPS) equipped custom frame.
I've flashed Arducopter 3.2 (c8e0f3e1).
Now I encounter several issues, I will list them all:

1) When I switch to loiter (is it the equivalent of PosHold if no way-points are given?), randomly the copter goes crazy, it has already happened two times and I was just able to save it before crashing on the neighbor rooftop :D

2) Alt hold mode is working kinda fine, but it is clearly not using the sonar, when I put my hand underneath the copter there is no reaction, moreover the copter used to follow the ground with great precision while now it would go up and down slowly. The sonarrange parameter is working properly, looking at the telemetry, but I have the impression that the altitude shown in the interface is not taking into account sonar feedback.

3) The copter looks badly tuned compare to the previous build (Arducopter 2.x), even if I copied the PID values from that. I guess that something has changed in the way of considering those values, nevertheless, by looking at the logs, it is maybe possible to give me a hint...

4) I plugged the camera tilt output on output 7, randomy the camera would point upward. I checked the log and it is actually commanded by the output 7, while the rc input is not moving... Is there a safety feature maybe?

I attach the latest log (I don't know which format is preferred). You can identify the loiter going crazy by looking at the roll angle, there is a spike which has been caused by that.

Thanks for your support,
Best regards,

Edit: added point 4

2015-02-08 10-37-35.bin

2015-02-08 10-37-35.log

2015-02-08 10-37-35.kmz

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

Join diydrones

Email me when people reply –


  • On point 4: I just noticed it does it when in altitude hold...

    • An update on point 1:

      I managed to reproduce the problem, I attach the log, you can see at around 4:30, 6minutes and other times.

      Basically plotting the difference between desRoll and Roll will show you the problem!

      Thanks everyone,


      2015-02-13 17-45-34.bin

      • Here is a screenshot also...

        Screenshot 2015-02-13 19.57.00.png

        • OK, I looked at your log. Your pitch and roll do not follow the desired very well in general. Looks like it needs to be tuned up better. Have you used auto tune? Maybe your issue is that when changing modes the control gets over whelmed as it looks to me to be quite lazy.

          • Thanks Stuart!

            No I didn't try autotune yet, up to today I didn't fly in a wide open area and I'm afrai of autotuning with trees around. Now I found a good area, so I will try (I couldn't today because I didn't set up the auto tune trigger).

            I have further analysed the logs, and I think that this behavior is present when yawing, which is reasonable because the engines are working at a different level so at another position in the throttle curve. I have the impression that mine is particularly non-linear...

            • no probs....looking again I am not sure if gains are low or high....it seems quite oscillatory.

              edit, I thought your D was a lot less than default, but I not actually sure what default is. I still suggest trying auto tune.

              Yaw shouldn't affect things unless something is wrong.

  • Using mission planner auto evaluate

    Test: Autotune = UNKNOWN - No ATUN log data
    Test: Balance/Twist = GOOD -
    Test: Brownout = GOOD -
    Test: Compass = FAIL - Large change in mag_field (23274.49%)
    Min mag field length (1.73) < recommended (120.00)

    Test: Dupe Log Data = GOOD -
    Test: Empty = GOOD -
    Test: Event/Failsafe = FAIL - ERR found: GPS_GLITCH
    Test: GPS = FAIL - GPS glitch errors found (5)
    Min satellites: 10, Max HDop: 1.02
    Test: IMU Mismatch = NA -
    Test: Parameters = GOOD -
    Test: PM = FAIL - 7 slow loop lines found, max 9.49% on line 49264
    Test: Pitch/Roll = FAIL - Roll (-65.99, line 49045) > maximum lean angle (45.00)
    Test: Thrust = GOOD -
    Test: VCC = GOOD -

    Have you done a compass MOT?

    Looking at the log files shows GPS glitches too, although your sat count looks good hdop glitches up to high values momentarily.

    Poor loiter is usually compass related. Although your offset look ok, so have you done a compass MOT?

    • Hi!

      No, I didn't do compass mot, I'll do it!

      Thanks for the tip.

      Any idea about the sonar not used in altitude hold issue?

      • Hi, I'm not certain, but I recall sonar being removed recently in the newer firmwares on the older APMs due to lack of space for the code.


This reply was deleted.


sam liked Jimmy Oliver's profile
Aug 25
Mike Whitney liked Mike Whitney's profile
Jul 19
Abdulatif Tlaib liked Ryan's profile
Jun 24