A controller gain is zero or negative
What ArduPilot says:
- PreArm: Bad parameter: …
The position controller (PSC parameters) and the attitude controller (ATC parameters) each check their own gains before arming. The message names the one that fails and what it must be, for example “PSC_POSXY_P must be > 0”. The P gains of position, height and angle must be above zero; the rate controllers' P and I must be above zero (or not negative when a feed-forward is set) and their D not negative. With such a gain the controller cannot hold the copter.
What to do, most likely first
The parameters came from another aircraft, another version, or a half-written file.
CheckParameter Compare & Migrate lists what differs from the defaults and moves a 4.6 file to 4.7 names and units.
FixSet the named parameter back to its default, then check the rest of that group.
The gain was typed by hand while tuning, and a zero or a minus sign slipped in.
FixGo back to the starting values for your copter's size and tune again from there.
Parameters to look at
| Parameter | What it is |
|---|---|
PSC_POSXY_P | Position (horizontal) controller P gain |
PSC_POSZ_P | Position (vertical) controller P gain |
PSC_VELZ_P | Velocity (vertical) controller P gain |
PSC_ACCZ_P | Acceleration (vertical) controller P gain |
PSC_ACCZ_I | Acceleration (vertical) controller I gain |
ATC_ANG_RLL_P | Roll axis angle controller P gain |
ATC_ANG_PIT_P | Pitch axis angle controller P gain |
ATC_ANG_YAW_P | Yaw axis angle controller P gain |
Where to do it:Parameter Compare & MigrateStarting Parameters
The code that sends it
PreArm: Bad parameter: …
ArduCopter/AP_Arming.cpp AP_Arming_Copter::parameter_checks() · Open in ArduPilot Copter-4.6.3
ArduCopter/AP_Arming_Copter.cpp AP_Arming_Copter::parameter_checks() · Open in ArduPilot Copter-4.7.1
ArduPlane/AP_Arming.cpp AP_Arming_Plane::quadplane_checks() · Open in ArduPilot Plane-4.6.3