From 9e9437518be6f2d169ea3de595a5e2b99a50ae85 Mon Sep 17 00:00:00 2001 From: axd Date: Fri, 29 Jan 2021 14:16:56 +0100 Subject: [PATCH] Compensation of point cloud point depth by water level reference point. --- src/em_driver_library/EM_driver/kongsberg_em2040_util.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/em_driver_library/EM_driver/kongsberg_em2040_util.h b/src/em_driver_library/EM_driver/kongsberg_em2040_util.h index 24c8c98..0f5bfd7 100644 --- a/src/em_driver_library/EM_driver/kongsberg_em2040_util.h +++ b/src/em_driver_library/EM_driver/kongsberg_em2040_util.h @@ -162,7 +162,7 @@ static sensor_msgs::PointCloud2 mrz_to_pointcloud2(const EMdgmMRZ_S& msg, { pt.x = msg.sounding[i].x_reRefPoint_m; pt.y = msg.sounding[i].y_reRefPoint_m; - pt.z = msg.sounding[i].z_reRefPoint_m; + pt.z = msg.sounding[i].z_reRefPoint_m - msg.pingInfo.z_waterLevelReRefPoint_m; pt.intensity = msg.sounding[i].reflectivity1_dB; pcl.push_back(pt); }