Skip to content

Commit

Permalink
make temporary variable
Browse files Browse the repository at this point in the history
Signed-off-by: scepter914 <scepter914@gmail.com>
  • Loading branch information
scepter914 committed Nov 22, 2022
1 parent bd19053 commit 45d0f2d
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,9 @@ bool update_param(

pcl::PointXYZI getPointXYZI(const radar_msgs::msg::RadarReturn & radar, float intensity)
{
const float x = radar.range * std::cos(radar.azimuth) * std::cos(radar.elevation);
const float y = radar.range * std::sin(radar.azimuth) * std::cos(radar.elevation);
const float r_xy = radar.range * std::cos(radar.elevation);
const float x = r_xy * std::cos(radar.azimuth);
const float y = r_xy * std::sin(radar.azimuth);
const float z = radar.range * std::sin(radar.elevation);
return pcl::PointXYZI{x, y, z, intensity};
}
Expand Down

0 comments on commit 45d0f2d

Please sign in to comment.