AP_Windvane: fix NMEA vehicle to earth frame

This commit is contained in:
Peter Hall 2019-06-08 00:21:21 +01:00 committed by Randy Mackay
parent 607f996232
commit aa32a0d143
1 changed files with 1 additions and 1 deletions

View File

@ -64,7 +64,7 @@ void AP_WindVane_NMEA::update()
if (decode(c)) { if (decode(c)) {
// user may not have NMEA selected for both speed and direction // user may not have NMEA selected for both speed and direction
if (_frontend._direction_type.get() == _frontend.WindVaneType::WINDVANE_NMEA) { if (_frontend._direction_type.get() == _frontend.WindVaneType::WINDVANE_NMEA) {
direction_update_frontend(wrap_PI(radians(_wind_dir_deg + _frontend._dir_analog_bearing_offset.get()))); direction_update_frontend(wrap_PI(radians(_wind_dir_deg + _frontend._dir_analog_bearing_offset.get()) + AP::ahrs().yaw));
} }
if (_frontend._speed_sensor_type.get() == _frontend.Speed_type::WINDSPEED_NMEA) { if (_frontend._speed_sensor_type.get() == _frontend.Speed_type::WINDSPEED_NMEA) {
speed_update_frontend(_speed_ms); speed_update_frontend(_speed_ms);