Function autoware_utils::calc_elevation_angle

Function Documentation

double autoware_utils::calc_elevation_angle(const geometry_msgs::msg::Point &p_from, const geometry_msgs::msg::Point &p_to)

calculate elevation angle of two points.

This function returns the elevation angle of the position of the two input points with respect to the origin of their coordinate system. If the two points are in the same position, the calculation result will be unstable.

Parameters:
  • p_from – source point

  • p_to – target point

Returns:

-pi/2 <= elevation angle <= pi/2