FixedWingPositionControl: do not pass trim throttle via position setpoint triplet

- trim throttle is handled entirely by the position controller
- navigator should use speed setpoints
- added flag gliding_enabled in position setpoint to stills support gliding

Signed-off-by: RomanBapst <bapstroman@gmail.com>
This commit is contained in:
RomanBapst
2022-07-12 09:07:20 +02:00
committed by Martina Rivizzigno
parent cae7e1b88b
commit c05e0f076b
4 changed files with 11 additions and 51 deletions
+4
View File
@@ -620,6 +620,10 @@ MissionBlock::mission_item_to_position_setpoint(const mission_item_s &item, posi
sp->cruising_speed = _navigator->get_cruising_speed();
sp->cruising_throttle = _navigator->get_cruising_throttle();
// for fixed wing we don't use cruising_throttle directly anymore, instead we command airspeed setpoints via cruising_speed
// we still use cruising throttle here to determine if gliding is enabled
sp->gliding_enabled = (_navigator->get_cruising_throttle() < FLT_EPSILON);
switch (item.nav_cmd) {
case NAV_CMD_IDLE:
sp->type = position_setpoint_s::SETPOINT_TYPE_IDLE;