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

Updated documentation, tests, and coding standards for BundleObservation,...

Updated documentation, tests, and coding standards for BundleObservation, BundleObservationSolveSettings, BundleObservationVector. Fixes #4078.

git-svn-id: http://subversion.wr.usgs.gov/repos/prog/isis3/branches/ipce@6952 41f8697f-d340-4b68-9986-7bafba869bb8
parent 799f71a6
Loading
Loading
Loading
Loading
+199 −72
Original line number Diff line number Diff line
#include "BundleObservation.h"

#include <QDebug>
#include <QString>
#include <QStringList>

#include "Camera.h"
#include "BundleImage.h"
#include "BundleObservationSolveSettings.h"
#include "BundleTargetBody.h"
#include "Camera.h"
#include "SpicePosition.h"
#include "SpiceRotation.h"

using namespace boost::numeric::ublas;

namespace Isis {

  /**
   * default constructor
   * Constructs a BundleObservation initialized to a default state.
   */
  BundleObservation::BundleObservation() {
    m_serialNumbers.clear();
@@ -21,7 +26,7 @@ namespace Isis {
    m_instrumentId = "";
    m_instrumentRotation = NULL;
    m_instrumentPosition = NULL;
    m_Index = 0;
    m_index = 0;
    m_weights.clear();
    m_corrections.clear();
//    m_solution.clear();
@@ -31,7 +36,13 @@ namespace Isis {


  /**
   * constructor
   * Constructs a BundleObservation from an BundleImage, an instrument id, an observation
   * number to assign to this BundleObservation, and a target body.
   *
   * @param image QSharedPointer to the primary image in the observation  
   * @param observationNumber Observation number of the observation
   * @param instrumentId Id of the instrument for the observation
   * @param bundleTargetBody QSharedPointer to the target body of the observation
   */
  BundleObservation::BundleObservation(BundleImageQsp image, QString observationNumber,
                                       QString instrumentId, BundleTargetBodyQsp bundleTargetBody) {
@@ -42,7 +53,7 @@ namespace Isis {
    m_instrumentId = "";
    m_instrumentRotation = NULL;
    m_instrumentPosition = NULL;
    m_Index = 0;
    m_index = 0;
    m_weights.clear();
    m_corrections.clear();
//    m_solution.clear();
@@ -83,7 +94,9 @@ namespace Isis {


  /**
   *  copy constructor
   * Creates a copy of another BundleObservation.
   *
   * @param src Reference to the BundleObservation to copy
   */
  BundleObservation::BundleObservation(const BundleObservation &src) {
    m_serialNumbers = src.m_serialNumbers;
@@ -95,17 +108,30 @@ namespace Isis {
    m_instrumentRotation = src.m_instrumentRotation;

    m_solveSettings = src.m_solveSettings;

    m_index = src.m_index;
  }


  /**
   * destructor
   * Destructor.
   *
   * Upon destruction, any contained QObjects (BundleImages) will be deleted.
   */
  BundleObservation::~BundleObservation() {
    clear();
  }


  /**
   * Assignment operator
   *
   * Assigns the state of the source BundleObservation to this BundleObservation
   *
   * @param BundleObservation Reference to the source BundleObservation to assign from
   *
   * @return @b BundleObservation& Reference to this BundleObservation
   */
  BundleObservation &BundleObservation::operator=(const BundleObservation &src) {
    if (&src != this) {
      m_serialNumbers = src.m_serialNumbers;
@@ -123,7 +149,15 @@ namespace Isis {


  /**
   * set solve parameters
   * Set solve parameters
   *
   * @param solveSettings The solve settings to use
   *
   * @return @b bool Returns true if settings were successfully set
   *
   * @internal
   *   @todo initParameterWeights() doesn't return false, so this methods always 
   *         returns true.
   */
  bool BundleObservation::setSolveSettings(BundleObservationSolveSettings solveSettings) {
    m_solveSettings = BundleObservationSolveSettingsQsp(
@@ -161,7 +195,9 @@ namespace Isis {


  /**
   * return instrumentId
   * Accesses the instrument id
   *
   * @return @b QString Returns the instrument id of the observation
   */
  QString BundleObservation::instrumentId() {
    return m_instrumentId;
@@ -169,7 +205,9 @@ namespace Isis {


  /**
   * TODO
   * Accesses the instrument's spice rotation
   *
   * @return @b SpiceRotation* Returns the SpiceRotation for this observation
   */
  SpiceRotation *BundleObservation::spiceRotation() {
    return m_instrumentRotation;
@@ -177,7 +215,9 @@ namespace Isis {


  /**
   * TODO
   * Accesses the instrument's spice position 
   *
   * @return @b SpicePosition* Returns the SpicePosition for this observation
   */
  SpicePosition *BundleObservation::spicePosition() {
    return m_instrumentPosition;
@@ -185,7 +225,9 @@ namespace Isis {


  /**
   * TODO
   * Accesses the solve parameter weights
   * 
   * @return @b vector<double> Returns the parameter weights for solving
   */
  vector<double> &BundleObservation::parameterWeights() {
    return m_weights;
@@ -193,7 +235,9 @@ namespace Isis {


  /**
   * TODO
   * Accesses the parameter corrections 
   *
   * @return @b vector<double> Returns the parameter corrections
   */
  vector<double> &BundleObservation::parameterCorrections() {
    return m_corrections;
@@ -201,7 +245,8 @@ namespace Isis {


  /**
   * TODO
   * @internal
   *   @todo 
   */
//  vector<double> &BundleObservation::parameterSolution() {
//    return m_solution;
@@ -209,7 +254,9 @@ namespace Isis {


  /**
   * TODO
   * Accesses the a priori sigmas
   *
   * @return @b vecotr<double> Returns the a priori sigmas
   */
  vector<double> &BundleObservation::aprioriSigmas() {
    return m_aprioriSigmas;
@@ -217,20 +264,33 @@ namespace Isis {


  /**
   * TODO
   * Accesses the adjusted sigmas 
   *
   * @return @b vector<double> Returns the adjusted sigmas
   */
  vector<double> &BundleObservation::adjustedSigmas() {
    return m_adjustedSigmas;
  }


  /**
   * Accesses the solve settings
   *
   * @return @b const BundleObservationSolveSettingsQsp Returns a pointer to the solve
   *                                                    settings for this BundleObservation
   */
  const BundleObservationSolveSettingsQsp BundleObservation::solveSettings() { 
    return m_solveSettings;
  }


  /**
   * TODO
   * Initializes the exterior orientation 
   *
   * @return @b bool Returns true upon successful intialization
   *
   * @internal
   *   @todo Should this always return true?
   */
  bool BundleObservation::initializeExteriorOrientation() {

@@ -243,25 +303,25 @@ namespace Isis {

      for (int i = 0; i < size(); i++) {
        BundleImageQsp image = at(i);
        SpicePosition *spiceposition = image->camera()->instrumentPosition();
        SpicePosition *spicePosition = image->camera()->instrumentPosition();

        if (i > 0) {
          spiceposition->SetPolynomialDegree(m_solveSettings->spkSolveDegree());
          spiceposition->SetOverrideBaseTime(positionBaseTime, positiontimeScale);
          spiceposition->SetPolynomial(posPoly1, posPoly2, posPoly3,
          spicePosition->SetPolynomialDegree(m_solveSettings->spkSolveDegree());
          spicePosition->SetOverrideBaseTime(positionBaseTime, positiontimeScale);
          spicePosition->SetPolynomial(posPoly1, posPoly2, posPoly3,
                                       m_solveSettings->positionInterpolationType());
        }
        else {
          // first, set the degree of the spk polynomial to be fit for a priori values
          spiceposition->SetPolynomialDegree(m_solveSettings->spkDegree());
          spicePosition->SetPolynomialDegree(m_solveSettings->spkDegree());

          // now, set what kind of interpolation to use (SPICE, memcache, hermitecache, polynomial
          // function, or polynomial function over constant hermite spline)
          // TODO: verify - I think this actually performs the a priori fit
          spiceposition->SetPolynomial(m_solveSettings->positionInterpolationType());
          spicePosition->SetPolynomial(m_solveSettings->positionInterpolationType());

          // finally, set the degree of the spk polynomial actually used in the bundle adjustment
          spiceposition->SetPolynomialDegree(m_solveSettings->spkSolveDegree());
          spicePosition->SetPolynomialDegree(m_solveSettings->spkSolveDegree());

          if (m_instrumentPosition) { // ??? TODO: why is this different from rotation code below???
            positionBaseTime = m_instrumentPosition->GetBaseTime();
@@ -313,7 +373,9 @@ namespace Isis {


  /**
   * TODO
   * Intializes the body rotation 
   *
   * @todo check to make sure m_bundleTargetBody is valid
   */
  void BundleObservation::initializeBodyRotation() {
    std::vector<Angle> raCoefs = m_bundleTargetBody->poleRaCoefs();
@@ -328,7 +390,10 @@ namespace Isis {


  /**
   * TODO
   * Updates the body rotation 
   *
   * @internal
   *   @todo Is this a duplicate of initializeBodyRotation?
   */
  void BundleObservation::updateBodyRotation() {
    std::vector<Angle> raCoefs = m_bundleTargetBody->poleRaCoefs();
@@ -391,12 +456,18 @@ namespace Isis {


  /**
   * TODO
   * Don't like this, don't like this, don't like this, don't like this, don't like this.
   * Initializes the paramater weights for solving
   * 
   * @return @b bool Returns true upon successful intialization
   *
   * @internal  
   *   @todo Don't like this, don't like this, don't like this, don't like this, don't like this.
   *         By the way, this seems klunky to me, would like to come up with a better way.
   *         Also, apriori sigmas are in two places, the BundleObservationSolveSettings AND in the
   *         the BundleObservation class too - this is unnecessary should only be in the
   *         BundleObservationSolveSettings. But, they are split into position and pointing.
   *
   *   @todo always returns true?
   */
  bool BundleObservation::initParameterWeights() {

@@ -405,8 +476,8 @@ namespace Isis {
    double velWeight    = 0.0;     // velocity
    double accWeight    = 0.0;     // acceleration
    double angWeight    = 0.0;     // angles
    double angvelWeight = 0.0;     // angular velocity
    double angaccWeight = 0.0;     // angular acceleration
    double angVelWeight = 0.0;     // angular velocity
    double angAccWeight = 0.0;     // angular acceleration

    QList<double> aprioriPointingSigmas = m_solveSettings->aprioriPointingSigmas();
    QList<double> aprioriPositionSigmas = m_solveSettings->aprioriPositionSigmas();
@@ -439,45 +510,45 @@ namespace Isis {
      angWeight = 1.0 / (angWeight  *angWeight * DEG2RAD * DEG2RAD);
    }
    if (aprioriPointingSigmas.size() >= 2 && aprioriPointingSigmas.at(1) > 0.0) {
      angvelWeight = aprioriPointingSigmas.at(1);
      angvelWeight = 1.0 / (angvelWeight * angvelWeight * DEG2RAD * DEG2RAD);
      angVelWeight = aprioriPointingSigmas.at(1);
      angVelWeight = 1.0 / (angVelWeight * angVelWeight * DEG2RAD * DEG2RAD);
    }
    if (aprioriPointingSigmas.size() >= 3 && aprioriPointingSigmas.at(2) > 0.0) {
      angaccWeight = aprioriPointingSigmas.at(2);
      angaccWeight = 1.0 / (angaccWeight * angaccWeight * DEG2RAD * DEG2RAD);
      angAccWeight = aprioriPointingSigmas.at(2);
      angAccWeight = 1.0 / (angAccWeight * angAccWeight * DEG2RAD * DEG2RAD);
    }

    int nspkTerms = m_solveSettings->spkSolveDegree()+1;
    nspkTerms = m_solveSettings->numberCameraPositionCoefficientsSolved();
    int nSpkTerms = m_solveSettings->spkSolveDegree()+1;
    nSpkTerms = m_solveSettings->numberCameraPositionCoefficientsSolved();
    for ( int i = 0; i < nCamPosCoeffsSolved; i++) {
      if (i % nspkTerms == 0) {
      if (i % nSpkTerms == 0) {
       m_aprioriSigmas[i] = aprioriPositionSigmas.at(0);
       m_weights[i] = posWeight;
      }
      if (i % nspkTerms == 1) {
      if (i % nSpkTerms == 1) {
       m_aprioriSigmas[i] = aprioriPositionSigmas.at(1);
       m_weights[i] = velWeight;
      }
      if (i % nspkTerms == 2) {
      if (i % nSpkTerms == 2) {
       m_aprioriSigmas[i] = aprioriPositionSigmas.at(2);
       m_weights[i] = accWeight;
      }
    }

    int nckTerms = m_solveSettings->ckSolveDegree()+1;
    nckTerms = m_solveSettings->numberCameraAngleCoefficientsSolved()    ;
    int nCkTerms = m_solveSettings->ckSolveDegree()+1;
    nCkTerms = m_solveSettings->numberCameraAngleCoefficientsSolved();
    for ( int i = 0; i < nCamAngleCoeffsSolved; i++) {
      if (i % nckTerms == 0) {
      if (i % nCkTerms == 0) {
        m_aprioriSigmas[nCamPosCoeffsSolved + i] = aprioriPointingSigmas.at(0);
        m_weights[nCamPosCoeffsSolved + i] = angWeight;
      }
      if (i % nckTerms == 1) {
      if (i % nCkTerms == 1) {
        m_aprioriSigmas[nCamPosCoeffsSolved + i] = aprioriPointingSigmas.at(1);
        m_weights[nCamPosCoeffsSolved + i] = angvelWeight;
        m_weights[nCamPosCoeffsSolved + i] = angVelWeight;
      }
      if (i % nckTerms == 2) {
      if (i % nCkTerms == 2) {
        m_aprioriSigmas[nCamPosCoeffsSolved + i] = aprioriPointingSigmas.at(2);
        m_weights[nCamPosCoeffsSolved + i] = angaccWeight;
        m_weights[nCamPosCoeffsSolved + i] = angAccWeight;
      }
    }

@@ -489,9 +560,24 @@ namespace Isis {


  /**
   * TODO
   * Applies the parameter corrections 
   *
   * @param corrections Vector of corrections to apply
   *
   * @throws IException::Unknown "Instrument position is NULL, but position solve option is 
   *                              [not NoPositionFactors]"
   * @throws IException::Unknown "Instrument position is NULL, but pointing solve option is
   *                              [not NoPointingFactors]"
   * @throws IException::Unknown "Unable to apply parameter corrections to BundleObservation."
   *
   * @return @b bool Returns true upon successful application of corrections
   *
   * @internal
   *   @todo always returns true?
   */  
  bool BundleObservation::applyParameterCorrections(boost::numeric::ublas::vector<double> corrections) {
  bool BundleObservation::applyParameterCorrections(
      boost::numeric::ublas::vector<double> corrections) {

    int index = 0;

    try {
@@ -582,8 +668,8 @@ namespace Isis {
        // apply updates to all images in observation
        for (int i = 0; i < size(); i++) {
          BundleImageQsp image = at(i);
          SpiceRotation *spicerotation = image->camera()->instrumentRotation();
          spicerotation->SetPolynomial(coefRA, coefDEC, coefTWI,
          SpiceRotation *spiceRotation = image->camera()->instrumentRotation();
          spiceRotation->SetPolynomial(coefRA, coefDEC, coefTWI,
                                       m_solveSettings->pointingInterpolationType());
        }
      }
@@ -594,17 +680,27 @@ namespace Isis {
    } 
    catch (IException &e) {
      QString msg = "Unable to apply parameter corrections to BundleObservation.";
      IException(e, IException::Unknown, msg, _FILEINFO_);
      IException(e, IException::Unknown, msg, _FILEINFO_); //THROW ???
    }
    return true;
  }


  /**
   * Returns the number of position parameters there are
   *
   * @return @b int Returns the number of position parameters
   */
  int BundleObservation::numberPositionParameters() {
    return 3.0 * m_solveSettings->numberCameraPositionCoefficientsSolved();
  }


  /**
   * Returns the number of pointing parameters being solved for
   *
   * @return @b int Returns the number of pointing parameters
   */
  int BundleObservation::numberPointingParameters() {
    int angleCoefficients = m_solveSettings->numberCameraAngleCoefficientsSolved();

@@ -615,21 +711,48 @@ namespace Isis {
  }


  /**
   * Returns the number of total parameters there are for solving
   *
   * The total number of parameters is equal to the number of position parameters and number of
   * pointing parameters
   *
   * @return @b int Returns the number of parameters there are
   */
  int BundleObservation::numberParameters() {
    return numberPositionParameters() + numberPointingParameters();
  }


  /**
   * Sets the index for the observation
   *
   * @param n Value to set the index of the observation to
   */
  void BundleObservation::setIndex(int n) {
    m_Index = n;
    m_index = n;
  }


  /**
   * Accesses the observation's index
   *
   * @return @b int Returns the observation's index
   */
  int BundleObservation::index() {
    return m_Index;
    return m_index;
  }


  /**
   * Creates and returns a formatted QString representing the bundle coefficients and 
   * parameters
   *
   * @param errorPropagation Boolean indicating whether or not to attach more information 
   *     (corrections, sigmas, adjusted sigmas...) to the output QString
   *
   * @return @b QString Returns a formatted QString representing the BundleObservation 
   */
  QString BundleObservation::formatBundleOutputString(bool errorPropagation) {
    std::vector<double> coefX;
    std::vector<double> coefY;
@@ -776,6 +899,8 @@ namespace Isis {

  /**
   * Access to parameters for CorrelationMatrix to use.
   *
   * @return @b QStringList Returns a QStringList of the names of the parameters
   */
  QStringList BundleObservation::parameterList() {
    return m_parameterNamesList;
@@ -784,6 +909,8 @@ namespace Isis {

  /**
   * Access to image names for CorrelationMatrix to use.
   *
   * @return @b QStringList Returns a QStringList of the image names
   */
  QStringList BundleObservation::imageNames() {
    return m_imageNames;
+40 −31
Original line number Diff line number Diff line
@@ -31,12 +31,17 @@
#include "BundleImage.h"
#include "BundleObservationSolveSettings.h"
#include "BundleTargetBody.h"
#include "SpiceRotation.h"
#include "SpicePosition.h"

namespace Isis {  
  class BundleObservationSolveSettings;
  class SpicePosition;
  class SpiceRotation;

  /**
   * @brief 
   * @brief Class for bundle observations
   *
   * This class is used for creating a bundle observation. Upon destruction, this class will
   * delete all contained QObjects (BundleImages).
   *  
   * @ingroup ControlNetworks
   *
@@ -52,7 +57,7 @@ namespace Isis {
   *   @history 2015-02-20 Jeannie Backer - Brought closer to Isis coding standards.
   *   @history 2016-08-03 Jesse Mapel - Changed contained member type to a QSharedPointer.
   *                           Also changed m_solveSettings to a QSharedPointer. Fixes #4150.
   *
   *   @history 2016-08-03 Ian Humphrey - Updated documentation and coding standards. Fixes #4078.
   */
  class BundleObservation : public QVector<BundleImageQsp> {

@@ -113,36 +118,40 @@ namespace Isis {
      bool initParameterWeights();

    private:
      QString m_observationNumber; //!< this is typically equivalent to serial number
                                   //!< except in the case of "observation mode" (e.g.
                                   //!< Lunar Orbiter) where for each image in the
                                   //!< observation the observation # is the serial #
                                   //!< augmented with an additional integer
      QString m_observationNumber; /**< This is typically equivalent to serial number
                                        except in the case of "observation mode" (e.g.
                                        Lunar Orbiter) where for each image in the
                                        observation, the observation number is the serial number
                                        augmented with an additional integer. **/

      int m_Index;
      int m_index; //!< Index of this observation.

      QStringList m_serialNumbers; //!< list of all cube serial numbers in observation
      QStringList m_parameterNamesList; //!< list of all cube parameters
      QStringList m_imageNames; //!< list of all cube parameters
      QStringList m_serialNumbers;      //!< List of all cube serial numbers in observation.
      QStringList m_parameterNamesList; //!< List of all cube parameters.
      QStringList m_imageNames;         //!< List of all cube names.

      QString m_instrumentId;      //!< spacecraft instrument id
      QString m_instrumentId;      //!< Spacecraft instrument id.

      BundleObservationSolveSettingsQsp m_solveSettings; //!< solve settings for this observation
      BundleObservationSolveSettingsQsp m_solveSettings; //!< Solve settings for this observation.

      SpiceRotation *m_instrumentRotation;   //!< Instrument spice rotation (in primary image)
      SpicePosition *m_instrumentPosition;   //!< Instrument spice position (in primary image)
//    SpiceRotation *m_bodyRotation;         //!< Instrument spice position (in primary image)
      SpiceRotation *m_instrumentRotation;   //!< Instrument spice rotation (in primary image).
      SpicePosition *m_instrumentPosition;   //!< Instrument spice position (in primary image).
//    SpiceRotation *m_bodyRotation;         //!< Instrument body rotation (in primary image).

      BundleTargetBodyQsp m_bundleTargetBody;       //!< QShared pointer to BundleTargetBody
      BundleTargetBodyQsp m_bundleTargetBody;       //!< QShared pointer to BundleTargetBody.

    // TODO??? change these to LinearAlgebra vectors...
      boost::numeric::ublas::vector< double > m_weights;            //!< parameter weights
      boost::numeric::ublas::vector< double > m_corrections;        //!< cumulative parameter correction vector
      //boost::numeric::ublas::vector< double > m_solution;           //!< parameter solution vector
      boost::numeric::ublas::vector< double > m_aprioriSigmas;      //!< a posteriori (adjusted) parameter sigmas
      boost::numeric::ublas::vector< double > m_adjustedSigmas;     //!< a posteriori (adjusted) parameter sigmas
      boost::numeric::ublas::vector<double> m_weights;     //!< Parameter weights.
      //! Cumulative parameter correction vector.
      boost::numeric::ublas::vector<double> m_corrections;
      //boost::numeric::ublas::vector<double> m_solution;  //!< parameter solution vector.
      //! A posteriori (adjusted) parameter sigmas.
      boost::numeric::ublas::vector<double> m_aprioriSigmas;
      //! A posteriori (adjusted) parameter sigmas.
      boost::numeric::ublas::vector<double> m_adjustedSigmas; 
  };

  //! Typdef for BundleObservation QSharedPointer.
  typedef QSharedPointer<BundleObservation> BundleObservationQsp;
}

+283 −73

File changed.

Preview size limit exceeded, changes collapsed.

+43 −31

File changed.

Preview size limit exceeded, changes collapsed.

+54 −21
Original line number Diff line number Diff line
@@ -2,20 +2,22 @@

#include <QDebug>

#include "BundleObservation.h"
#include "IException.h"


namespace Isis {

  /**
   * constructor
   * Constructs an empty BundleObservationVector.
   */
  BundleObservationVector::BundleObservationVector() {
  }


  /**
   * destructor
   * Destructor.
   *
   * Upon destruction, BundleObservation will delete all contained QObjects (BundleObservations).
   */
  BundleObservationVector::~BundleObservationVector() {
    clear();
@@ -23,25 +25,38 @@ namespace Isis {


  /**
   * add new BundleObservation method
   * Adds a new BundleObservation.
   *
   * Adds a new BundleObservation to this vector. If a BundleObservation has already been added
   * with the passed observationNumber, the passed BundleImage is added to the existing 
   * BundleObservation.
   *
   * @param bundleImage QSharedPointer to the BundleImage in the observation to add
   * @param observationNumber Observation number of the observation to add
   * @param instrumentId Instrument id of the observation to add
   * @param bundleSettings Qsp to BundleSettings for the observation being added
   * 
   * @throws IException::Programmer "Unable to allocate new BundleObservation"
   *
   * @return @b BundleObservationQsp Returns a pointer to the BundleObservation that was added
   */
  BundleObservationQsp BundleObservationVector::addnew(BundleImageQsp bundleImage,
                                                       QString observationNumber,
                                                       QString instrumentId,
                                                       BundleSettingsQsp bundleSettings) {
    BundleObservationQsp bundleObservation;
    bool bAddToExisting = false;
    bool addToExisting = false;

    if (bundleSettings->solveObservationMode() &&
        m_observationNumberToObservationMap.contains(observationNumber)) {
      bundleObservation = m_observationNumberToObservationMap.value(observationNumber);

      if (bundleObservation->instrumentId() == instrumentId) {
        bAddToExisting = true;
        addToExisting = true;
      }
    }

    if (bAddToExisting) {
    if (addToExisting) {
      // if we have already added a BundleObservation with this number, we have to add the new
      // BundleImage to this observation
      bundleObservation->append(bundleImage);
@@ -62,7 +77,7 @@ namespace Isis {
                                               bundleSettings->bundleTargetBody()));

      if (!bundleObservation) {
        QString message = "unable to allocate new BundleObservation ";
        QString message = "Unable to allocate new BundleObservation ";
        message += "for " + bundleImage->fileName();
        throw IException(IException::Programmer, message, _FILEINFO_);
      }
@@ -97,7 +112,9 @@ namespace Isis {


  /**
   * TODO
   * Accesses the number of position parameters for the contained BundleObservations.
   *
   * @return @b int Returns the total number of position parameters for the BundleObservations 
   */
  int BundleObservationVector::numberPositionParameters() {
    int positionParameters = 0;
@@ -112,7 +129,9 @@ namespace Isis {


  /**
   * TODO
   * Accesses the number of pointing parameters for the contained BundleObservations.
   *
   * @return @b int Returns the total number of pointing parameters for the BundleObservations 
   */
  int BundleObservationVector::numberPointingParameters() {
    int pointingParameters = 0;
@@ -127,7 +146,10 @@ namespace Isis {


  /**
   * TODO
   * Returns the sum of the position parameters and pointing parameters for the contained
   * BundleObservations.
   *
   * @return @b int Returns the total number of parameters for the contained BundleObservations 
   */
  int BundleObservationVector::numberParameters() {
    return numberPositionParameters() + numberPointingParameters();
@@ -135,7 +157,14 @@ namespace Isis {


  /**
   * TODO
   * Accesses a BundleObservation associated with the passed serial number.
   *
   * If there is no BundleObservation associated with the serial number, a NULL
   * pointer is returned.
   *
   * @param cubeSerialNumber Serial number of a cube to try to find an associated BundleObservation
   *
   * @return @b BundleObservationQsp Pointer to the associated BundleObservation (NULL if not found)
   */
  BundleObservationQsp BundleObservationVector::
      observationByCubeSerialNumber(QString cubeSerialNumber) {
@@ -149,7 +178,9 @@ namespace Isis {


  /**
   * TODO
   * Initializes the exterior orientations for the contained BundleObservations.
   *
   * @return @b bool Returns true upon successful initialization 
   */
  bool BundleObservationVector::initializeExteriorOrientation() {
    int nObservations = size();
@@ -163,7 +194,9 @@ namespace Isis {


  /**
   * TODO
   * Initializes the body rotations for the contained BundleObservations.
   *
   * @return @b bool Returns true upon successful initialization 
   */
  bool BundleObservationVector::initializeBodyRotation() {
    int nObservations = size();
Loading