AP_TECS: blend weights when changed #3
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Context
Weights change in a step manner which can cause large pitch commands specifically for quadplanes after transition.
Proposal
Blend the speed weighting.
Testing: note this testing has the logging added for TECS SKE (ArduPilot#25287)
Initial testing
before_with_poor_handoff.BIN.txt
Figure: TECS weights with airspeed. 1) start of transition 2) end of transition
Figure: TECS weights with DesPitch. 1) Start of transition,
TEC2.KEWsteps and pitch steps in unison. 2) End of transition,TEC2.KEWsteps and DesPitch steps in unison.After change testing with blend factor 1 to test no effect
after_with_default_1.BIN.txt
Figure: TECS weights with airspeed. 1) start of transition 2) end of transition
Figure: TECS weights with DesPitch. 1) Start of transition,
TEC2.KEWsteps and pitch steps in unison. 2) End of transition,TEC2.KEWsteps and DesPitch steps in unison. Default behavior remains the same.After change with blend factor 100
after_with_blend_100.BIN.txt
Figure: Figure: TECS weights with airspeed. 1) start of transition 2) ~end of transition
Figure: TECS weights with DesPitch. 1) Start of transition,
TEC2.KEWramps and pitch steps to a lesser extend (-2.5 instead of -5). 2) End of transition,TEC2.KEWramps and DesPitch remains smooth.CAUTION
This change does result in significant altitude loss when performing detransition with a blend factor of 100. A smaller blend factor should likely be used.

For example, a blend factor of 10 results in -3.5 des pitch in transition (instead of -5.5) and ~ 1 meter of altitude lost in detranstion.