mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-06-02 03:49:12 +08:00
by value to reference
This commit is contained in:
committed by
Lorenz Meier
parent
a0c3c80b37
commit
89c266e699
@@ -109,7 +109,7 @@ vehicle_attitude_setpoint_s thrustToAttitude(const matrix::Vector3f &thr_sp, con
|
|||||||
return att_sp;
|
return att_sp;
|
||||||
}
|
}
|
||||||
|
|
||||||
matrix::Vector2f constrainXY(const matrix::Vector2f &v0, const matrix::Vector2f &v1, const float max)
|
matrix::Vector2f constrainXY(const matrix::Vector2f &v0, const matrix::Vector2f &v1, const float &max)
|
||||||
{
|
{
|
||||||
if (matrix::Vector2f(v0 + v1).norm() <= max) {
|
if (matrix::Vector2f(v0 + v1).norm() <= max) {
|
||||||
// vector does not exceed maximum magnitude
|
// vector does not exceed maximum magnitude
|
||||||
|
|||||||
@@ -63,7 +63,7 @@ vehicle_attitude_setpoint_s thrustToAttitude(const matrix::Vector3f &thr_sp, con
|
|||||||
* @param v1 a 2D vector that less priority given the maximum available magnitude.
|
* @param v1 a 2D vector that less priority given the maximum available magnitude.
|
||||||
* @return 2D vector
|
* @return 2D vector
|
||||||
*/
|
*/
|
||||||
matrix::Vector2f constrainXY(const matrix::Vector2f &v0, const matrix::Vector2f &v1, const float max);
|
matrix::Vector2f constrainXY(const matrix::Vector2f &v0, const matrix::Vector2f &v1, const float &max);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This method was used for smoothing the corners along two lines.
|
* This method was used for smoothing the corners along two lines.
|
||||||
|
|||||||
Reference in New Issue
Block a user