Now variables don't have to be declared with PROGMEM anymore, so remove
them. This was automated with:
git grep -l -z PROGMEM | xargs -0 sed -i 's/ PROGMEM / /g'
git grep -l -z PROGMEM | xargs -0 sed -i 's/PROGMEM//g'
The 2 commands were done so we don't leave behind spurious spaces.
AVR-specific places were not changed.
we should use baro height not hgt_afe for the climb rate filter. This
makes the climb rate consistent with the one from the EKF. The lidar
correction comes in with the demanded height, not the observed height
This commit changes the way libraries headers are included in source files:
- If the header is in the same directory the source belongs to, so the
notation '#include ""' is used with the path relative to the directory
containing the source.
- If the header is outside the directory containing the source, then we use
the notation '#include <>' with the path relative to libraries folder.
Some of the advantages of such approach:
- Only one search path for libraries headers.
- OSs like Windows may have a better lookup time.
this moves the pitch constraint smoothly between unconstrained and
fully constrained over two time constants before the flare. This
greatly reduces the sudden pitch changes at flare
this predicts ahead the height demand for landing, where we have a
continuous demanded descent. This removes the effect of the lag
introduced by the height demand filters
The introduction of the height rate flare logic caused the demanded height rate to be zero except when a flare manouevre was being performed. This caused the plane to lag behind height changes if the D gain was non-zero, which caused it to fly high during landing approach.
If the plane was unable to achieve the climb and got significantly below the internal TECS demanded climb profile, the the PD term would be a large value at the top of climb, and would take some time to reduce due to the rate limiter. This meant that the integrator state could be pushed to a very low value and effectively cause the throttle to sit on the lower limit for longer than desired after levelling out.
this allows the TECS controlled pitch limits to be smaller than the
FBWA limits. It is common for a human pilot to want a bit more
discretion over pitch than you want the automatic controller to use
The old code relies on the action of the integrator to raise the nose above the minimum pitch angle which depending on the model and the tuning can be too slow to correct. Biasing the pitch angle to climbout minimum will reduce the taken before an overspeed condition is corrected.