EKF3 calibration with beacon system

We are using DWM1000 for indoor localization, we have 8 anchors in the room, 4 on the floor and 4 on the ceiling, the raw data are very promising in a range of ±5 cm precision also on the Z. The copter flies very well in stabilize and the PIDs are set correctly.
Yestarday in a static test with the copter in a fixed position, the error on x and y was about 2,5 cm and 3,5 cm in the z axis!
I’m using Beacon library, with GPS_TYPE = 0 and EK3_GPS_TYPE = 3 (no GPS)
but what’s the difference using EK3_GPS_TYPE 3 to 0,1 and 3 ?
Does EK3_GPS_TYPE affect Beacon position estimate?

Here is a test with just a take off in stabilize, loiter mode and landind.
In Loiter mode the copter drifts, in particular on the Z axis (very wide oscillations more than 1 meter)


The second issue is the scale and measure in the ekf altitude, you see the red is the raw Z (precise), instead EKF altitude after take off goes to -2 meters, and this problem is also happening at the landing and is really evident.

Here on the left are the raw Position data, on the right the EKF Position, you can see that the EKF take off (violet) and EKF landing (yellow) are at two different altitudes.

The third issue is a delay between the raw Z data and the EKF altitude, I measure about 300ms from the graph


What parameters I could use to affect this delay?
What the best frequencies for my Position datas to EKF?
Does EKF_HGT_DELAY affect the altitude from beacons?

In general what are all the EKF parameters that affect positioning while using Beacons?

Attach is the log of the loiter test, to access the position raw data you havce to plot TDOA / Z

Another note:
I’m not using EK3_ALT_SOURCE = 3 (range beacon) because it’s even worse and I have to set EK3_BCN_M_NSE = 2m to make it usable. So I’m using EK3_ALT_SOURCE = 2 (gps).

In the last tests with EK3_BCN_M_NOISE <= 0.4 I have to use EK3_GPS_TYPE 3 (no GPS),
instead with EK3_BCN_M_NOISE at 2m I could use GPS_TYPE 0,1 and 2.

Does the EK3_BCN_M_NSE parameter influence the estimated position or only raw range beacon distances?

Hi @Giorgio_Rinolfi ,Are you using APBeacon interface? How you did handle data fusion with 5~8 anchors?