mirror of
https://github.com/overte-org/overte.git
synced 2025-04-25 00:56:48 +02:00
Acceleration is presumably relative to the current orientation.
This commit is contained in:
parent
9afb1b3338
commit
d87e165b06
1 changed files with 2 additions and 1 deletions
|
@ -260,7 +260,8 @@ void SerialInterface::readData(float deltaTime) {
|
|||
} else {
|
||||
// Use gravity reading to do sensor fusion on the pitch and roll estimation
|
||||
estimatedRotation = safeMix(estimatedRotation,
|
||||
rotationBetween(_gravity, _lastAcceleration) * estimatedRotation, 1.0f / SENSOR_FUSION_SAMPLES);
|
||||
rotationBetween(estimatedRotation * _lastAcceleration, _gravity) * estimatedRotation,
|
||||
1.0f / SENSOR_FUSION_SAMPLES);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue