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
216 // From MPU-9150 register map, with setting on216 // From MPU-9150 register map, with setting on
217 // highest resolution = +/- 2G217 // highest resolution = +/- 2G
218 218
219 //_lastAcceleration = glm::vec3(-accelXRate, -accelYRate, -accelZRate) * LSB_TO_METERS_PER_SECOND2;219 _lastAcceleration = glm::vec3(-accelXRate, -accelYRate, -accelZRate) * LSB_TO_METERS_PER_SECOND2;
220 _lastAcceleration = glm::vec3(-accelYRate, accelXRate, accelZRate) * LSB_TO_METERS_PER_SECOND2;220
221
222 int rollRate, yawRate, pitchRate;221 int rollRate, yawRate, pitchRate;
223 222
224 convertHexToInt(sensorBuffer + 22, rollRate);223 convertHexToInt(sensorBuffer + 22, rollRate);
@@ -228,12 +227,8 @@ void SerialInterface::readData(float deltaTime) { · 3 unmodified lines
228 // Convert the integer rates to floats227 // Convert the integer rates to floats
229 const float LSB_TO_DEGREES_PER_SECOND = 1.f / 16.4f; // From MPU-9150 register map, 2000 deg/sec.228 const float LSB_TO_DEGREES_PER_SECOND = 1.f / 16.4f; // From MPU-9150 register map, 2000 deg/sec.
230 glm::vec3 rotationRates;229 glm::vec3 rotationRates;
231 //rotationRates[0] = ((float) -pitchRate) * LSB_TO_DEGREES_PER_SECOND;230 rotationRates[0] = ((float) -pitchRate) * LSB_TO_DEGREES_PER_SECOND;
232 //rotationRates[1] = ((float) -yawRate) * LSB_TO_DEGREES_PER_SECOND;231 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;
237 rotationRates[2] = ((float) -rollRate) * LSB_TO_DEGREES_PER_SECOND;232 rotationRates[2] = ((float) -rollRate) * LSB_TO_DEGREES_PER_SECOND;
238 233
239 // compute the angular acceleration234 // 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