Skip to content

Crafty — Snappier Horizon for Track Flying

Only CLI profile 2 (PID Profile 3 in the Configurator) was changed. Profiles 0 and 1 are untouched, so switching profile brings back the old feel.

How Horizon uses feedforward

Horizon has no feedforward setting of its own. It blends two setpoints:

  • Near centre stick, self-levelling dominates. Its stick response is driven by angle_feedforward, with the tilt target scaled by angle_limit.
  • At larger deflection, the acro part takes over and the normal f_roll / f_pitch / f_yaw feedforward applies.

horizon_level_strength sets how hard levelling pulls; horizon_limit_sticks sets how early it fades as the stick moves.

Changes

SettingBeforeAfterWhy
horizon_level_strength7535Less pull back to level, closer to acro
horizon_limit_sticks7545Levelling fades out earlier with stick
angle_feedforward50100Faster response in the levelling part
feedforward_smooth_factor6545Less lag between stick and response
feedforward_boost1520Sharper onset of each stick move
angle_limit6070More tilt, so more speed in Angle and Horizon

Rates and throttle_limit_percent = 80 are shared across craft and were left alone. The throttle scale is the biggest remaining limit on top speed.

Accelerometer recalibration

After the change Horizon felt off. Sitting still on a level table, Crafty reported pitch past +37° and roll past −15°. Two separate faults:

ReadingValueMeaning
acc_calibration385,-492,-130Tilts a level craft ~14° roll and ~11° pitch
Accelerometer magnitude1.10 gFar enough from 1 g that the IMU likely stopped trusting it
Gyro at rest5–7 °/sBad boot-time gyro calibration, integrated freely

Subtracting the stored offsets gave a raw reading of almost exactly level, so the chip was fine and the stored calibration wrong. The gyro reports as ICM42622P; the old offsets may predate it. Fixed with MSP_ACC_CALIBRATION (code 205), level and still, then a save and reboot.

BeforeAfter
acc_calibration385,-492,-130-41,43,-156
Attitude at restpitch +37°, driftingroll +0.1°, pitch −0.1°
Gyro at rest5–7 °/s~0 °/s
The same calibration works from the radio: disarmed, level and still, throttle high + yaw left + pitch back calibrates the accelerometer; throttle low instead recalibrates the gyro. The gyro also recalibrates on every battery plug-in.

Test plan and rollback

Fly gently first: low level strength with high angle feedforward can overshoot when the stick snaps to centre. If Horizon feels too loose, raise horizon_level_strength to 50 first.

python tools/bf_cli.py --save "profile 2" \
  "set horizon_level_strength = 75" "set horizon_limit_sticks = 75" \
  "set angle_feedforward = 50" "set feedforward_smooth_factor = 65" \
  "set feedforward_boost = 15" "set angle_limit = 60"