Skip to content
Snippets Groups Projects
Commit a91ea437 authored by Jesse Mapel's avatar Jesse Mapel Committed by jlaura
Browse files

Fixed ordering on framer quaternions (#219)

parent 24ce64ac
No related branches found
No related tags found
No related merge requests found
...@@ -1191,10 +1191,10 @@ void UsgsAstroFrameSensorModel::calcRotationMatrix( ...@@ -1191,10 +1191,10 @@ void UsgsAstroFrameSensorModel::calcRotationMatrix(
double m[3][3]) const { double m[3][3]) const {
MESSAGE_LOG(this->m_logger, "Calculating rotation matrix"); MESSAGE_LOG(this->m_logger, "Calculating rotation matrix");
// Trigonometric functions for rotation matrix // Trigonometric functions for rotation matrix
double w = m_currentParameterValue[3]; double x = m_currentParameterValue[3];
double x = m_currentParameterValue[4]; double y = m_currentParameterValue[4];
double y = m_currentParameterValue[5]; double z = m_currentParameterValue[5];
double z = m_currentParameterValue[6]; double w = m_currentParameterValue[6];
m[0][0] = w*w + x*x - y*y - z*z; m[0][0] = w*w + x*x - y*y - z*z;
m[0][1] = 2 * (x*y - w*z); m[0][1] = 2 * (x*y - w*z);
...@@ -1212,10 +1212,10 @@ void UsgsAstroFrameSensorModel::calcRotationMatrix( ...@@ -1212,10 +1212,10 @@ void UsgsAstroFrameSensorModel::calcRotationMatrix(
double m[3][3], const std::vector<double> &adjustments) const { double m[3][3], const std::vector<double> &adjustments) const {
MESSAGE_LOG(this->m_logger, "Calculating rotation matrix with adjustments"); MESSAGE_LOG(this->m_logger, "Calculating rotation matrix with adjustments");
// Trigonometric functions for rotation matrix // Trigonometric functions for rotation matrix
double w = getValue(3, adjustments); double x = getValue(3, adjustments);
double x = getValue(4, adjustments); double y = getValue(4, adjustments);
double y = getValue(5, adjustments); double z = getValue(5, adjustments);
double z = getValue(6, adjustments); double w = getValue(6, adjustments);
m[0][0] = w*w + x*x - y*y - z*z; m[0][0] = w*w + x*x - y*y - z*z;
m[0][1] = 2 * (x*y - w*z); m[0][1] = 2 * (x*y - w*z);
......
...@@ -229,7 +229,7 @@ TEST_F(FrameSensorModel, Rotation_NPole_Center) { ...@@ -229,7 +229,7 @@ TEST_F(FrameSensorModel, Rotation_NPole_Center) {
TEST_F(FrameSensorModel, Rotation_SPole_Center) { TEST_F(FrameSensorModel, Rotation_SPole_Center) {
sensorModel->setParameterValue(4, 0.0); // phi sensorModel->setParameterValue(3, 0.0); // phi
sensorModel->setParameterValue(0, 0.0); // X sensorModel->setParameterValue(0, 0.0); // X
sensorModel->setParameterValue(1, 0.0); // Y sensorModel->setParameterValue(1, 0.0); // Y
sensorModel->setParameterValue(2, -1000.0); // Z sensorModel->setParameterValue(2, -1000.0); // Z
......
...@@ -46,7 +46,7 @@ ...@@ -46,7 +46,7 @@
}, },
"sensor_orientation": { "sensor_orientation": {
"quaternions": [ "quaternions": [
[0.0, -0.707106781186547, 0.0, 0.707106781186547] [-0.707106781186547, 0.0, 0.707106781186547, 0.0]
] ]
}, },
"starting_detector_line": 0, "starting_detector_line": 0,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment