From 4dca1b16b0967c4e9c1e33813df4a2618d26cb55 Mon Sep 17 00:00:00 2001 From: Benjamin Menkuec Date: Thu, 12 Sep 2024 13:40:41 +0200 Subject: [PATCH] AP_MSP: MSP_RAW_GPS cog should be decidegrees not centidegrees --- libraries/AP_MSP/AP_MSP_Telem_Backend.cpp | 2 +- libraries/AP_MSP/AP_MSP_Telem_Backend.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/libraries/AP_MSP/AP_MSP_Telem_Backend.cpp b/libraries/AP_MSP/AP_MSP_Telem_Backend.cpp index 84cca6e1362c4..816d876c97d91 100644 --- a/libraries/AP_MSP/AP_MSP_Telem_Backend.cpp +++ b/libraries/AP_MSP/AP_MSP_Telem_Backend.cpp @@ -217,7 +217,7 @@ void AP_MSP_Telem_Backend::update_gps_state(gps_state_t &gps_state) gps_state.lon = loc.lng; gps_state.alt_m = loc.alt/100; // 1m resolution gps_state.speed_cms = gps.ground_speed() * 100; - gps_state.ground_course_cd = gps.ground_course_cd(); + gps_state.ground_course_dd = gps.ground_course_cd() / 10; } } #endif diff --git a/libraries/AP_MSP/AP_MSP_Telem_Backend.h b/libraries/AP_MSP/AP_MSP_Telem_Backend.h index fccdf487740b0..96aa176e422d9 100644 --- a/libraries/AP_MSP/AP_MSP_Telem_Backend.h +++ b/libraries/AP_MSP/AP_MSP_Telem_Backend.h @@ -57,7 +57,7 @@ friend AP_MSP; int32_t lon; uint16_t alt_m; uint16_t speed_cms; - int16_t ground_course_cd; + uint16_t ground_course_dd; } gps_state_t; typedef struct airspeed_state_s {