AHRS_ parameters

19 parameters in the AHRS_ family. ArduCopter 4.7 only — other vehicles share many of these names but not always the same ranges or meanings.

AHRS_COMP_BETA

AHRS Velocity Complementary Filter Beta Coefficient

This controls the time constant for the cross-over frequency used to fuse AHRS (airspeed and heading) and GPS data to estimate ground velocity. Time constant is 0.1/beta. A larger time constant will use GPS data less and a small time constant will use air data less.

Range

0.001 to 0.5

Increment

0.01

User level

Advanced

AHRS_CUSTOM_PIT

Board orientation pitch offset

Autopilot mounting position pitch offset. Positive values = pitch up, negative values = pitch down. This parameter is only used when AHRS_ORIENTATION is set to CUSTOM.

Units

deg

Range

-180 to 180

Increment

1

User level

Advanced

AHRS_CUSTOM_ROLL

Board orientation roll offset

Autopilot mounting position roll offset. Positive values = roll right, negative values = roll left. This parameter is only used when AHRS_ORIENTATION is set to CUSTOM.

Units

deg

Range

-180 to 180

Increment

1

User level

Advanced

AHRS_CUSTOM_YAW

Board orientation yaw offset

Autopilot mounting position yaw offset. Positive values = yaw right, negative values = yaw left. This parameter is only used when AHRS_ORIENTATION is set to CUSTOM.

Units

deg

Range

-180 to 180

Increment

1

User level

Advanced

AHRS_EKF_TYPE

Use NavEKF Kalman filter for attitude and position estimation

This controls which NavEKF Kalman filter version is used for attitude and position estimation

User level

Advanced

Values

Value

Meaning

0

Disabled

2

Enable EKF2

3

Enable EKF3

10

Sim

11

ExternalAHRS

AHRS_GPS_GAIN

AHRS GPS gain

This controls how much to use the GPS to correct the attitude. This should never be set to zero for a plane as it would result in the plane losing control in turns. For a plane please use the default value of 1.0.

Range

0.0 to 1.0

Increment

0.01

User level

Advanced

AHRS_GPS_MINSATS

AHRS GPS Minimum satellites

Minimum number of satellites visible to use GPS for velocity based corrections attitude correction. This defaults to 6, which is about the point at which the velocity numbers from a GPS become too unreliable for accurate correction of the accelerometers.

Range

0 to 10

Increment

1

User level

Advanced

AHRS_GPS_USE

AHRS use GPS for DCM navigation and position-down

This controls whether to use dead-reckoning or GPS based navigation. If set to 0 then the GPS won’t be used for navigation, and only dead reckoning will be used. A value of zero should never be used for normal flight. Currently this affects only the DCM-based AHRS: the EKF uses GPS according to its own parameters. A value of 2 means to use GPS for height as well as position - both in DCM estimation and when determining altitude-above-home.

User level

Advanced

Values

Value

Meaning

0

Disabled

1

Use GPS for DCM position

2

Use GPS for DCM position and height

AHRS_OPTIONS

Optional AHRS behaviour

This controls optional AHRS behaviour. Setting DisableDCMFallbackFW will change the AHRS behaviour for fixed wing aircraft in fly-forward flight to not fall back to DCM when the EKF stops navigating. Setting DisableDCMFallbackVTOL will change the AHRS behaviour for fixed wing aircraft in non fly-forward (VTOL) flight to not fall back to DCM when the EKF stops navigating. Setting DontDisableAirspeedUsingEKF disables the EKF based innovation check for airspeed consistency. Setting AutoRecordOrigin will auto-save the EKF origin to parameters when it becomes valid.

User level

Advanced

Bitmask

Value

Meaning

0

DisableDCMFallbackFW

1

DisableDCMFallbackVTOL

2

DontDisableAirspeedUsingEKF

3

RecordOrigin

4

UseRecordedOriginForNonGPS

AHRS_ORIENTATION

Board Orientation

Overall board orientation relative to the standard orientation for the board type. This rotates the IMU and compass readings to allow the board to be oriented in your vehicle at any 90 or 45 degree angle. The label for each option is specified in the order of rotations for that orientation. This option takes affect on next boot. After changing you will need to re-level your vehicle. Firmware versions 4.2 and prior can use a CUSTOM (100) rotation to set the AHRS_CUSTOM_ROLL/PIT/YAW angles for AHRS orientation. Later versions provide two general custom rotations which can be used, Custom 1 and Custom 2, with CUST_ROT1_ROLL/PIT/YAW or CUST_ROT2_ROLL/PIT/YAW angles.

User level

Advanced

Values

Value

Meaning

0

None

1

Yaw45

2

Yaw90

3

Yaw135

4

Yaw180

5

Yaw225

6

Yaw270

7

Yaw315

8

Roll180

9

Yaw45Roll180

10

Yaw90Roll180

11

Yaw135Roll180

12

Pitch180

13

Yaw225Roll180

14

Yaw270Roll180

15

Yaw315Roll180

16

Roll90

17

Yaw45Roll90

18

Yaw90Roll90

19

Yaw135Roll90

20

Roll270

21

Yaw45Roll270

22

Yaw90Roll270

23

Yaw135Roll270

24

Pitch90

25

Pitch270

26

Yaw90Pitch180

27

Yaw270Pitch180

28

Pitch90Roll90

29

Pitch90Roll180

30

Pitch90Roll270

31

Pitch180Roll90

32

Pitch180Roll270

33

Pitch270Roll90

34

Pitch270Roll180

35

Pitch270Roll270

36

Yaw90Pitch180Roll90

37

Yaw270Roll90

38

Yaw293Pitch68Roll180

39

Pitch315

40

Pitch315Roll90

42

Roll45

43

Roll315

100

Custom 4.1 and older

101

Custom 1

102

Custom 2

AHRS_ORIGIN_ALT

AHRS last origin altitude

AHRS last origin altitude in meters

Range

-200 to 5000

User level

Advanced

AHRS_ORIGIN_LAT

AHRS last origin latitude

AHRS last origin latitude in degrees

Range

-180 to 180

Increment

1

User level

Advanced

AHRS_ORIGIN_LON

AHRS last origin longitude

AHRS last origin longitude in degrees

Range

-180 to 180

User level

Advanced

AHRS_RP_P

AHRS RP_P

This controls how fast the accelerometers correct the attitude

Range

0.1 to 0.4

Increment

0.01

User level

Advanced

AHRS_TRIM_X

AHRS Trim Roll

Compensates for the roll angle difference between the control board and the frame. Positive values make the vehicle roll right.

Units

rad

Range

-0.1745 to +0.1745

Increment

0.01

User level

Standard

AHRS_TRIM_Y

AHRS Trim Pitch

Compensates for the pitch angle difference between the control board and the frame. Positive values make the vehicle pitch up/back.

Units

rad

Range

-0.1745 to +0.1745

Increment

0.01

User level

Standard

AHRS_TRIM_Z

AHRS Trim Yaw

Not Used

Units

rad

Range

-0.1745 to +0.1745

Increment

0.01

User level

Advanced

AHRS_WIND_MAX

Maximum wind

This sets the maximum allowable difference between ground speed and airspeed. A value of zero means to use the airspeed as is. This allows the plane to cope with a failing airspeed sensor by clipping it to groundspeed plus/minus this limit. See ARSPD_OPTIONS and ARSPD_WIND_MAX to disable airspeed sensors.

Units

m/s

Range

0 to 127

Increment

1

User level

Advanced

AHRS_YAW_P

Yaw P

This controls the weight the compass or GPS has on the heading. A higher value means the heading will track the yaw source (GPS or compass) more rapidly.

Range

0.1 to 0.4

Increment

0.01

User level

Advanced