GPS2_RAW: fill extension fields

This commit is contained in:
bresch
2025-03-12 13:12:38 +01:00
committed by Mathieu Bresciani
parent 8547ebb863
commit b5e2395982
+4 -4
View File
@@ -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<int32_t>(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<int32_t>(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) {