Commit 69bbae7c authored by Jeannie Backer's avatar Jeannie Backer
Browse files

Fixed typos.

git-svn-id: http://subversion.wr.usgs.gov/repos/prog/isis3/branches/ipce@5931 41f8697f-d340-4b68-9986-7bafba869bb8
parent 2cdf2662
Loading
Loading
Loading
Loading
+79 −56
Original line number Diff line number Diff line
@@ -24,7 +24,7 @@ namespace Isis {
    // Spacecraft Position Options
    m_instrumentPositionSolveOption = NoPositionFactors;
    m_spkDegree = 2;
    m_spkSolveDegree = 2;// ??? default to match no position factors is -1
    m_spkSolveDegree = -1;// ??? default to match no position factors is -1
    m_solvePositionOverHermiteSpline = false;
    m_positionInterpolationType = SpicePosition::PolyFunction;
    m_positionAprioriSigma.clear();
@@ -33,7 +33,7 @@ namespace Isis {
    m_instrumentPointingSolveOption = AnglesOnly;
    m_solveTwist = true;
    m_ckDegree = 2;
    m_ckSolveDegree = 2; // ??? default to match angles only is 0
    m_ckSolveDegree = 0; // ??? default to match angles only is 0
    m_solvePointingPolynomialOverExisting = false;
    m_pointingInterpolationType = SpiceRotation::PolyFunction;
    m_numberCamAngleCoefSolved = 1;
@@ -347,9 +347,14 @@ namespace Isis {

  
  void BundleObservationSolveSettings::setInstrumentPointingSettings(
      InstrumentPointingSolveOption option, bool solveTwist, int ckDegree, int ckSolveDegree,
      bool solvePolynomialOverExisting, double anglesAprioriSigma, 
      double angularVelocityAprioriSigma, double angularAccelerationAprioriSigma) {
                                           InstrumentPointingSolveOption option, 
                                           bool solveTwist, 
                                           int ckDegree, 
                                           int ckSolveDegree,
                                           bool solvePolynomialOverExisting, 
                                           double anglesAprioriSigma, 
                                           double angularVelocityAprioriSigma, 
                                           double angularAccelerationAprioriSigma) {

    // automatically set the solve option and ck degree to the user entered values
    m_instrumentPointingSolveOption = option;
@@ -359,29 +364,18 @@ namespace Isis {
    // it matches the appropriate polynomial size. also, we will only solve for polynomial over
    // the existing if we are solving for all coefficients ??? VERIFY

  // ???  if (option == AllPointingCoefficients) {
    if (option == AllPointingCoefficients) {
      m_ckSolveDegree = ckSolveDegree;
      m_solvePointingPolynomialOverExisting = solvePolynomialOverExisting;
  // ???    }
  // ???    else {
  // ???      m_ckSolveDegree = ((int) option) - 1;
  // ???      m_solvePointingPolynomialOverExisting = false;
  // ???    }
    }
    else {
        m_ckSolveDegree = ((int) option) - 1;
    }

    // we are solving for (solve degree + 1) coefficients
    // this is the maximum number of apriori sigmas allowed
    m_numberCamAngleCoefSolved = m_ckSolveDegree + 1;


if (option != AllPointingCoefficients) {
    m_numberCamAngleCoefSolved = ((int) option);

}



    m_anglesAprioriSigma.clear();

    if (m_numberCamAngleCoefSolved > 0) {
      m_anglesAprioriSigma.append(anglesAprioriSigma);

@@ -397,6 +391,7 @@ if (option != AllPointingCoefficients) {
    m_solveTwist = solveTwist; // dependent on solve option???

    // Set the SpiceRotation interpolation type enum appropriately 
    m_solvePointingPolynomialOverExisting = solvePolynomialOverExisting;
    if (m_solvePointingPolynomialOverExisting) {
      m_pointingInterpolationType = SpiceRotation::PolyFunctionOverSpice;
    }
@@ -404,20 +399,16 @@ if (option != AllPointingCoefficients) {
      m_pointingInterpolationType = SpiceRotation::PolyFunction;
    }
  
  
  }



  BundleObservationSolveSettings::InstrumentPointingSolveOption
      BundleObservationSolveSettings::instrumentPointingSolveOption() const {
    return m_instrumentPointingSolveOption;
  }
  /**
   * TODO
   */
  SpiceRotation::Source BundleObservationSolveSettings::pointingInterpolationType() const {
    return m_pointingInterpolationType;
  }



  /**
   * TODO
@@ -427,6 +418,7 @@ if (option != AllPointingCoefficients) {
  }



  /**
   * TODO
   */
@@ -435,6 +427,7 @@ if (option != AllPointingCoefficients) {
  }



  /**
   * TODO
   */
@@ -452,12 +445,16 @@ if (option != AllPointingCoefficients) {
  }



  /**
   * TODO
   */
  bool BundleObservationSolveSettings::solvePolyOverPointing() const {
    return m_solvePointingPolynomialOverExisting;
  }



  /**
   * TODO
   */
@@ -467,6 +464,14 @@ if (option != AllPointingCoefficients) {



  /**
   * TODO
   */
  SpiceRotation::Source BundleObservationSolveSettings::pointingInterpolationType() const {
    return m_pointingInterpolationType;
  }


  // =============================================================================================//
  // ======================== Spacecraft Position Options ========================================//
  // =============================================================================================//
@@ -512,8 +517,12 @@ if (option != AllPointingCoefficients) {
   * TODO
   */
  void BundleObservationSolveSettings::setInstrumentPositionSettings(
      InstrumentPositionSolveOption option, int spkDegree, int spkSolveDegree, 
      bool positionOverHermite, double positionAprioriSigma, double velocityAprioriSigma, 
                                           InstrumentPositionSolveOption option, 
                                           int spkDegree, 
                                           int spkSolveDegree, 
                                           bool positionOverHermite, 
                                           double positionAprioriSigma, 
                                           double velocityAprioriSigma, 
                                           double accelerationAprioriSigma) {
    // automatically set the solve option and spk degree to the user entered values
    m_instrumentPositionSolveOption = option;
@@ -522,25 +531,17 @@ if (option != AllPointingCoefficients) {
    // the spk solve degree entered is only used if we are solving for all coefficients, otherwise
    // it matches the appropriate polynomial size. also, we will only solve for position over a
    // Hermite spline if we are solving for all coefficients ??? VERIFY
    // ???  if (option == AllPositionCoefficients) {
    if (option == AllPositionCoefficients) {
      m_spkSolveDegree = spkSolveDegree;
  // ???    }
  // ???    else {
  // ???      m_spkSolveDegree = ((int) option) - 1;
  // ???    }
    }
    else {
      m_spkSolveDegree = ((int) option) - 1;
    }

    // we are solving for (solve degree + 1) coefficients
    // this is the maximum number of apriori sigmas allowed
    m_numberCamPosCoefSolved = m_spkSolveDegree + 1;



    if (option != AllPositionCoefficients) {
      m_numberCamPosCoefSolved = ((int) option);
    }



    m_positionAprioriSigma.clear();
    if (m_numberCamPosCoefSolved > 0) {
      m_positionAprioriSigma.append(positionAprioriSigma);
@@ -572,12 +573,6 @@ if (option != AllPointingCoefficients) {



  SpicePosition::Source BundleObservationSolveSettings::positionInterpolationType() const {
    return m_positionInterpolationType;
  }



  int BundleObservationSolveSettings::spkDegree() const {
    return m_spkDegree;
  }
@@ -614,6 +609,10 @@ if (option != AllPointingCoefficients) {



  SpicePosition::Source BundleObservationSolveSettings::positionInterpolationType() const {
    return m_positionInterpolationType;
  }

  // =============================================================================================//
  // =============================================================================================//
  // =============================================================================================//
@@ -631,21 +630,39 @@ if (option != AllPointingCoefficients) {

    pvl += PvlKeyword("InstrumentPointingSolveOption", 
                      instrumentPointingSolveOptionToString(m_instrumentPointingSolveOption));
    pvl += PvlKeyword("SolveTwist", toString(m_solveTwist));
    pvl += PvlKeyword("CKDegree", toString(m_ckDegree));
    pvl += PvlKeyword("SolveTwist", toString(m_solveTwist));  // TODO: omit from pvl if pointing option == None ??? 
    pvl += PvlKeyword("CKDegree", toString(m_ckDegree));  // TODO: omit from pvl if pointing option == None ??? 
    if (m_instrumentPointingSolveOption != NoPointingFactors) {
      pvl += PvlKeyword("CKSolveDegree", toString(m_ckSolveDegree));
    }
    else {
      pvl += PvlKeyword("CKSolveDegree", "N/A"); // or omit from pvl ??? 
    }
    pvl += PvlKeyword("NumberAngleCoefficientsSolved", toString(m_numberCamAngleCoefSolved));
    pvl += PvlKeyword("SolvePointingPolynomialOverExisting", 
                      toString(m_solvePointingPolynomialOverExisting));
                      toString(m_solvePointingPolynomialOverExisting));  // TODO: omit from pvl if pointing option == None ??? 

    PvlKeyword angleSigmas("AngleAprioriSigmas");
    for (int i = 0; i < m_anglesAprioriSigma.size(); i++) {// m_numberCamAngleCoefSolved != m_anglesAprioriSigma.size()???
    PvlKeyword angleSigmas("AngleAprioriSigmas");  // TODO: omit from pvl if pointing option == None ??? 
    if (m_anglesAprioriSigma.size() > 0) {
      for (int i = 0; i < m_anglesAprioriSigma.size(); i++) {
        if (m_anglesAprioriSigma[i] > 0) {
          angleSigmas.addValue(toString(m_anglesAprioriSigma[i]));
        }
        else {
          angleSigmas.addValue("N/A");
        }
      }
    }
    else {
      angleSigmas.addValue("N/A"); // or omit from pvl ??? 
    }
    pvl += angleSigmas;

    pvl += PvlKeyword("InstrumentPointingInterpolationType",
                      toString((int)m_pointingInterpolationType));
                      toString((int)m_pointingInterpolationType));  // TODO: omit from pvl if pointing option == None ??? 

    // position

    pvl += PvlKeyword("InstrumentPositionSolveOption", 
                      instrumentPositionSolveOptionToString(m_instrumentPositionSolveOption));
    pvl += PvlKeyword("SPKDegree", toString(m_spkDegree));
@@ -654,9 +671,15 @@ if (option != AllPointingCoefficients) {
    pvl += PvlKeyword("SolvePositionOverHermiteSpline", toString(m_solvePositionOverHermiteSpline));

    PvlKeyword positionSigmas("PositionAprioriSigmas");
    for (int i = 0; i < m_positionAprioriSigma.size(); i++) {// m_numberCamPosCoefSolved != m_positionAprioriSigma.size()???
    for (int i = 0; i < m_positionAprioriSigma.size(); i++) {
      if (m_positionAprioriSigma[i] > 0) {
        positionSigmas.addValue(toString(m_positionAprioriSigma[i]));
      }
      else {
        angleSigmas.addValue("N/A");
      }

    }
    pvl += positionSigmas;

    pvl += PvlKeyword("InstrumentPositionInterpolationType",