Commit f05bb3a1 authored by Ian Humphrey's avatar Ian Humphrey
Browse files

applyParameterCorrections() in BundleTargetBody and BundleUtilities now throws...

applyParameterCorrections() in BundleTargetBody and BundleUtilities now throws last exception. Updated unit test for BundleUtilities. Fixes #4153.

git-svn-id: http://subversion.wr.usgs.gov/repos/prog/isis3/branches/ipce@7036 41f8697f-d340-4b68-9986-7bafba869bb8
parent 3b617f0b
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -717,7 +717,7 @@ namespace Isis {
    } 
    catch (IException &e) {
      QString msg = "Unable to apply parameter corrections to BundleObservation.";
      IException(e, IException::Unknown, msg, _FILEINFO_); //THROW ???
      throw IException(e, IException::Unknown, msg, _FILEINFO_);
    }
    return true;
  }
+2 −0
Original line number Diff line number Diff line
@@ -61,6 +61,8 @@ namespace Isis {
   *                           References #4163.
   *   @history 2016-08-15 Jesse Mapel - Added a map between cube serial number and contained
   *                           bundle image.  References #4159.
   *   @history 2016-08-23 Ian Humphrey - The applyParameterCorrections() method now throws the
   *                           last exception. Fixes #4153.
   */
  class BundleObservation : public QVector<BundleImageQsp> {

+1 −1
Original line number Diff line number Diff line
@@ -656,7 +656,7 @@ namespace Isis {

    catch (IException &e) {
      QString msg = "Unable to apply parameter corrections to BundleTargetBody.";
      IException(e, IException::Unknown, msg, _FILEINFO_);
      throw IException(e, IException::Unknown, msg, _FILEINFO_);
    }
  }

+3 −0
Original line number Diff line number Diff line
@@ -56,6 +56,9 @@ namespace Isis {
   *   @history 2016-08-10 Jeannie Backer - Replaced boost vector with Isis::LinearAlgebra::Vector.
   *                           References #4163.
   *   @history 2016-08-18 Jesse Mapel - Changed to no longer inherit from QObject.  Fixes #4192.
   *   @history 2016-08-23 Ian Humphrey - The applyParameterCorrections() method now throws its
   *                           last exception. Updated unit test to test that exception.
   *                           Fixes #4153.
   */
  class BundleTargetBody {

+10 −10
Original line number Diff line number Diff line
@@ -533,12 +533,19 @@ DEC (t0) 0.00000000 0.00000000 0.00000000
TWI  (t0)       0.00000000           0.00000000          0.00000000               N/A        0.00000000

init exterior orientiation successful?   "Yes"
apply param corrections successful?      "Yes"
**ERROR** Unable to apply parameter corrections to BundleObservation.
**ERROR** Instrument rotation is NULL, but pointing solve option is AnglesOnly.

    add another image...
    access images by serial number...
TestImageFileName
TestImage2FileName

Testing exceptions...
**ERROR** Unable to apply parameter corrections to BundleObservation.
**ERROR** Instrument position is NULL, but position solve option is PositionOnly.
**ERROR** Unable to apply parameter corrections to BundleObservation.
**ERROR** Instrument rotation is NULL, but pointing solve option is AnglesOnly.
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
@@ -855,9 +862,6 @@ focal x "-1.79769313486231e+308"
focal y "-1.79769313486231e+308"
computed focal x "-1.79769313486231e+308"
computed focal y "-1.79769313486231e+308"
sample residual "-3.0"
line residual "4.0"
residual magnitude "5.0"
observation index "0"

rejected? "Yes"
@@ -871,9 +875,6 @@ focal x "-1.79769313486231e+308"
focal y "-1.79769313486231e+308"
computed focal x "-1.79769313486231e+308"
computed focal y "-1.79769313486231e+308"
sample residual "-3.0"
line residual "4.0"
residual magnitude "5.0"
observation index "0"

rejected? "Yes"
@@ -887,9 +888,6 @@ focal x "-1.79769313486231e+308"
focal y "-1.79769313486231e+308"
computed focal x "-1.79769313486231e+308"
computed focal y "-1.79769313486231e+308"
sample residual "-3.0"
line residual "4.0"
residual magnitude "5.0"
observation index "0"

XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
@@ -1076,6 +1074,8 @@ POLE DECv 5.00000000 0.00000000 5.00000000
Test error throws

**PROGRAMMER ERROR** In BundleTargetBody::applyParameterCorrections: correction and m_targetParameter vectors sizes don't match.
**ERROR** Unable to apply parameter corrections to BundleTargetBody.
**PROGRAMMER ERROR** Angle cannot be a non-Null special pixel.
**PROGRAMMER ERROR** Unknown target body radius solution method [Invalid Method].
**PROGRAMMER ERROR** Unknown target body radius solve method enum [-1].
**PROGRAMMER ERROR** The triaxial radii can only be accessed when solving for triaxial radii.
Loading