mirror of
https://github.com/okalachev/flix.git
synced 2025-07-27 17:49:33 +00:00
Fix attitude error calculation in sim
This commit is contained in:
parent
e360110430
commit
02aac609ab
@ -190,7 +190,8 @@ public:
|
|||||||
|
|
||||||
// calculate attitude estimation error
|
// calculate attitude estimation error
|
||||||
|
|
||||||
float angle = Vector::angleBetweenVectors(attitude.rotate(Vector(0, 0, -1)), Vector(0, 0, -1));
|
Quaternion groundtruthAttitude(estimateModel->WorldPose().Rot().W(), estimateModel->WorldPose().Rot().X(), -estimateModel->WorldPose().Rot().Y(), -estimateModel->WorldPose().Rot().Z());
|
||||||
|
float angle = Vector::angleBetweenVectors(attitude.rotate(Vector(0, 0, -1)), groundtruthAttitude.rotate(Vector(0, 0, -1)));
|
||||||
if (angle < 0.3) {
|
if (angle < 0.3) {
|
||||||
//gzwarn << "att err: " << angle << endl;
|
//gzwarn << "att err: " << angle << endl;
|
||||||
// TODO: warning
|
// TODO: warning
|
||||||
|
Loading…
x
Reference in New Issue
Block a user