From b5e2395982e29f8a269863f7de9f83fb71656105 Mon Sep 17 00:00:00 2001 From: bresch Date: Tue, 11 Mar 2025 13:43:03 +0100 Subject: [PATCH] GPS2_RAW: fill extension fields --- src/modules/mavlink/streams/GPS2_RAW.hpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/modules/mavlink/streams/GPS2_RAW.hpp b/src/modules/mavlink/streams/GPS2_RAW.hpp index ef91b95f274..08f80877d9c 100644 --- a/src/modules/mavlink/streams/GPS2_RAW.hpp +++ b/src/modules/mavlink/streams/GPS2_RAW.hpp @@ -68,7 +68,6 @@ private: hrt_abstime now{}; if (_sensor_gps_sub.update(&gps)) { - msg.time_usec = gps.timestamp; msg.fix_type = gps.fix_type; msg.lat = static_cast(round(gps.latitude_deg * 1e7)); @@ -86,9 +85,10 @@ private: msg.cog = math::degrees(matrix::wrap_2pi(gps.cog_rad)) * 1e2f; msg.satellites_visible = gps.satellites_used; - - //msg.dgps_numch = // Number of DGPS satellites - //msg.dgps_age = // Age of DGPS info + msg.alt_ellipsoid = static_cast(round(gps.altitude_ellipsoid_m * 1e3)); // convert [m] to [mm] + msg.h_acc = gps.eph * 1e3f; // position uncertainty in mm + msg.v_acc = gps.epv * 1e3f; // altitude uncertainty in mm + msg.vel_acc = gps.s_variance_m_s * 1e3f; // speed uncertainty in mm if (PX4_ISFINITE(gps.heading)) { if (fabsf(gps.heading) < FLT_EPSILON) {