mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-22 21:43:33 +08:00
Quaternion: rename function to rotate vectors
This commit is contained in:
committed by
Daniel Agar
parent
5affa693f2
commit
68a0414622
@@ -561,7 +561,7 @@ int do_accel_calibration_quick(orb_advert_t *mavlink_log_pub)
|
||||
// use vehicle_attitude if available
|
||||
const vehicle_attitude_s &att = attitude_sub.get();
|
||||
const matrix::Quatf q{att.q};
|
||||
const Vector3f accel_ref = q.conjugate_inversed(Vector3f{0.f, 0.f, -CONSTANTS_ONE_G});
|
||||
const Vector3f accel_ref = q.rotateVectorInverse(Vector3f{0.f, 0.f, -CONSTANTS_ONE_G});
|
||||
|
||||
// sanity check angle between acceleration vectors
|
||||
const float angle = AxisAnglef(Quatf(accel_avg, accel_ref)).angle();
|
||||
|
||||
Reference in New Issue
Block a user