Browse Source

Improvements for FixedWing Iterm limiting

master
Pawel Spychalski (DzikuVx) 8 years ago
parent
commit
4f892f88ad
  1. 2
      docs/Cli.md
  2. 2
      src/main/flight/pid.c
  3. 2
      src/main/flight/pid.h

2
docs/Cli.md

@ -255,7 +255,7 @@ Re-apply any new defaults as desired.
| `nav_max_climb_rate` | Maximum climb/descent rate that UAV is allowed to reach during navigation modes. In cm/s | 10 | 2000 | 500 | Master | UINT16 |
| `flaperon_throw_offset` | Defines throw range in us for both ailerons that will be applied (before scaling) when FLAPERON mode is activated. | 100 | 400 | 250 | Profile | UINT16 |
| `flaperon_throw_inverted` | Inverts throw offset on both ailerons. Can be used to create SPOILERON or just to change throw direction | OFF | ON | OFF | Profile | UINT8 |
| `fw_iterm_throw_limit` | Limits max/min I-term value in stabilization PID controller in case of Fixed Wing. It solves the problem of servo saturation before take-off/throwing the airplane into the air. By default, error accumulated in I-term can not exceed 1/3 of servo throw (around 165us). | 25 | 500 | 165 | Profile | UINT16 |
| `fw_iterm_throw_limit` | Limits max/min I-term value in stabilization PID controller in case of Fixed Wing. It solves the problem of servo saturation before take-off/throwing the airplane into the air. By default, error accumulated in I-term can not exceed 1/3 of servo throw (around 165us). Set `0` to disable completely. | 0 | 500 | 165 | Profile | UINT16 |
## New iNav specific
| `Variable` | Description/Units | Min | Max | Default | Type | Datatype |

2
src/main/flight/pid.c

@ -334,7 +334,7 @@ static void pidApplyRateController(const pidProfile_t *pidProfile, pidState_t *p
}
#ifdef USE_SERVOS
if (STATE(FIXED_WING)) {
if (STATE(FIXED_WING) && pidProfile->fixedWingItermThrowLimit != 0) {
pidState->errorGyroIf = constrainf(pidState->errorGyroIf, -pidProfile->fixedWingItermThrowLimit, pidProfile->fixedWingItermThrowLimit);
}
#endif

2
src/main/flight/pid.h

@ -28,7 +28,7 @@
#define MAG_HOLD_RATE_LIMIT_DEFAULT 90
#define FW_ITERM_THROW_LIMIT_DEFAULT 165
#define FW_ITERM_THROW_LIMIT_MIN 25
#define FW_ITERM_THROW_LIMIT_MIN 0
#define FW_ITERM_THROW_LIMIT_MAX 500
#define AXIS_ACCEL_MIN_LIMIT 50

Loading…
Cancel
Save