Silvan Fuhrer
740bf63fa7
TECS: set _ratio_underspeed to 0 if airspeed disabled
...
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2023-12-08 16:26:10 +01:00
Thomas Stastny
3c9c5f7184
FixedwingPositionControl: slightly simplify manual position control (use navigateLine() to be sure no turnaround)
...
make notes on odd things that are likely still wrong
2023-09-12 11:22:22 -04:00
Silvan Fuhrer
77d09785f3
TECS: init _velocity_control_traj_generator properly
...
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2023-05-15 13:53:32 +02:00
Silvan Fuhrer
8f520ab019
tecs: fix throttle prediction ( #21444 )
...
* tecs: fix throttle prediction
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
---------
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
Co-authored-by: Thomas Stastny <thomas.stastny@auterion.com>
2023-04-06 20:13:32 +02:00
Silvan Fuhrer
460956fd33
TECS: revert altitude controller to old logic
...
- if the height rate input into TECS is finite, use that one to
update a velocity reference generator
- if the velocity reference generator reports position locked or
height rate input is not finite, then run altidue reference generator
- run altitude controller only if altitue is controlled
if height_rate_setpoint is set, only use that one to update altitdue trajectory
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2023-04-06 20:12:52 +02:00
Silvan Fuhrer
60cd20c19c
TECS: make more readable
...
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2023-04-06 20:12:52 +02:00
Silvan Fuhrer
2d01cf63ce
TECS: rename _reference_model to _altitude_reference_model
...
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2023-04-06 20:12:52 +02:00
Silvan Fuhrer
beeae1f673
TECS: rename TECSReferenceModel to TECSAltitudeReferenceModel
...
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2023-04-06 20:12:52 +02:00
Silvan Fuhrer
1f5046f165
FWPositionControl: trim throttle prediction improvements ( #21345 )
...
* FWPositionController: add linear airspeed-to-trim-throttle mapping
Scale trim throttle in a linear way with airspeed.
Different gradients above/below trim airspeed.
The airspeed- and airs density-corrected trim throttle is required for an accurate
throttle prediction in TECS, while the default trim throttle is still needed
as well, as the throttle delta from height rate setpoint delta is linked to it.
---------
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2023-04-06 11:56:54 +02:00
Silvan Fuhrer
28db47480d
TECS: remove ununsed getSteRate()
...
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2023-03-16 16:58:08 +01:00
Silvan Fuhrer
76116d79f9
TECS: remove umcommanded_descent flag
...
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2023-03-01 10:39:09 +01:00
Silvan Fuhrer
837095b9a8
tecs: use FW_T_SINK_MIN for STE_rate_min ( #21190 )
...
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2023-02-24 15:46:41 +01:00
Silvan Fuhrer
88ec117e59
TECS: rename tecs_status.altitude_filtered to altitude_sp_ref
...
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2023-01-26 17:04:43 +01:00
Silvan Fuhrer
5099a91f87
TECS: keep _pitch_integ_state in radians
...
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2023-01-26 17:04:43 +01:00
Silvan Fuhrer
e16f98c2b6
FW Position controller: remove unused climbout arguments
...
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2023-01-26 17:04:43 +01:00
KonradRudin
d3b7112dd9
[TECS]: If in airspeedless mode, add the throttle integrator term to the throttle setpoint, if the integrator term is positive. This should avoid reducing airspeed when switching to airspeedless mode. ( #20987 )
2023-01-25 09:16:11 +01:00
Konrad
f5524fa605
TECS: Combine both airspeed and airspeed derivative filters in TECS into one MIMO filter using a steady state Kalman filter.
2022-12-21 09:04:19 +01:00
Konrad
08c36612b3
TECS: Updated throttle control for airspeed sensorless vehicles. It includes the P gain controller instead of feedforward only. I term is still disabled.
2022-12-21 09:04:19 +01:00
Konrad
77539d4dac
TECS: Rearrange setpoint input. If an altitude rate is given, use this as a feedforward term in the altitude control. If an altitude setpoint is given use a reference model to get a smooth altitude setpoint.
2022-12-21 09:04:19 +01:00
Konrad
8c6dfc840b
TECS: Fix bug to reset airspeed derivative and energy rate low pass filters at every time step.
2022-12-21 09:04:19 +01:00
Konrad
7a3e0f53c2
TECS: Replaced old tecs by cleaned up version.
2022-12-21 09:04:19 +01:00
Konrad
991689d3cd
TECS: Add new tecs library in parallel to old tecs in the position control library for comparison.
2022-12-21 09:04:19 +01:00
Silvan Fuhrer
d8e483ae20
TECS: guard against NAN airspeed setpoints
...
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2022-10-21 09:51:38 +02:00
Thomas Stastny
a12e40b1d8
tecs: convert tas error and soft bounds to percentage of trim airspeed
2022-07-18 10:49:27 -04:00
Thomas Stastny
1782f9cd3e
tecs: zero guard ste rates and airspeed setpoint rates
2022-07-18 10:49:27 -04:00
Thomas Stastny
73010cc69b
TECS: speed (only) -based underspeed detection
...
- underspeed condition only determined by true airspeed undershoot
- change binary underspeed condition to a continuous percent undersped
- ramp-in max throttle, pitch speed weight, and TAS setpoint reduction during underspeed to avoid jumpy commands at the true airspeed error boundary
- let true airspeed filter reach zero airspeed
2022-07-18 10:49:27 -04:00
Thomas Stastny
eed073887d
remove in air vs landed knowledge from TECS
...
- create integral and trajectory generator reset methods
- always run TECS unless in rotary-wing mode (or in transition)
- constantly reset TECS integrals and trajectory generators when landed
2022-07-18 10:49:27 -04:00
RomanBapst
92cdff6798
TECS: rename airspeed/throttle "cruise" to "trim"
...
Signed-off-by: RomanBapst <bapstroman@gmail.com>
2022-07-12 09:07:20 +02:00
RomanBapst
b57d3c6d74
TECS: set true airspeed rate setpoint to zero if airspeed is not enabled
...
Signed-off-by: RomanBapst <bapstroman@gmail.com>
2022-07-12 09:07:20 +02:00
RomanBapst
56cf77a74c
addressed review comments
...
Signed-off-by: RomanBapst <bapstroman@gmail.com>
2021-11-05 18:04:33 +01:00
Roman Bapst
d58d13b2e8
APX4-1617: Fix manual climb rate in TECS ( #1463 )
...
* tecs: workaround for the fact that vel smoothing lib uses a DOWN coordinate system
Signed-off-by: RomanBapst <bapstroman@gmail.com>
2021-11-05 18:04:33 +01:00
RomanBapst
924298e9c3
addressed review comments
...
Signed-off-by: RomanBapst <bapstroman@gmail.com>
2021-11-05 18:04:33 +01:00
RomanBapst
0ac3077bdc
tecs: use trajectory generation library to compute height rate setpoint
...
- added ability to specify maximum acceleration constraint for height rate setpoint
- added support for locking altitude setpoint when in height rate control
mode and height rate input is zero
Signed-off-by: RomanBapst <bapstroman@gmail.com>
2021-11-05 18:04:33 +01:00
Daniel Agar
883624d915
lib/geo: move from ecl
2021-07-15 10:38:24 -04:00
RomanBapst
ad9288536b
TECS: enable direct height-rate control
...
Signed-off-by: RomanBapst <bapstroman@gmail.com>
2021-06-04 14:51:27 +02:00
RomanBapst
a5cc449e69
tecs: propagate altitude setpoint based on target climb/sink rate
...
- avoids tecs always climbing and sinking and max rates and allows to fine tune these rates
- avoid numerical calculation of feedforward velocity using derivative, this
was prone to jitter in dt
Signed-off-by: RomanBapst <bapstroman@gmail.com>
2021-06-04 14:51:27 +02:00
RomanBapst
b06b46b224
log raw airspeed derivative, pitch setpoint and airspeed innovation for TECS
...
Signed-off-by: RomanBapst <bapstroman@gmail.com>
2021-05-31 23:56:23 +02:00
Silvan Fuhrer
4b42a1639b
TECS: in airspeed-less mode, set airspeed estimate to cruise airspeed
...
In airspeed-less mode, instead of the average of min/max airspeed, take the cruise
airspeed (from param) for current airspeed estimate. A diff of the airspeed setpoint
from this value results in increased enegery demand (incerase of throttle) even
in airspeed-less mode.
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2021-05-28 14:25:53 +02:00
RomanBapst
b66ae5f2d4
tecs: use raw inertial acceleration for true airspeed complementary filter
...
Signed-off-by: RomanBapst <bapstroman@gmail.com>
2021-03-31 20:12:40 -04:00
RomanBapst
82a2126f97
TECS: add feedforward gain for total energy balance rate
...
Signed-off-by: RomanBapst <bapstroman@gmail.com>
2021-03-15 11:47:07 -04:00
CarlOlsson
b4b424bf7d
tecs: also fix the bug in update_vehicle_state_estimates()
2021-03-05 19:44:20 +01:00
CarlOlsson
0f461f7f60
TECS: Fix internal state init if dt is large
2021-03-05 19:44:20 +01:00
Daniel Agar
cb7aabf932
fw_pos_control_l1: cleanup body velocity and acceleration usage
...
- minimize storing unnecessary state (msg copies)
2021-02-12 00:41:39 +01:00
Silvan Fuhrer
5e32e9be5a
TECS: rename variables and methods to make clear which are EAS and which TAS
...
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2021-01-23 09:34:34 -05:00
RomanBapst
f05599caff
tecs: use speed derivative provided by local position
...
Signed-off-by: RomanBapst <bapstroman@gmail.com>
2021-01-13 21:21:07 +03:00
RomanBapst
e546584555
tecs: moved trivial getter methods to header file
...
Signed-off-by: RomanBapst <bapstroman@gmail.com>
2021-01-13 21:21:07 +03:00
Roman Bapst
701c105ab6
Update src/lib/tecs/TECS.cpp
...
Co-authored-by: Mathieu Bresciani <brescianimathieu@gmail.com>
2021-01-13 21:21:07 +03:00
RomanBapst
fa559aef43
TECS: stop learing integrator if airspeed is not available, but don't zero it
...
Signed-off-by: RomanBapst <bapstroman@gmail.com>
2021-01-13 21:21:07 +03:00
RomanBapst
d4d1c0fe01
TECS: some cosmetics
...
Signed-off-by: RomanBapst <bapstroman@gmail.com>
2021-01-13 21:21:07 +03:00
RomanBapst
97cc1e25dd
TECS: hande pitch and throttle integrator saturation consistently
...
- don't decay integrator during saturation but prevent it from being learned
into the direction which causes more actuator saturation
Signed-off-by: RomanBapst <bapstroman@gmail.com>
2021-01-13 21:21:07 +03:00