From b7b859f0419f995458030a167b0473c8d1485ae4 Mon Sep 17 00:00:00 2001 From: Louise Poubel Date: Mon, 29 Nov 2021 20:56:57 -0800 Subject: [PATCH] DTOR Signed-off-by: Louise Poubel --- lrauv_ignition_plugins/src/ScienceSensorsSystem.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lrauv_ignition_plugins/src/ScienceSensorsSystem.cc b/lrauv_ignition_plugins/src/ScienceSensorsSystem.cc index 882972ca..f81b831f 100644 --- a/lrauv_ignition_plugins/src/ScienceSensorsSystem.cc +++ b/lrauv_ignition_plugins/src/ScienceSensorsSystem.cc @@ -121,6 +121,7 @@ class tethys::ScienceSensorsSystemPrivate /// Vector size: number of time slices. Indices correspond to those of /// this->timestamps. /// Point cloud: spatial coordinates to index science data by location + /// in the ENU world frame. public: std::vector::Ptr> timeSpaceCoords; /// \brief Science data. @@ -452,9 +453,10 @@ void ScienceSensorsSystemPrivate::ReadData( // Convert lat / lon / elevation to Cartesian ENU auto cart = this->world.SphericalCoordinates(_ecm).value() - .PositionTransform({latitude, longitude, -depth}, + .PositionTransform({IGN_DTOR(latitude), IGN_DTOR(longitude), 0.0}, ignition::math::SphericalCoordinates::SPHERICAL, ignition::math::SphericalCoordinates::LOCAL2); + cart.Z() = -depth; // Performance trick. Scale down to see in view cart *= this->MINIATURE_SCALE;