Use Measurement For Fixed Wing Position PID D Term - #11831
Conversation
|
ⓘ Qodo reviews are paused because the subscription is no longer active. Ask your workspace admin to reactivate the subscription to resume reviews. Manage billing |
PR Summary by QodoUse course measurement for fixed-wing position PID D-term
AI Description
Diagram
High-Level Assessment
Files changed (1)
|
Code Review by Qodo
1.
|
|
RAM / Flash usage vs. base branch — commit
See RAM/flash optimization guide for techniques to reduce usage. |
|
Test firmware build ready — commit Download firmware for PR #11831 247 targets built. Find your board's
|
Changes fixed wing position PID D term from using error to measurement.
Reason - Error is based on the
virtualTargetBearingwhich can change abruptly when target position changes resulting in large D term spikes. Measurement is course over ground which changes consistently with aircraft movement resulting in consistent changes in D term without spikes.Course over ground (CoG) estimate also changed to smooth the CoG output reducing D term spikes. CoG is now only updated when the position estimate is published to Nav. This removes unnecessary recalculation of CoG at loop rate and also allows smoothing by use of filtered Vel x and Vel y.
HITL testing shows D term spikes are pretty much eliminated during WP missions which is where changes in
virtualTargetBearingtend to occur most often. Hard to say if there is a noticeable improvement in flight control but it may help improve servo life.