Using RTK GPS for altitude control in 4.1

I recently switched from 4.0.7 to 4.1 and noticed that using EK3_SRC1_VELZ=3 didn’t appear to hold altitude as well as the EK2_Alt_source=2 used to in 4.0.7. It appears that it is still varying with barometric pressure. I have a full RTK Fixed Fix so the altitude should hold to within a few cm.

Has anybody verified that the EK3_SRC1_VELZ=3 holds altitude without drift when using an RTK GPS?

(I’ll post plots and logs tomorrow. )

Hi, I’ve notice a problem with ALT and POS HOLD using RTK GPS. The hexa makes some little “jumps” in the air. I’m not sure if it is related to GPS (ublox f9p), to hexa firmware version (4.1.4). I will try with regular GPS (M8N module).
Firmware version 4.0.x use EKF2 and version 4.1.x use EKF3?
I’m attaching two log files, I’m not seen the “jumps” on de log file, maybe they where to quickly? I could make a video if it helps finding a solution.

Maybe set EK3_SRC1_POSZ as well?

I made another flight with a M8N GPS and now ALT hold and poshold works like a charm.
The wind was a little calm with respect to the GPS RTK test, but I don’t think that could be the issue.

BTW, the “jumps” could be seen by motor current.

Attached new flight log. log_5_2022-5-9-16-31-54 in the same folder

Does your F9P have a RTK Fixed Fix? Regular GPS’s altitude accuracy isn’t very good, but with RTK GPS the altitude should be kept within a few centimeters over many hours.

Yes, I have RTK fixed over the test flight. It seems a problem with the barometer and the wind.
I made some more flight test using M8N GPS (barometer as alt source) and I’ve notice the same jumps on a windy condition. The wind isn’t to high, around 10-13 km/h. I’ve switch to firmware 4.0.7 and notice the same problem. In this case I increase a little EK2_ALT_MSE_N from 3 to 4 and it works a little better.

I will try F9P and EKF3 changing baro to GPS as alt and Vz source.

The weird thing is I’ve never noticed this problem before. I’m not sure what change I made on hardware that fire this problem. I’m thinking on cover pixhawk with some soft material in order to prevent the wind affect the barometer.

It looks like it is working for me after all! The underlying problem was that I needed the RTK offset solution for a correction I was making on the GCS side moving base situation and the production version of ArduCopter 4.1 doesn’t send that to the ground station. I need to patch 4.1 to provide that as well.

Here is a comparison of Baro, Rangefinder and GPS driven altitude

@elgarbe You definitely need to EK3_SRC1_POSZ to use force the use of GPS for altitude control. Once you do that, you should see the M8N altitude very a lot (meters).

One thing I noticed is that the barometric altitude isn’t reset to 0 on arm when GPS is used for altitude control.

I’ve test it today and almost crash my copter: