Skip to content
Snippets Groups Projects
Commit ae7f61b0 authored by Roman's avatar Roman
Browse files

tecs: added method to handle ekf height resets


Signed-off-by: default avatarRoman <bapstroman@gmail.com>
parent 1e1bf7e4
No related branches found
No related tags found
No related merge requests found
......@@ -267,6 +267,20 @@ public:
_detect_underspeed_enabled = enabled;
}
// in case of a height reset driven by the estimator we need
// to allow TECS to swallow the step in height and demanded height instantaneously
void handle_alt_step(float delta_alt, float altitude) {
// add height reset delta to all variables involved
// in filtering the demanded height
_hgt_dem_in_old += delta_alt;
_hgt_dem_prev += delta_alt;
_hgt_dem_adj_last += delta_alt;
// reset height states
_integ3_state = altitude;
_integ1_state = _integ2_state = 0.0f;
}
private:
struct tecs_state _tecs_state;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment