#4247 fix wrong coefficient in previous correction
This commit is contained in:
parent
a6203bdf11
commit
4338f41fa6
|
@ -115,7 +115,7 @@ public:
|
||||||
|
|
||||||
roll = atan2(2 * (this->y*this->z + this->w*this->x), sqw - sqx - sqy + sqz);
|
roll = atan2(2 * (this->y*this->z + this->w*this->x), sqw - sqx - sqy + sqz);
|
||||||
double sarg = -2 * (this->x*this->z - this->w*this->y);
|
double sarg = -2 * (this->x*this->z - this->w*this->y);
|
||||||
pitch = sarg <= 1.0 ? -2.0*M_PI : (sarg >= 1.0 ? 2.0*M_PI : asin(sarg));
|
pitch = sarg <= -1.0 ? -0.5*M_PI : (sarg >= 1.0 ? 0.5*M_PI : asin(sarg));
|
||||||
yaw = atan2(2 * (this->x*this->y + this->w*this->z), sqw + sqx - sqy - sqz);
|
yaw = atan2(2 * (this->x*this->y + this->w*this->z), sqw + sqx - sqy - sqz);
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue