← All tools

Message & Error Explainer

What an ArduPilot message means and what to do about it

Українська

A position controller gain is zero or negative

Stops itAutoTune and control

What ArduPilot says:

Also explained here: 4 more
  • …_ACCZ_P must be > 0
  • …_NE_POS_P must be > 0
  • …_D_POS_P must be > 0
  • …_D_ACC_I must be > 0

ArduPilot checks five gains of the position controller before arming: PSC_POSXY_P, PSC_POSZ_P, PSC_VELZ_P, PSC_ACCZ_P and PSC_ACCZ_I. Each must be above zero; with a zero the copter cannot hold its place or its height in the modes that do that for you (AltHold, Loiter, Auto). The message names the first that is not, as “PreArm: Bad parameter: …”.

What to do, most likely first

  1. A gain was set to 0 by hand or by a tuning knob.

    CheckRead the gain the message names.

    FixGive it a positive value again. A fresh Copter has PSC_POSXY_P 1.0, PSC_POSZ_P 1.0, PSC_VELZ_P 5.0, PSC_ACCZ_P 0.5 and PSC_ACCZ_I 1.0.

  2. The gains came with a parameter file from another aircraft or were only partly written.

    CheckParameter Compare & Migrate shows what differs from your earlier file.

    FixLoad your own backup, or the values above, and tune from there.

Parameters to look at

ParameterWhat it is
PSC_POSXY_PPosition (horizontal) controller P gain
PSC_POSZ_PPosition (vertical) controller P gain
PSC_VELZ_PVelocity (vertical) controller P gain
PSC_ACCZ_PAcceleration (vertical) controller P gain
PSC_ACCZ_IAcceleration (vertical) controller I gain
The code that sends it

…_POSZ_P must be > 0

libraries/AC_AttitudeControl/AC_PosControl.cpp AC_PosControl::pre_arm_checks() · Open in ArduPilot Copter-4.6.3

…_VELZ_P must be > 0

libraries/AC_AttitudeControl/AC_PosControl.cpp AC_PosControl::pre_arm_checks() · Open in ArduPilot Copter-4.6.3

…_ACCZ_I must be > 0

libraries/AC_AttitudeControl/AC_PosControl.cpp AC_PosControl::pre_arm_checks() · Open in ArduPilot Copter-4.6.3

…_POSXY_P must be > 0

libraries/AC_AttitudeControl/AC_PosControl.cpp AC_PosControl::pre_arm_checks() · Open in ArduPilot Copter-4.6.3

And 6 more messages, sent from the same places.

Written here for Copter 4.6. In the tool you choose your vehicle and version, see your own parameter values beside the ones named here, and drop a flight log to have every message in it explained.

Open it in the Message & Error Explainer