Loading isis/src/base/objs/SpiceRotation/SpiceRotation.cpp +8 −2 Original line number Diff line number Diff line Loading @@ -1681,6 +1681,8 @@ namespace Isis { // Otherwise, fit the polynomial. else { m_polynomial = fitPolynomial(p_degree, m_segments); // TODO: ask Debbie about placement of next statement... p_degreeApplied = true; } p_source = type; Loading Loading @@ -2064,7 +2066,7 @@ namespace Isis { double derivative; double time = (p_et - p_baseTime) / p_timeScale; if (coeffIndex > 0 && coeffIndex <= p_degree) { if (coeffIndex > 0 && coeffIndex <= m_polynomial.degree()) { derivative = pow(time, coeffIndex); } else if (coeffIndex == 0) { Loading @@ -2074,7 +2076,7 @@ namespace Isis { QString msg = "Unable to evaluate the derivative of the SPICE rotation fit polynomial for " "the given coefficient index [" + toString(coeffIndex) + "]. " "Index is negative or exceeds degree of polynomial [" + toString(p_degree) + "]"; + toString(m_polynomial.degree()) + "]"; throw IException(IException::Programmer, msg, _FILEINFO_); } return derivative; Loading Loading @@ -2277,6 +2279,8 @@ namespace Isis { // If polynomials have not been applied yet then simply set the degree and return if (!p_degreeApplied) { p_degree = degree; // TODO: verify m_polynomial.setDegree(degree); } // Otherwise adjust the degree. Loading @@ -2300,6 +2304,8 @@ namespace Isis { // Change the polynomial degree m_polynomial.setDegree(degree); // TODO: verify next line p_degree = degree; // Reset the coefficients for (int i = 0; i < m_segments; i++) { Loading isis/src/control/objs/BundleUtilities/BundleObservationVector.cpp +5 −6 Original line number Diff line number Diff line Loading @@ -141,7 +141,7 @@ namespace Isis { append(bundleObservation); // initialize exterior orientation (spice) for all BundleImages in BundleObservation bundleObservation->initializeExteriorOrientation(); // bundleObservation->initializeExteriorOrientation(); // update observation number to observation ptr map m_observationNumberToObservationMap.insertMulti(observationNumber, bundleObservation); Loading Loading @@ -278,15 +278,14 @@ namespace Isis { } /** * Initializes the exterior orientations for the contained BundleObservations. * * @return bool Returns true upon successful initialization */ bool BundleObservationVector::initializeExteriorOrientation() { int normalsMatrixStartBlock = 0; int nObservations = size(); for (int i = 0; i < nObservations; i++) { BundleObservationQsp observation = at(i); observation->setNormalsMatrixStartBlock(normalsMatrixStartBlock); normalsMatrixStartBlock += observation->numberPolynomialSegments(); observation->initializeExteriorOrientation(); } Loading Loading
isis/src/base/objs/SpiceRotation/SpiceRotation.cpp +8 −2 Original line number Diff line number Diff line Loading @@ -1681,6 +1681,8 @@ namespace Isis { // Otherwise, fit the polynomial. else { m_polynomial = fitPolynomial(p_degree, m_segments); // TODO: ask Debbie about placement of next statement... p_degreeApplied = true; } p_source = type; Loading Loading @@ -2064,7 +2066,7 @@ namespace Isis { double derivative; double time = (p_et - p_baseTime) / p_timeScale; if (coeffIndex > 0 && coeffIndex <= p_degree) { if (coeffIndex > 0 && coeffIndex <= m_polynomial.degree()) { derivative = pow(time, coeffIndex); } else if (coeffIndex == 0) { Loading @@ -2074,7 +2076,7 @@ namespace Isis { QString msg = "Unable to evaluate the derivative of the SPICE rotation fit polynomial for " "the given coefficient index [" + toString(coeffIndex) + "]. " "Index is negative or exceeds degree of polynomial [" + toString(p_degree) + "]"; + toString(m_polynomial.degree()) + "]"; throw IException(IException::Programmer, msg, _FILEINFO_); } return derivative; Loading Loading @@ -2277,6 +2279,8 @@ namespace Isis { // If polynomials have not been applied yet then simply set the degree and return if (!p_degreeApplied) { p_degree = degree; // TODO: verify m_polynomial.setDegree(degree); } // Otherwise adjust the degree. Loading @@ -2300,6 +2304,8 @@ namespace Isis { // Change the polynomial degree m_polynomial.setDegree(degree); // TODO: verify next line p_degree = degree; // Reset the coefficients for (int i = 0; i < m_segments; i++) { Loading
isis/src/control/objs/BundleUtilities/BundleObservationVector.cpp +5 −6 Original line number Diff line number Diff line Loading @@ -141,7 +141,7 @@ namespace Isis { append(bundleObservation); // initialize exterior orientation (spice) for all BundleImages in BundleObservation bundleObservation->initializeExteriorOrientation(); // bundleObservation->initializeExteriorOrientation(); // update observation number to observation ptr map m_observationNumberToObservationMap.insertMulti(observationNumber, bundleObservation); Loading Loading @@ -278,15 +278,14 @@ namespace Isis { } /** * Initializes the exterior orientations for the contained BundleObservations. * * @return bool Returns true upon successful initialization */ bool BundleObservationVector::initializeExteriorOrientation() { int normalsMatrixStartBlock = 0; int nObservations = size(); for (int i = 0; i < nObservations; i++) { BundleObservationQsp observation = at(i); observation->setNormalsMatrixStartBlock(normalsMatrixStartBlock); normalsMatrixStartBlock += observation->numberPolynomialSegments(); observation->initializeExteriorOrientation(); } Loading