mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-22 05:13:33 +08:00
Changed constant name to UNMANNED_GROUND_VEHICLE
This commit is contained in:
committed by
Julian Oes
parent
714c90b9db
commit
21760a5856
@@ -335,10 +335,12 @@ MissionBlock::is_mission_item_reached()
|
||||
&& PX4_ISFINITE(_mission_item.yaw))) {
|
||||
|
||||
/* check course if defined only for rotary wing except takeoff */
|
||||
float cog = _navigator->get_vstatus()->vehicle_type == vehicle_status_s::VEHICLE_TYPE_ROTARY_WING
|
||||
? _navigator->get_global_position()->yaw : atan2f(
|
||||
float cog = (_navigator->get_vstatus()->vehicle_type == vehicle_status_s::VEHICLE_TYPE_ROTARY_WING) ?
|
||||
_navigator->get_global_position()->yaw :
|
||||
atan2f(
|
||||
_navigator->get_global_position()->vel_e,
|
||||
_navigator->get_global_position()->vel_n);
|
||||
_navigator->get_global_position()->vel_n
|
||||
);
|
||||
|
||||
float yaw_err = wrap_pi(_mission_item.yaw - cog);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user