diff options
author | Anton Babushkin <anton.babushkin@me.com> | 2014-02-18 19:05:32 +0400 |
---|---|---|
committer | Anton Babushkin <anton.babushkin@me.com> | 2014-02-18 19:05:32 +0400 |
commit | 7d8f08ad9a733111a9d8b1512a85592a2fb9b045 (patch) | |
tree | c4e72fa5abbdc1d04399a72484fca0d6a53c0b31 /src/modules/navigator/navigator_main.cpp | |
parent | a43c7c488eaba5022a18f05e590059cad6f580da (diff) | |
download | px4-firmware-7d8f08ad9a733111a9d8b1512a85592a2fb9b045.tar.gz px4-firmware-7d8f08ad9a733111a9d8b1512a85592a2fb9b045.tar.bz2 px4-firmware-7d8f08ad9a733111a9d8b1512a85592a2fb9b045.zip |
navigator: check if yaw reached only when position reached
Diffstat (limited to 'src/modules/navigator/navigator_main.cpp')
-rw-r--r-- | src/modules/navigator/navigator_main.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/modules/navigator/navigator_main.cpp b/src/modules/navigator/navigator_main.cpp index af1b9aac0..4cd60d8d8 100644 --- a/src/modules/navigator/navigator_main.cpp +++ b/src/modules/navigator/navigator_main.cpp @@ -1533,7 +1533,7 @@ Navigator::check_mission_item_reached() } } - if (!_waypoint_yaw_reached) { + if (_waypoint_position_reached && !_waypoint_yaw_reached) { if (_vstatus.is_rotary_wing && !_do_takeoff && isfinite(_mission_item.yaw)) { /* check yaw if defined only for rotary wing except takeoff */ float yaw_err = _wrap_pi(_mission_item.yaw - _global_pos.yaw); |