Showing the changes to interface/src/SerialInterface.cpp (1 of 1 file). Show all
Unified · Split
| @@ -266,7 +266,7 @@ void SerialInterface::readData(float deltaTime) { · 265 unmodified lines | ||
| 266 | 266 | // Without a compass heading, always decay estimated Yaw slightly |
| 267 | 267 | const float YAW_DECAY = 0.995; |
| 268 | 268 | glm::vec3 forward = estimatedRotation * glm::vec3(0.0f, 0.0f, -1.0f); |
| 269 | − esimatedRotation = safeMix(glm::angleAxis(glm::degrees(atan2f(forward.x, -forward.z)), | |
| 269 | + estimatedRotation = safeMix(glm::angleAxis(glm::degrees(atan2f(forward.x, -forward.z)), | |
| 270 | 270 | glm::vec3(0.0f, 1.0f, 0.0f)) * estimatedRotation, estimatedRotation, YAW_DECAY); |
| 271 | 271 | } |
| 272 | 272 | } |