Skip to content

Commit

Permalink
fix: update for gcc+12
Browse files Browse the repository at this point in the history
  • Loading branch information
GuillaumeLaine authored and bkueng committed May 6, 2024
1 parent 1a4b80c commit 62d8cf3
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions px4_ros2_cpp/src/utils/map_projection_impl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,8 @@ class MapProjectionImpl final
{
Eigen::Vector3f local_position;

local_position.head(2) = globalToLocal(static_cast<Eigen::Vector2d>(global_position.head(2)));
local_position.template head<2>() =
globalToLocal(static_cast<Eigen::Vector2d>(global_position.head(2)));
local_position.z() = static_cast<float>(_ref_alt_amsl - global_position.z());
return local_position;
}
Expand All @@ -132,7 +133,8 @@ class MapProjectionImpl final
{
Eigen::Vector3d global_position;

global_position.head(2) = localToGlobal(static_cast<Eigen::Vector2f>(local_position.head(2)));
global_position.template head<2>() =
localToGlobal(static_cast<Eigen::Vector2f>(local_position.head(2)));
global_position.z() = static_cast<double>(_ref_alt_amsl - local_position.z());
return global_position;
}
Expand Down

0 comments on commit 62d8cf3

Please sign in to comment.