mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-07-22 00:10:35 +08:00
fw pos ctrl: turn back to takeoff point with npfg
This commit is contained in:
committed by
Daniel Agar
parent
f60d38db65
commit
de26ffa6e0
@@ -1508,7 +1508,9 @@ FixedwingPositionControl::control_auto_takeoff(const hrt_abstime &now, const Vec
|
|||||||
if (_param_fw_use_npfg.get()) {
|
if (_param_fw_use_npfg.get()) {
|
||||||
_npfg.setAirspeedNom(target_airspeed * _eas2tas);
|
_npfg.setAirspeedNom(target_airspeed * _eas2tas);
|
||||||
_npfg.setAirspeedMax(_param_fw_airspd_max.get() * _eas2tas);
|
_npfg.setAirspeedMax(_param_fw_airspd_max.get() * _eas2tas);
|
||||||
_npfg.navigateWaypoints(prev_wp_local, curr_wp_local, curr_pos_local, ground_speed, _wind_vel);
|
// NOTE: current waypoint is passed twice to trigger the "point following" logic -- TODO: create
|
||||||
|
// point following navigation interface instead of this hack.
|
||||||
|
_npfg.navigateWaypoints(curr_wp_local, curr_wp_local, curr_pos_local, ground_speed, _wind_vel);
|
||||||
_att_sp.roll_body = _runway_takeoff.getRoll(_npfg.getRollSetpoint());
|
_att_sp.roll_body = _runway_takeoff.getRoll(_npfg.getRollSetpoint());
|
||||||
target_airspeed = _npfg.getAirspeedRef() / _eas2tas;
|
target_airspeed = _npfg.getAirspeedRef() / _eas2tas;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user