History

Revert to previous coordinates.

Andrzej Kapolka committed 13 years ago

Commit ff9e6f81 parent bf389de1 file · +4 −9Browse files

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

Unified · Split

interface/src/SerialInterface.cpp+4−9
@@ -216,9 +216,8 @@ void SerialInterface::readData(float deltaTime) { · 215 unmodified lines
216216 // From MPU-9150 register map, with setting on
217217 // highest resolution = +/- 2G
218218
219− //_lastAcceleration = glm::vec3(-accelXRate, -accelYRate, -accelZRate) * LSB_TO_METERS_PER_SECOND2;
220− _lastAcceleration = glm::vec3(-accelYRate, accelXRate, accelZRate) * LSB_TO_METERS_PER_SECOND2;
221−
219+ _lastAcceleration = glm::vec3(-accelXRate, -accelYRate, -accelZRate) * LSB_TO_METERS_PER_SECOND2;
220+
222221 int rollRate, yawRate, pitchRate;
223222
224223 convertHexToInt(sensorBuffer + 22, rollRate);
@@ -228,12 +227,8 @@ void SerialInterface::readData(float deltaTime) { · 3 unmodified lines
228227 // Convert the integer rates to floats
229228 const float LSB_TO_DEGREES_PER_SECOND = 1.f / 16.4f; // From MPU-9150 register map, 2000 deg/sec.
230229 glm::vec3 rotationRates;
231− //rotationRates[0] = ((float) -pitchRate) * LSB_TO_DEGREES_PER_SECOND;
232− //rotationRates[1] = ((float) -yawRate) * LSB_TO_DEGREES_PER_SECOND;
233− //rotationRates[2] = ((float) -rollRate) * LSB_TO_DEGREES_PER_SECOND;
234−
235− rotationRates[0] = ((float) -yawRate) * LSB_TO_DEGREES_PER_SECOND;
236− rotationRates[1] = ((float) pitchRate) * LSB_TO_DEGREES_PER_SECOND;
230+ rotationRates[0] = ((float) -pitchRate) * LSB_TO_DEGREES_PER_SECOND;
231+ rotationRates[1] = ((float) -yawRate) * LSB_TO_DEGREES_PER_SECOND;
237232 rotationRates[2] = ((float) -rollRate) * LSB_TO_DEGREES_PER_SECOND;
238233
239234 // compute the angular acceleration

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