mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-03 06:28:27 -04:00
AP_AHRS: added body/earth frame ops for Lua
This commit is contained in:
parent
a56a7f7da4
commit
7d520c8307
@ -573,6 +573,16 @@ public:
|
|||||||
return _rsem;
|
return _rsem;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// convert a vector from body to earth frame
|
||||||
|
Vector3f body_to_earth(const Vector3f &v) const {
|
||||||
|
return v * get_rotation_body_to_ned();
|
||||||
|
}
|
||||||
|
|
||||||
|
// convert a vector from earth to body frame
|
||||||
|
Vector3f earth_to_body(const Vector3f &v) const {
|
||||||
|
return get_rotation_body_to_ned().mul_transpose(v);
|
||||||
|
}
|
||||||
|
|
||||||
// for holding parameters
|
// for holding parameters
|
||||||
static const struct AP_Param::GroupInfo var_info[];
|
static const struct AP_Param::GroupInfo var_info[];
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user