mirror of
https://github.com/overte-org/overte.git
synced 2025-04-23 15:13:41 +02:00
Initial values, report error.
This commit is contained in:
parent
ff9e6f831c
commit
517bbe80a7
2 changed files with 10 additions and 2 deletions
|
@ -249,6 +249,8 @@ void SerialInterface::readData(float deltaTime) {
|
|||
_angularAccelToLinearAccel * angularAcceleration;
|
||||
glm::vec3 error = _estimatedAcceleration - predictedAcceleration;
|
||||
|
||||
printLog("error %g\n", glm::length(error));
|
||||
|
||||
// adjust according to error in each dimension, in proportion to input magnitudes
|
||||
for (int i = 0; i < 3; i++) {
|
||||
if (fabsf(error[i]) < EPSILON) {
|
||||
|
|
|
@ -31,8 +31,14 @@ public:
|
|||
_estimatedVelocity(0, 0, 0),
|
||||
_lastAcceleration(0, 0, 0),
|
||||
_lastRotationRates(0, 0, 0),
|
||||
_angularVelocityToLinearAccel(0),
|
||||
_angularAccelToLinearAccel(0)
|
||||
_angularVelocityToLinearAccel( // experimentally derived initial values
|
||||
0.001f, -0.008f, 0.020f,
|
||||
0.003f, -0.003f, 0.025f,
|
||||
0.017f, 0.007f, 0.029f),
|
||||
_angularAccelToLinearAccel( // experimentally derived initial values
|
||||
0.0f, 0.0f, 0.002f,
|
||||
0.0f, 0.0f, 0.002f,
|
||||
-0.002f, -0.002f, 0.0f)
|
||||
{}
|
||||
|
||||
void pair();
|
||||
|
|
Loading…
Reference in a new issue