Commit 18db0d08 authored by Jesse Mapel's avatar Jesse Mapel
Browse files

Added pointing and position outputs back to bundleout.txt when using a single sensor.

git-svn-id: http://subversion.wr.usgs.gov/repos/prog/isis3/branches/ipce@7168 41f8697f-d340-4b68-9986-7bafba869bb8
parent 7cb5756d
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -188,6 +188,9 @@ BundleSettingsQsp bundleSettings(UserInterface &ui) {

  QList<BundleObservationSolveSettings> solveSettingsList = observationSolveSettings(ui);
  settings->setObservationSolveOptions(solveSettingsList);
  if (ui.GetBoolean("USEPVL")) {
    settings->setSCPVLFilename(FileName(ui.GetFileName("SC_PARAMETERS")).expanded());
  }
  // convergence criteria
  settings->setConvergenceCriteria(BundleSettings::Sigma0,
                                  ui.GetDouble("SIGMA0"),
+4 −0
Original line number Diff line number Diff line
@@ -204,6 +204,10 @@
    <change name="Adam Paquette" date="2016-08-31">
      Updated how jigsaw handles its prefix parameter  along with a small documentation change. Fixes #4309.
    </change>
    <change name="Jesse Mapel" date="2016-09-02">
      Updated how input parameters are output when using multiple sensor solve settings.
      Fixes #4316.
    </change>
    <change name="Ian Humphrey" date="2016-09-22">
      Output from jigsaw will again provide "Validating network" and "Validation complete" messages
      to inform user that their control network has been validated. Fixes #4313.
+24 −1
Original line number Diff line number Diff line
@@ -76,6 +76,7 @@ namespace Isis {

    // Output Options
    m_outputFilePrefix = "";
    m_SCPVLFilename = "";
  }


@@ -190,7 +191,8 @@ namespace Isis {
        m_maximumLikelihood(other.m_maximumLikelihood),
        m_solveTargetBody(other.m_solveTargetBody),
        m_bundleTargetBody(other.m_bundleTargetBody),
        m_outputFilePrefix(other.m_outputFilePrefix) {
        m_outputFilePrefix(other.m_outputFilePrefix),
        m_SCPVLFilename(other.m_SCPVLFilename){
  }


@@ -236,6 +238,7 @@ namespace Isis {
      m_bundleTargetBody = other.m_bundleTargetBody;
      m_maximumLikelihood = other.m_maximumLikelihood;
      m_outputFilePrefix = other.m_outputFilePrefix;
      m_SCPVLFilename = other.m_SCPVLFilename;
    }
    return *this;
  }
@@ -997,6 +1000,16 @@ namespace Isis {
  }


  /**
   * Set the filename of the PVL file used to generate bundle observation settings in jigsaw.
   * 
   * @param outputFilePrefix The absolute filename of the PVL file
   */
  void BundleSettings::setSCPVLFilename(QString SCParamFilename) {
    m_SCPVLFilename = SCParamFilename;
  }


  /**
   * Retrieve the output file prefix. This string will be 
   * appended to all of the output files created by the bundle 
@@ -1011,6 +1024,16 @@ namespace Isis {
  }


  /**
   * Retrieve the filename of the PVL file used to generate bundle observation settings in jigsaw.
   * 
   * @return @b QString The absolute filename of the PVL file
   */
  QString BundleSettings::SCPVLFilename() const {
    return m_SCPVLFilename;
  }


  /**
   * Create PvlObject with the given name containing the BundleSettings 
   * information. 
+8 −0
Original line number Diff line number Diff line
@@ -92,6 +92,8 @@ namespace Isis {
   *                           results. Fixes #4162.
   *   @history 2016-08-23 Jesse Mapel - Modified to no longer determine which output files
   *                           BundleAdjust and BundleSolutionInfo create.  Fixes #4279.
   *   @history 2016-09-02 Jesse Mapel - Added m_SCPVLFilename member for storing multi-sensor
   *                           settings from jigsaw.  Fixes #4316.
   *   @history 2016-10-05 Ian Humphrey - Added m_createInverseMatrix, createInverseMatrix(), and
   *                           setCreateInverseMatrix() so that bundle settings stores whether or
   *                           not the inverse correlation matrix file (inverseMatrix.dat) will be
@@ -264,7 +266,9 @@ namespace Isis {
      //================== Output Options ??? (from Jigsaw only)=============// 
      //=====================================================================// 
      void setOutputFilePrefix(QString outputFilePrefix);
      void setSCPVLFilename(QString SCParamFilename);
      QString outputFilePrefix() const;
      QString SCPVLFilename() const;

      PvlObject pvlObject(QString name = "BundleSettings") const;

@@ -392,6 +396,10 @@ namespace Isis {
      QString m_outputFilePrefix;    /**< The prefix for all output files. If the user does not want
                                          output files to be written to the current directory, the 
                                          output directory path should be included in this prefix.*/

      QString m_SCPVLFilename;       /** The filename for the PVL file used by jigsaw to
                                         generate the observation solve settings.  This should be
                                         empty unless SC_PARAMETERS was used in jigsaw.*/
 };
  // typedefs
  //! Definition for a BundleSettingsQsp, a shared pointer to a BundleSettings object.
+152 −4
Original line number Diff line number Diff line
@@ -873,8 +873,156 @@ namespace Isis {
    sprintf(buf, "\n             MAXIMUM ITERATIONS: %d",
                  m_settings->convergenceCriteriaMaximumIterations());
    fpOut << buf;

    // Single Sensor Output
    if (m_settings->numberSolveSettings() == 1) {

      //TODO Should it be checked that positionSigmas.size() == positionSolveDegree and
      //     pointingSigmas.size() == pointingSolveDegree somewhere? JAM

      BundleObservationSolveSettings globalSettings = m_settings->observationSolveSettings(0);
      int pointingSolveDegree = globalSettings.numberCameraAngleCoefficientsSolved();
      QList<double> pointingSigmas = globalSettings.aprioriPointingSigmas();
      int positionSolveDegree = globalSettings.numberCameraPositionCoefficientsSolved();
      QList<double> positionSigmas = globalSettings.aprioriPositionSigmas();

      sprintf(buf, "\n\nINPUT: CAMERA POINTING OPTIONS\n==============================\n");
      fpOut << buf;
      switch (pointingSolveDegree) {
        case 0:
          sprintf(buf,"\n                          CAMSOLVE: NONE");
          break;
        case 1:
          sprintf(buf,"\n                          CAMSOLVE: ANGLES");
          break;
        case 2:
          sprintf(buf,"\n                          CAMSOLVE: ANGLES, VELOCITIES");
          break;
        case 3:
          sprintf(buf,"\n                          CAMSOLVE: ANGLES, VELOCITIES, ACCELERATIONS");
          break;
        default:
          sprintf(buf,"\n                          CAMSOLVE: ALL POLYNOMIAL COEFFICIENTS (%d)",
                  pointingSolveDegree);
          break;
      }
      fpOut << buf;
      globalSettings.solveTwist() ?
          sprintf(buf, "\n                             TWIST: ON"):
          sprintf(buf, "\n                             TWIST: OFF");
      fpOut << buf;
      globalSettings.solvePolyOverPointing() ?
          sprintf(buf, "\n POLYNOMIAL OVER EXISTING POINTING: ON"):
          sprintf(buf, "\nPOLYNOMIAL OVER EXISTING POINTING : OFF");
      fpOut << buf;

      sprintf(buf, "\n\nINPUT: SPACECRAFT OPTIONS\n=========================\n");
      fpOut << buf;
      switch (positionSolveDegree) {
        case 0:
          sprintf(buf,"\n                        SPSOLVE: NONE");
          break;
        case 1:
          sprintf(buf,"\n                        SPSOLVE: POSITION");
          break;
        case 2:
          sprintf(buf,"\n                        SPSOLVE: POSITION, VELOCITIES");
          break;
        case 3:
          sprintf(buf,"\n                        SPSOLVE: POSITION, VELOCITIES, ACCELERATIONS");
          break;
        default:
          sprintf(buf,"\n                        CAMSOLVE: ALL POLYNOMIAL COEFFICIENTS (%d)",
                  positionSolveDegree);
          break;
      }
      fpOut << buf;
      globalSettings.solvePositionOverHermite() ?
          sprintf(buf, "\n POLYNOMIAL OVER HERMITE SPLINE: ON"):
          sprintf(buf, "\nPOLYNOMIAL OVER HERMITE SPLINE : OFF");
      fpOut << buf;

      sprintf(buf, "\n\nINPUT: GLOBAL IMAGE PARAMETER UNCERTAINTIES\n===========================================\n");
      fpOut << buf;
      (m_settings->globalLatitudeAprioriSigma() == Isis::Null) ?
          sprintf(buf,"\n               POINT LATITUDE SIGMA: N/A"):
          sprintf(buf,"\n               POINT LATITUDE SIGMA: %lf (meters)",
                  m_settings->globalLatitudeAprioriSigma());
      fpOut << buf;
      (m_settings->globalLongitudeAprioriSigma() == Isis::Null) ?
          sprintf(buf,"\n              POINT LONGITUDE SIGMA: N/A"):
          sprintf(buf,"\n              POINT LONGITUDE SIGMA: %lf (meters)",
                  m_settings->globalLongitudeAprioriSigma());
      fpOut << buf;
      (m_settings->globalRadiusAprioriSigma() == Isis::Null) ?
          sprintf(buf,"\n                 POINT RADIUS SIGMA: N/A"):
          sprintf(buf,"\n                 POINT RADIUS SIGMA: %lf (meters)",
                  m_settings->globalRadiusAprioriSigma());
      fpOut << buf;
      (positionSolveDegree < 1 || positionSigmas[0] == Isis::Null) ?
          sprintf(buf,"\n          SPACECRAFT POSITION SIGMA: N/A"):
          sprintf(buf,"\n          SPACECRAFT POSITION SIGMA: %lf (meters)",
                  positionSigmas[0]);
      fpOut << buf;

      (positionSolveDegree < 2 || positionSigmas[1] == Isis::Null) ?
          sprintf(buf,"\n          SPACECRAFT VELOCITY SIGMA: N/A"):
          sprintf(buf,"\n          SPACECRAFT VELOCITY SIGMA: %lf (m/s)",
                  positionSigmas[1]);
      fpOut << buf;

      (positionSolveDegree < 3 || positionSigmas[2] == Isis::Null) ?
          sprintf(buf,"\n      SPACECRAFT ACCELERATION SIGMA: N/A"):
          sprintf(buf,"\n      SPACECRAFT ACCELERATION SIGMA: %lf (m/s/s)",
                  positionSigmas[2]);
      fpOut << buf;

      (pointingSolveDegree < 1 || pointingSigmas[0] == Isis::Null) ?
          sprintf(buf,"\n                CAMERA ANGLES SIGMA: N/A"):
          sprintf(buf,"\n                CAMERA ANGLES SIGMA: %lf (dd)",
                  pointingSigmas[0]);
      fpOut << buf;

      (pointingSolveDegree < 2 || pointingSigmas[1] == Isis::Null) ?
          sprintf(buf,"\n      CAMERA ANGULAR VELOCITY SIGMA: N/A"):
          sprintf(buf,"\n      CAMERA ANGULAR VELOCITY SIGMA: %lf (dd/s)",
                  pointingSigmas[1]);
      fpOut << buf;

      (pointingSolveDegree < 3 || pointingSigmas[2] == Isis::Null) ?
          sprintf(buf,"\n  CAMERA ANGULAR ACCELERATION SIGMA: N/A"):
          sprintf(buf,"\n  CAMERA ANGULAR ACCELERATION SIGMA: %lf (dd/s/s)",
                  pointingSigmas[2]);
      fpOut << buf;
    }

    // Multiple Sensor Output
    else {
      sprintf(buf, "\n\nINPUT: GLOBAL IMAGE PARAMETER UNCERTAINTIES\n===========================================\n");
      fpOut << buf;
      (m_settings->globalLatitudeAprioriSigma() == Isis::Null) ?
          sprintf(buf,"\n               POINT LATITUDE SIGMA: N/A"):
          sprintf(buf,"\n               POINT LATITUDE SIGMA: %lf (meters)",
                  m_settings->globalLatitudeAprioriSigma());
      fpOut << buf;
      (m_settings->globalLongitudeAprioriSigma() == Isis::Null) ?
          sprintf(buf,"\n              POINT LONGITUDE SIGMA: N/A"):
          sprintf(buf,"\n              POINT LONGITUDE SIGMA: %lf (meters)",
                  m_settings->globalLongitudeAprioriSigma());
      fpOut << buf;
      (m_settings->globalRadiusAprioriSigma() == Isis::Null) ?
          sprintf(buf,"\n                 POINT RADIUS SIGMA: N/A"):
          sprintf(buf,"\n                 POINT RADIUS SIGMA: %lf (meters)",
                  m_settings->globalRadiusAprioriSigma());
      fpOut << buf;

      if (!m_settings->SCPVLFilename().isEmpty()) {
        sprintf(buf, "\n\nSensor apriori sigmas and solve settings from PVL file:\n");
        fpOut << buf;
        sprintf(buf, m_settings->SCPVLFilename().toLatin1().data());
        fpOut << buf;
      }
    }

    if (m_settings->solveTargetBody()) {
      sprintf(buf, "\n\nINPUT: TARGET BODY OPTIONS\n==============================\n");
Loading