EKF Drag Specific Forces Parameter Setting

Among ekf tuning parameters, there is ekf drag specific forces.

Developer documents tell me bit position 4 of EKF2_AID_MASK set true,
but in QGroundControl(version 3.2.0) parameter setting, that position means vision yaw fusion enable.

What is wrong? document? or qgroundcontrol?

Even if I didn’t review ekf source code, I guess Drag Specific Forces related to this kind of research. [Martin, The true Role of Accelerometer Feedback in Quadrotor Control, 2009]

I think the parameter values just haven’t been updated yet. Which documentation are you looking at?

This is from the EKF backend.

// Bit locations for fusion_mode
#define MASK_USE_GPS    (1<<0)  // set to true to use GPS data
#define MASK_USE_OF     (1<<1)  // set to true to use optical flow data
#define MASK_INHIBIT_ACC_BIAS (1<<2)  // set to true to inhibit estimation of accelerometer delta velocity bias
#define MASK_USE_EVPOS	(1<<3)  // set to true to use external vision NED position data
#define MASK_USE_EVYAW  (1<<4)	// set to true to use exernal vision quaternion data for yaw
#define MASK_USE_DRAG  (1<<5)	// set to true to use the multi-rotor drag model to estimate wind
1 Like

I’m looking at px4 developer guide; Drag Specific Forces section.
(https://dev.px4.io/en/tutorials/tuning_the_ecl_ekf.html)

It has to be updated in QGroundControl and px4 developer guide.

Interested in creating a pull request to fix it?

The parameter metadata needs to be updated here - https://github.com/PX4/Firmware/blob/master/src/modules/ekf2/ekf2_params.c#L553

Devguide here - https://github.com/PX4/Devguide/blob/master/en/tutorials/tuning_the_ecl_ekf.md

1 Like

I updated dev guide.

But, after I updated ekf2_params.c, but I failed to build.
It looks like it is impossible set bit position 5 of bit mask.

I see this error.

Bitmask bit must be between 0 and 28: EKF2_AID_MASK 32.0

You need to update the @max as well. https://github.com/PX4/Firmware/blob/master/src/modules/ekf2/ekf2_params.c#L547

1 Like

Thanks a lot. No error in make.
But, how can I make it show up in QGroundControl?
I also edited ~/.config/QGroundControl.org/ParameterFactmetaData.xml,
but it doesn’t show up in QGC.

Try flashing the .px4 file through QGC then restarting it.

1 Like