Desired Altitude change in AltHold and Loiter Mode

Hey everyone,

I’m experiencing some unusual behavior with my drone, and I’m hoping to get some insights or assistance from the community. I’ve noticed that my drone is randomly ascending and descending when in AltHold and Loiter modes, even when there are no pilot inputs. This is quite perplexing to me, and I’ve gone through the flight logs to investigate further. What I found is that the desired altitude itself is changing unexpectedly.
Logs

This is the first time I’ve encountered this issue. Has anyone else experienced something similar or can offer any explanation for why this might be happening? I’d greatly appreciate any suggestions, tips, or insights to help me troubleshoot and resolve this issue.

Thanks in advance for your assistance!

The altitude changes align closely with pitch, roll and yaw inputs, so I would say the issue is related to tuning. There are also some GPS errors which could be related.

You have many default values, so you still need to do some initial configuration before finishing tuning.

It would be wise to update to latest stable firmware.

First set up your voltage and current monitoring correctly, and disable BATT2 BATT3 and BATT4 (unless one is used for fluid level or something)
You need to be getting valid voltage readings before going further.
Changes to the battery monitors, like type of monitor, require a reboot for them to take effect.

Second connect to MissionPlanner, go to Initial Parameters and put in your battery cell count and prop size, also select the “Suggested” option, click on Calculate and accept EVERYTHING it offers.
Many people neglect to accept some of the battery failsafe related settings and this is a mistake.

Third also set these:

ARMING_CHECK,1        // essential
BRD_BOOT_DELAY,3000   // allow the GPS to boot up first
BRD_SAFETYENABLE,0    // disable the safety switch
BRD_SAFETYOPTION,0
INS_ACCEL_FILTER,10
INS_HNTCH_ENABLE,1
INS_LOG_BAT_MASK,1
INS_LOG_BAT_OPT,4

(no idea why the forum software decides to use a lot of red today :slight_smile: )

Once you got voltages being logged and all parameters set as detailed, then do a test flight in AltHold then some Loiter, no need for aerobatics or anything special - let’s see that log.