Commit 127c83b2 authored by Jeannie Backer's avatar Jeannie Backer
Browse files

Fixed method calls needed for trunk update.

git-svn-id: http://subversion.wr.usgs.gov/repos/prog/isis3/branches/ipce@6489 41f8697f-d340-4b68-9986-7bafba869bb8
parent f8679759
Loading
Loading
Loading
Loading
+160 −25
Original line number Diff line number Diff line
@@ -11,8 +11,10 @@

namespace Isis {


  /**
   * constructor
   *  
   * @param controlPoint 
   */
  BundleControlPoint::BundleControlPoint(ControlPoint *controlPoint) {
    m_controlPoint = controlPoint;
@@ -38,7 +40,8 @@ namespace Isis {


  /**
   * copy constructor
   * 
   * @param src 
   */
  BundleControlPoint::BundleControlPoint(const BundleControlPoint &src) {
    copy(src);
@@ -55,7 +58,8 @@ namespace Isis {


  /**
   * copy method
   * 
   * @param src 
   */
  void BundleControlPoint::copy(const BundleControlPoint &src) {

@@ -78,6 +82,12 @@ namespace Isis {
  }


  /**
   * 
   * @param controlMeasure 
   * 
   * @return @b BundleMeasure* 
   */
  BundleMeasure *BundleControlPoint::addMeasure(ControlMeasure *controlMeasure) {

    BundleMeasure *bundleMeasure = new BundleMeasure(controlMeasure, this);
@@ -88,11 +98,20 @@ namespace Isis {
  }


  /**
   * 
   * @param surfacePoint 
   */
  void BundleControlPoint::setAdjustedSurfacePoint(SurfacePoint surfacePoint) {
    m_controlPoint->SetAdjustedSurfacePoint(surfacePoint);
  }


  /**
   * 
   * @param settings 
   * @param metersToRadians 
   */
  void BundleControlPoint::setWeights(const BundleSettingsQsp settings, double metersToRadians) {

    double d;
@@ -170,75 +189,124 @@ namespace Isis {
  }



  /**
   * 
   * 
   * @return @b ControlPoint* 
   */
  ControlPoint *BundleControlPoint::rawControlPoint() const {
    return m_controlPoint;
  }



  /**
   * 
   * 
   * @return @b bool 
   */
  bool BundleControlPoint::isRejected() const {
    return m_controlPoint->IsRejected();
  }



  /**
   * 
   * 
   * @return @b int 
   */
  int BundleControlPoint::numberMeasures() const {
    return m_controlPoint->GetNumMeasures();
  }



  /**
   * 
   * 
   * @return @b SurfacePoint 
   */
  SurfacePoint BundleControlPoint::getAdjustedSurfacePoint() const {
    return m_controlPoint->GetAdjustedSurfacePoint();
  }



  /**
   * 
   * 
   * @return @b QString 
   */
  QString BundleControlPoint::getId() const {
    return m_controlPoint->GetId();
  }



  // ??? why bounded vector ??? can we use linear algebra vector ??? 
  /**
   * 
   * 
   * @return @b boost::numeric::ublas::bounded_vector<double,3>& 
   */
  boost::numeric::ublas::bounded_vector< double, 3 > &BundleControlPoint::corrections() {
    return m_corrections;
  }



  /**
   * 
   * 
   * @return @b boost::numeric::ublas::bounded_vector<double,3>& 
   */
  boost::numeric::ublas::bounded_vector< double, 3 > &BundleControlPoint::aprioriSigmas() {
    return m_aprioriSigmas;

  }



  /**
   * 
   * 
   * @return @b boost::numeric::ublas::bounded_vector<double,3>& 
   */
  boost::numeric::ublas::bounded_vector< double, 3 > &BundleControlPoint::adjustedSigmas() {
    return m_adjustedSigmas;
  }



  /**
   * 
   * 
   * @return @b boost::numeric::ublas::bounded_vector<double,3>& 
   */
  boost::numeric::ublas::bounded_vector< double, 3 > &BundleControlPoint::weights() {
    return m_weights;
  }



  /**
   * 
   * 
   * @return @b boost::numeric::ublas::bounded_vector<double,3>& 
   */
  boost::numeric::ublas::bounded_vector<double, 3> &BundleControlPoint::nicVector() {
    return m_nicVector;
  }



  /**
   * 
   * 
   * @return @b SparseBlockRowMatrix& 
   */
  SparseBlockRowMatrix &BundleControlPoint::cholmod_QMatrix() {
    return m_cholmod_QMatrix;
  }



  /**
   * 
   * @param errorPropagation 
   * 
   * @return @b QString 
   */
  QString BundleControlPoint::formatBundleOutputSummaryString(bool errorPropagation) const {

    int numRays        = numberMeasures(); // should this depend on the raw point, as written, or this->size()???
@@ -267,7 +335,13 @@ namespace Isis {
  }



  /**
   * 
   * @param errorPropagation 
   * @param RTM 
   * 
   * @return @b QString 
   */
  QString BundleControlPoint::formatBundleOutputDetailString(bool errorPropagation,
                                                             double RTM) const {

@@ -349,7 +423,14 @@ namespace Isis {
  }



  /**
   * 
   * @param value 
   * @param fieldWidth 
   * @param precision 
   * 
   * @return @b QString 
   */
  QString BundleControlPoint::formatValue(double value, int fieldWidth, int precision) const {
    QString output;
    IsNullPixel(value) ? 
@@ -359,7 +440,14 @@ namespace Isis {
  }



  /**
   * 
   * @param type 
   * @param fieldWidth 
   * @param precision 
   * 
   * @return @b QString 
   */
  QString BundleControlPoint::formatAprioriSigmaString(int type, int fieldWidth, 
                                                       int precision) const {
    QString aprioriSigmaStr;
@@ -374,27 +462,53 @@ namespace Isis {
  }



  /**
   * 
   * @param fieldWidth 
   * @param precision 
   * 
   * @return @b QString 
   */
  QString BundleControlPoint::formatLatitudeAprioriSigmaString(int fieldWidth, 
                                                               int precision) const {
    return formatAprioriSigmaString(0, fieldWidth, precision);
  }



  /**
   * 
   * @param fieldWidth 
   * @param precision 
   * 
   * @return @b QString 
   */
  QString BundleControlPoint::formatLongitudeAprioriSigmaString(int fieldWidth, 
                                                                int precision) const {
    return formatAprioriSigmaString(1, fieldWidth, precision);
  }



  /**
   * 
   * @param fieldWidth 
   * @param precision 
   * 
   * @return @b QString 
   */
  QString BundleControlPoint::formatRadiusAprioriSigmaString(int fieldWidth, int precision) const {
    return formatAprioriSigmaString(2, fieldWidth, precision);
  }



  /**
   * 
   * @param type 
   * @param fieldWidth 
   * @param precision 
   * @param errorPropagation 
   * 
   * @return @b QString 
   */
  QString BundleControlPoint::formatAdjustedSigmaString(int type, int fieldWidth, int precision,
                                                        bool errorPropagation) const {
    QString adjustedSigmaStr;
@@ -425,23 +539,44 @@ namespace Isis {
  }



  /**
   * 
   * @param fieldWidth 
   * @param precision 
   * @param errorPropagation 
   * 
   * @return @b QString 
   */
  QString BundleControlPoint::formatLatitudeAdjustedSigmaString(int fieldWidth, int precision,
                                                                bool errorPropagation) const {
    return formatAdjustedSigmaString(0, fieldWidth, precision, errorPropagation);
  }



  /**
   * 
   * @param fieldWidth 
   * @param precision 
   * @param errorPropagation 
   * 
   * @return @b QString 
   */
  QString BundleControlPoint::formatLongitudeAdjustedSigmaString(int fieldWidth, int precision,
                                                                 bool errorPropagation) const {
    return formatAdjustedSigmaString(1, fieldWidth, precision, errorPropagation);
  }



  // TODO: what do we do if we're not solving for radius, how do we know that here?????????????????
  // TODO: sigma is not == 0.0, if not solving for radius it's like something crazy e-22
  /**
   * 
   * @param fieldWidth 
   * @param precision 
   * @param errorPropagation 
   * 
   * @return @b QString 
   */
  QString BundleControlPoint::formatRadiusAdjustedSigmaString(int fieldWidth, int precision,
                                                              bool errorPropagation) const {
    return formatAdjustedSigmaString(2, fieldWidth, precision, errorPropagation);
+3 −3
Original line number Diff line number Diff line
@@ -655,7 +655,7 @@ Coordinate Value Correction Correction
    RADIUS       0.01000000           0.00000000          0.00000000          0.01000000        4.00000000               N/A

" 
aprioriSigmas:   2 3 4 
aprioriSigmas:   "2.0" "3.0" "4.0" 
weights:         25 11.1111 62500 

Raw control point equal to original?     "Yes" 
@@ -761,7 +761,7 @@ Coordinate Value Correction Correction
    RADIUS       0.01000000           0.00000000          0.00000000          0.01000000        4.00000000               N/A

" 
aprioriSigmas:   2 3 4 
aprioriSigmas:   "2.0" "3.0" "4.0" 
weights:         25 11.1111 62500 


@@ -795,7 +795,7 @@ Coordinate Value Correction Correction
    RADIUS       1.00000000           0.00000000          0.00000000          1.00000000       38.45488734       38.45488734

" 
aprioriSigmas:   28.657 36.7882 38.4549 
aprioriSigmas:   "28.656964947064" "36.788158835093" "38.454887341483" 
weights:         1217.7 1027.41 676.234 

Create copy of FreePoint using copy constructor... 
+26 −10
Original line number Diff line number Diff line
@@ -423,7 +423,7 @@ int main(int argc, char *argv[]) {
        6) formatBundleOutputString - with instrumentPosition/instrumentRotation not NULL
    #endif
    BundleObservation bo;
    BundleTargetBodyQsp bundleTargetBody;// ???
    BundleTargetBodyQsp bundleTargetBody = BundleTargetBodyQsp(new BundleTargetBody);
    qDebug() << "Constructing BundleObservation object from BundleImage...";
    BundleObservation bo2(bi2, 
                          "ObservationNumber2", 
@@ -643,7 +643,7 @@ int main(int argc, char *argv[]) {
    qDebug() << bcp1.formatBundleOutputDetailString(errorProp, radiansToMeters); // ??? these print outs are not pretty... fix???

    qDebug() << "Modify FreePoint - setWeights() - solveRadius=false";
    BundleSettingsQsp settings; // default solveRadius=false
    BundleSettingsQsp settings = BundleSettingsQsp(new BundleSettings); // default solveRadius=false
    double metersToRadians = 1.0 / radiansToMeters;
    bcp1.setWeights(settings, metersToRadians);
    qDebug() << bcp1.formatBundleOutputSummaryString(errorProp);
@@ -654,7 +654,9 @@ int main(int argc, char *argv[]) {
    boost::numeric::ublas::bounded_vector< double, 3 > adjustedSigmas = bcp1.adjustedSigmas(); //??? never set 000??? 1.0e+50???
    boost::numeric::ublas::bounded_vector<double, 3> nicVector = bcp1.nicVector(); //??? never set 000c??? 1.0e+50???
    SparseBlockRowMatrix qMatrix = bcp1.cholmod_QMatrix(); //??? empty matrix...
    qDebug() << "aprioriSigmas:  " << aprioriSigmas[0] << aprioriSigmas[1] << aprioriSigmas[2];
    qDebug() << "aprioriSigmas:  " << (Isis::IsSpecial(aprioriSigmas[0]) ? "NULL" : Isis::toString(aprioriSigmas[0]))
                                   << (Isis::IsSpecial(aprioriSigmas[1]) ? "NULL" : Isis::toString(aprioriSigmas[1]))
                                   << (Isis::IsSpecial(aprioriSigmas[2]) ? "NULL" : Isis::toString(aprioriSigmas[2]));
    qDebug() << "weights:        " << weights[0] << weights[1] << weights[2];
    qDebug() << "corrections:    " << corrections[0] << corrections[1] << corrections[2];
    qDebug() << "adjustedSigmas: " << adjustedSigmas[0] << adjustedSigmas[1] << adjustedSigmas[2];
@@ -670,7 +672,9 @@ int main(int argc, char *argv[]) {
    qDebug() << bcp1.formatBundleOutputDetailString(errorProp, radiansToMeters);
    aprioriSigmas = bcp1.aprioriSigmas();
    weights = bcp1.weights();
    qDebug() << "aprioriSigmas:  " << aprioriSigmas[0] << aprioriSigmas[1] << aprioriSigmas[2];
    qDebug() << "aprioriSigmas:  " << (Isis::IsSpecial(aprioriSigmas[0]) ? "NULL" : Isis::toString(aprioriSigmas[0]))
                                   << (Isis::IsSpecial(aprioriSigmas[1]) ? "NULL" : Isis::toString(aprioriSigmas[1]))
                                   << (Isis::IsSpecial(aprioriSigmas[2]) ? "NULL" : Isis::toString(aprioriSigmas[2]));
    qDebug() << "weights:        " << weights[0] << weights[1] << weights[2];
    qDebug();

@@ -681,7 +685,9 @@ int main(int argc, char *argv[]) {
    qDebug() << bcp1.formatBundleOutputDetailString(errorProp, radiansToMeters);
    aprioriSigmas = bcp1.aprioriSigmas();
    weights = bcp1.weights();
    qDebug() << "aprioriSigmas:  " << aprioriSigmas[0] << aprioriSigmas[1] << aprioriSigmas[2];
    qDebug() << "aprioriSigmas:  " << (Isis::IsSpecial(aprioriSigmas[0]) ? "NULL" : Isis::toString(aprioriSigmas[0]))
                                   << (Isis::IsSpecial(aprioriSigmas[1]) ? "NULL" : Isis::toString(aprioriSigmas[1]))
                                   << (Isis::IsSpecial(aprioriSigmas[2]) ? "NULL" : Isis::toString(aprioriSigmas[2]));
    qDebug() << "weights:        " << weights[0] << weights[1] << weights[2];
    qDebug();

@@ -711,7 +717,9 @@ int main(int argc, char *argv[]) {
    qDebug() << bcp3->formatBundleOutputDetailString(errorProp, radiansToMeters);
    aprioriSigmas = bcp3->aprioriSigmas();
    weights = bcp3->weights();
    qDebug() << "aprioriSigmas:  " << aprioriSigmas[0] << aprioriSigmas[1] << aprioriSigmas[2];
    qDebug() << "aprioriSigmas:  " << (Isis::IsSpecial(aprioriSigmas[0]) ? "NULL" : Isis::toString(aprioriSigmas[0]))
                                   << (Isis::IsSpecial(aprioriSigmas[1]) ? "NULL" : Isis::toString(aprioriSigmas[1]))
                                   << (Isis::IsSpecial(aprioriSigmas[2]) ? "NULL" : Isis::toString(aprioriSigmas[2]));
    qDebug() << "weights:        " << weights[0] << weights[1] << weights[2];
    qDebug();

@@ -730,7 +738,9 @@ int main(int argc, char *argv[]) {
    qDebug() << bcp4.formatBundleOutputDetailString(errorProp, radiansToMeters);
    aprioriSigmas = bcp4.aprioriSigmas();
    weights = bcp4.weights();
    qDebug() << "aprioriSigmas:  " << aprioriSigmas[0] << aprioriSigmas[1] << aprioriSigmas[2];
    qDebug() << "aprioriSigmas:  " << (Isis::IsSpecial(aprioriSigmas[0]) ? "NULL" : Isis::toString(aprioriSigmas[0]))
                                   << (Isis::IsSpecial(aprioriSigmas[1]) ? "NULL" : Isis::toString(aprioriSigmas[1]))
                                   << (Isis::IsSpecial(aprioriSigmas[2]) ? "NULL" : Isis::toString(aprioriSigmas[2]));
    qDebug() << "weights:        " << weights[0] << weights[1] << weights[2];
    qDebug();

@@ -742,7 +752,9 @@ int main(int argc, char *argv[]) {
    qDebug() << bcp4.formatBundleOutputDetailString(errorProp, radiansToMeters);
    aprioriSigmas = bcp4.aprioriSigmas();
    weights = bcp4.weights();
    qDebug() << "aprioriSigmas:  " << aprioriSigmas[0] << aprioriSigmas[1] << aprioriSigmas[2];
    qDebug() << "aprioriSigmas:  " << (Isis::IsSpecial(aprioriSigmas[0]) ? "NULL" : Isis::toString(aprioriSigmas[0]))
                                   << (Isis::IsSpecial(aprioriSigmas[1]) ? "NULL" : Isis::toString(aprioriSigmas[1]))
                                   << (Isis::IsSpecial(aprioriSigmas[2]) ? "NULL" : Isis::toString(aprioriSigmas[2]));
    qDebug() << "weights:        " << weights[0] << weights[1] << weights[2];
    qDebug();

@@ -754,7 +766,9 @@ int main(int argc, char *argv[]) {
    qDebug() << bcp4.formatBundleOutputDetailString(errorProp, radiansToMeters);
    aprioriSigmas = bcp4.aprioriSigmas();
    weights = bcp4.weights();
    qDebug() << "aprioriSigmas:  " << aprioriSigmas[0] << aprioriSigmas[1] << aprioriSigmas[2];
    qDebug() << "aprioriSigmas:  " << (Isis::IsSpecial(aprioriSigmas[0]) ? "NULL" : Isis::toString(aprioriSigmas[0]))
                                   << (Isis::IsSpecial(aprioriSigmas[1]) ? "NULL" : Isis::toString(aprioriSigmas[1]))
                                   << (Isis::IsSpecial(aprioriSigmas[2]) ? "NULL" : Isis::toString(aprioriSigmas[2]));
    qDebug() << "weights:        " << weights[0] << weights[1] << weights[2];
    qDebug();
    qDebug();
@@ -796,7 +810,9 @@ int main(int argc, char *argv[]) {
    aprioriSigmas = bcp5.aprioriSigmas(); // these values were verified by comparing against
                                          // SurfacePoint truth data
    weights = bcp5.weights();
    qDebug() << "aprioriSigmas:  " << aprioriSigmas[0] << aprioriSigmas[1] << aprioriSigmas[2];
    qDebug() << "aprioriSigmas:  " << (Isis::IsSpecial(aprioriSigmas[0]) ? "NULL" : Isis::toString(aprioriSigmas[0]))
                                   << (Isis::IsSpecial(aprioriSigmas[1]) ? "NULL" : Isis::toString(aprioriSigmas[1]))
                                   << (Isis::IsSpecial(aprioriSigmas[2]) ? "NULL" : Isis::toString(aprioriSigmas[2]));
    qDebug() << "weights:        " << weights[0] << weights[1] << weights[2];
    qDebug();

+3 −3
Original line number Diff line number Diff line
@@ -55,9 +55,9 @@ int main() {
  // Make Dummy Covariance Matrix
  SparseBlockMatrix tmpMat;
  tmpMat.setNumberOfColumns(2);
  tmpMat.InsertMatrixBlock(0, 0, 2, 2);
  tmpMat.InsertMatrixBlock(1, 0, 2, 2);
  tmpMat.InsertMatrixBlock(1, 1, 2, 2);
  tmpMat.insertMatrixBlock(0, 0, 2, 2);
  tmpMat.insertMatrixBlock(1, 0, 2, 2);
  tmpMat.insertMatrixBlock(1, 1, 2, 2);
  int initVal = 1;
  for (int sbcm = 0; sbcm < 2; sbcm++) {
    for (int block = 0; block < tmpMat[sbcm]->size(); block++) {