diff options
author | Anton Babushkin <anton.babushkin@me.com> | 2013-11-14 11:59:18 +0400 |
---|---|---|
committer | Anton Babushkin <anton.babushkin@me.com> | 2013-11-14 11:59:18 +0400 |
commit | c31d065340a44ef121069b5b82395526b910d3e8 (patch) | |
tree | 725c9a6c0a50ae1464f2476e37194f70267089b7 | |
parent | e7f4d91022af363905b758ab39bde1addcb69517 (diff) | |
download | px4-firmware-c31d065340a44ef121069b5b82395526b910d3e8.tar.gz px4-firmware-c31d065340a44ef121069b5b82395526b910d3e8.tar.bz2 px4-firmware-c31d065340a44ef121069b5b82395526b910d3e8.zip |
Revert "Heading in VFR message fixed"
This reverts commit cfaf0ada45a9b99a83221c6c51a50090c55a1483.
-rw-r--r-- | src/modules/mavlink/orb_listener.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/modules/mavlink/orb_listener.c b/src/modules/mavlink/orb_listener.c index 2804a8191..abc91d34f 100644 --- a/src/modules/mavlink/orb_listener.c +++ b/src/modules/mavlink/orb_listener.c @@ -54,7 +54,6 @@ #include <sys/prctl.h> #include <stdlib.h> #include <poll.h> -#include <lib/geo/geo.h> #include <mavlink/mavlink_log.h> @@ -249,7 +248,7 @@ l_vehicle_attitude(const struct listener *l) if (t >= last_sent_vfr + 100000) { last_sent_vfr = t; float groundspeed = sqrtf(global_pos.vx * global_pos.vx + global_pos.vy * global_pos.vy); - uint16_t heading = _wrap_2pi(att.yaw) / M_PI_F * 180.0f; + uint16_t heading = (att.yaw + M_PI_F) / M_PI_F * 180.0f; float throttle = actuators_effective_0.control_effective[3] * (UINT16_MAX - 1); mavlink_msg_vfr_hud_send(MAVLINK_COMM_0, airspeed.true_airspeed_m_s, groundspeed, heading, throttle, global_pos.alt, -global_pos.vz); } |