mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-19 23:03:33 +08:00
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:
committed by
Martina Rivizzigno
parent
cae7e1b88b
commit
c05e0f076b
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user