diff --git a/src/UsgsAstroFrameSensorModel.cpp b/src/UsgsAstroFrameSensorModel.cpp index 1a5116e4bcc15494f17ead32f1a75aa0c9b82797..1f6cdba9a99dd91ce0da0e104fc214ac27d6b92b 100644 --- a/src/UsgsAstroFrameSensorModel.cpp +++ b/src/UsgsAstroFrameSensorModel.cpp @@ -1191,10 +1191,10 @@ void UsgsAstroFrameSensorModel::calcRotationMatrix( double m[3][3]) const { MESSAGE_LOG(this->m_logger, "Calculating rotation matrix"); // Trigonometric functions for rotation matrix - double w = m_currentParameterValue[3]; - double x = m_currentParameterValue[4]; - double y = m_currentParameterValue[5]; - double z = m_currentParameterValue[6]; + double x = m_currentParameterValue[3]; + double y = m_currentParameterValue[4]; + double z = m_currentParameterValue[5]; + double w = m_currentParameterValue[6]; m[0][0] = w*w + x*x - y*y - z*z; m[0][1] = 2 * (x*y - w*z); @@ -1212,10 +1212,10 @@ void UsgsAstroFrameSensorModel::calcRotationMatrix( double m[3][3], const std::vector<double> &adjustments) const { MESSAGE_LOG(this->m_logger, "Calculating rotation matrix with adjustments"); // Trigonometric functions for rotation matrix - double w = getValue(3, adjustments); - double x = getValue(4, adjustments); - double y = getValue(5, adjustments); - double z = getValue(6, adjustments); + double x = getValue(3, adjustments); + double y = getValue(4, adjustments); + double z = getValue(5, adjustments); + double w = getValue(6, adjustments); m[0][0] = w*w + x*x - y*y - z*z; m[0][1] = 2 * (x*y - w*z); diff --git a/tests/FrameCameraTests.cpp b/tests/FrameCameraTests.cpp index 80bcb8ff6ce8e4f37e6f77c8799f04c7efbe0181..20ad76d86fc08a060d2ec15be888f1b20d02e52a 100644 --- a/tests/FrameCameraTests.cpp +++ b/tests/FrameCameraTests.cpp @@ -229,7 +229,7 @@ TEST_F(FrameSensorModel, Rotation_NPole_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(1, 0.0); // Y sensorModel->setParameterValue(2, -1000.0); // Z diff --git a/tests/data/simpleFramerISD.json b/tests/data/simpleFramerISD.json index b22c3e8ab043f663fb569eb15e4800689138c780..9ce22402481403d0e2f5963aad0817170324e4f8 100644 --- a/tests/data/simpleFramerISD.json +++ b/tests/data/simpleFramerISD.json @@ -46,7 +46,7 @@ }, "sensor_orientation": { "quaternions": [ - [0.0, -0.707106781186547, 0.0, 0.707106781186547] + [-0.707106781186547, 0.0, 0.707106781186547, 0.0] ] }, "starting_detector_line": 0,