AP_Math: added rfu_to_frd() method for Vector3

This commit is contained in:
Andrew Tridgell 2023-12-01 08:59:18 +11:00
parent 61b3ad326d
commit ddccc92e7d

View File

@ -281,6 +281,12 @@ public:
return Vector3<double>{x,y,z};
}
// convert from right-front-up to front-right-down
// or ENU to NED
Vector3<T> rfu_to_frd() const {
return Vector3<T>{y,x,-z};
}
// given a position p1 and a velocity v1 produce a vector
// perpendicular to v1 maximising distance from p1. If p1 is the
// zero vector the return from the function will always be the