Skip to content

Commit

Permalink
DTOR
Browse files Browse the repository at this point in the history
Signed-off-by: Louise Poubel <[email protected]>
  • Loading branch information
chapulina committed Nov 30, 2021
1 parent a2d0505 commit b7b859f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lrauv_ignition_plugins/src/ScienceSensorsSystem.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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<pcl::PointCloud<pcl::PointXYZ>::Ptr> timeSpaceCoords;

/// \brief Science data.
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit b7b859f

Please sign in to comment.