mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-28 07:23:33 +08:00
SensorGps.msg: switch to double precision for lat/lon/alt
To match https://github.com/PX4/PX4-GPSDrivers/pull/132 - adding high precision RTK lat/lon/alt components
This commit is contained in:
committed by
Beat Küng
parent
f82785a322
commit
f000238987
@@ -66,9 +66,9 @@ public:
|
||||
size_t payload_size = reg_udral_physics_kinematics_geodetic_Point_0_1_SERIALIZATION_BUFFER_SIZE_BYTES_;
|
||||
|
||||
reg_udral_physics_kinematics_geodetic_Point_0_1 geo {};
|
||||
geo.latitude = gps.lat;
|
||||
geo.longitude = gps.lon;
|
||||
geo.altitude = uavcan_si_unit_length_WideScalar_1_0 { .meter = static_cast<double>(gps.alt) };
|
||||
geo.latitude = (int64_t)(gps.latitude_deg / 1e7);
|
||||
geo.longitude = (int64_t)(gps.longitude_deg / 1e7);
|
||||
geo.altitude = uavcan_si_unit_length_WideScalar_1_0 { .meter = gps.altitude_msl_m };
|
||||
|
||||
uint8_t geo_payload_buffer[reg_udral_physics_kinematics_geodetic_Point_0_1_SERIALIZATION_BUFFER_SIZE_BYTES_];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user