History

Acceleration is presumably relative to the current orientation.

Andrzej Kapolka committed 13 years ago

Commit d87e1651 parent 9afb1b31 file · +2 −1Browse files

Showing the changes to interface/src/SerialInterface.cpp (1 of 1 file). Show all

Unified · Split

interface/src/SerialInterface.cpp+2−1
@@ -260,7 +260,8 @@ void SerialInterface::readData(float deltaTime) { · 259 unmodified lines
260 } else {260 } else {
261 // Use gravity reading to do sensor fusion on the pitch and roll estimation261 // Use gravity reading to do sensor fusion on the pitch and roll estimation
262 estimatedRotation = safeMix(estimatedRotation,262 estimatedRotation = safeMix(estimatedRotation,
263 rotationBetween(_gravity, _lastAcceleration) * estimatedRotation, 1.0f / SENSOR_FUSION_SAMPLES);263 rotationBetween(estimatedRotation * _lastAcceleration, _gravity) * estimatedRotation,
264 1.0f / SENSOR_FUSION_SAMPLES);
264 }265 }
265 }266 }
266 267

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t