What is the purpose and function of the COMPASS_DEC parameter?

In working on navigation without GPS, I was introduced to the COMPASS_DEC parameter.

My understanding is the EKF3 (and maybe EKF2 also) has a look up table to correct for compass variance. (declination)

This parameter defaults to “0”.

Does this mean that the value of this parameter applied to look-up table value? To “fine tune” the look-up table value, so to speak?

Or is it applied based on some specific conditions for some other purpose?

Also - it’s odd that the units for COMPASS_DEC is in radians. I’ve never seen radians used in navigation tasks.

I’d appreciate any help in understanding this parameter. Thanks!

Release notes explain fairly clearly:

Compass declination can be overriden with COMPASS_DEC param (and EKF stops using world magnetic tables)

Thanks Yuri -

Yes - that’s what the parameter list says.

I guess the question is when this parameter “will” override EKF’s world magnetic tables.

As I noted, the default value is “0” - so it would not appear that this parameter is used unless something else triggers it. Otherwise by default, EKF would be navigating by true north.

A non-zero value is the “trigger.”

Interesting.

I guess that means it’s not possible to set declination to 0.