mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-07-01 18:20:35 +08:00
navigator: convert to radians in configuration getter
This commit is contained in:
committed by
Daniel Agar
parent
334a599b2d
commit
9f545ae3cf
@@ -345,7 +345,7 @@ MissionBlock::is_mission_item_reached()
|
||||
float yaw_err = wrap_pi(_mission_item.yaw - cog);
|
||||
|
||||
/* accept yaw if reached or if timeout is set in which case we ignore not forced headings */
|
||||
if (fabsf(yaw_err) < math::radians(_navigator->get_yaw_threshold())
|
||||
if (fabsf(yaw_err) < _navigator->get_yaw_threshold()
|
||||
|| (_navigator->get_yaw_timeout() >= FLT_EPSILON && !_mission_item.force_heading)) {
|
||||
|
||||
_waypoint_yaw_reached = true;
|
||||
|
||||
@@ -286,7 +286,7 @@ public:
|
||||
float get_takeoff_min_alt() const { return _param_mis_takeoff_alt.get(); }
|
||||
bool get_takeoff_required() const { return _param_mis_takeoff_req.get(); }
|
||||
float get_yaw_timeout() const { return _param_mis_yaw_tmt.get(); }
|
||||
float get_yaw_threshold() const { return _param_mis_yaw_err.get(); }
|
||||
float get_yaw_threshold() const { return math::radians(_param_mis_yaw_err.get()); }
|
||||
|
||||
float get_vtol_back_trans_deceleration() const { return _param_back_trans_dec_mss; }
|
||||
float get_vtol_reverse_delay() const { return _param_reverse_delay; }
|
||||
|
||||
Reference in New Issue
Block a user