Remove local planar vector

This commit is contained in:
Jaeyoung-Lim
2022-03-20 12:41:31 +01:00
committed by JaeyoungLim
parent 28d34bf095
commit f804b3516f
2 changed files with 0 additions and 26 deletions
-13
View File
@@ -374,19 +374,6 @@ void ECL_L1_Pos_Controller::navigate_level_flight(float current_heading)
update_roll_setpoint();
}
Vector2f ECL_L1_Pos_Controller::get_local_planar_vector(const Vector2d &origin, const Vector2d &target) const
{
/* this is an approximation for small angles, proposed by [2] */
const double x_angle = math::radians(target(0) - origin(0));
const double y_angle = math::radians(target(1) - origin(1));
const double x_origin_cos = cos(math::radians(origin(0)));
return Vector2f{
static_cast<float>(x_angle * CONSTANTS_RADIUS_OF_EARTH),
static_cast<float>(y_angle *x_origin_cos * CONSTANTS_RADIUS_OF_EARTH),
};
}
void ECL_L1_Pos_Controller::set_l1_period(float period)
{
_L1_period = period;
-13
View File
@@ -230,19 +230,6 @@ private:
bool _has_guidance_updated =
false; ///< this flag is set to true by any of the guidance methods. This flag has to be manually reset using has_guidance_updated_reset()
/**
* Convert a 2D vector from WGS84 to planar coordinates.
*
* This converts from latitude and longitude to planar
* coordinates with (0,0) being at the position of ref and
* returns a vector in meters towards wp.
*
* @param ref The reference position in WGS84 coordinates
* @param wp The point to convert to into the local coordinates, in WGS84 coordinates
* @return The vector in meters pointing from the reference position to the coordinates
*/
matrix::Vector2f get_local_planar_vector(const matrix::Vector2d &origin, const matrix::Vector2d &target) const;
/**
* Update roll angle setpoint. This will also apply slew rate limits if set.
*