Loading isis/src/base/objs/CSMCamera/CSMCamera.cpp +35 −0 Original line number Diff line number Diff line Loading @@ -774,6 +774,41 @@ namespace Isis { } /** * Get the indices of the parameters in a set. * * @param paramSet The set of indices to get * * @returns @b std::vector<int> Vector of the parameter indices */ std::vector<int> CSMCamera::getParameterIndices(csm::param::Set paramSet) const { return m_model->getParameterSetIndices(paramSet); } /** * Adjust the value of a parameter. * * @param index The index of the parameter to update * @param correction Value to add to the parameter's current value */ void CSMCamera::applyParameterCorrection(int index, double correction) { double currentValue = m_model->getParameterValue(index); m_model->setParameterValue(index, currentValue + correction); } /** * Get the covariance between two parameters. * * @param index1 The index of the first parameter * @param index2 The index of the second parameter */ double CSMCamera::getParameterCovariance(int index1, int index2) { return m_model->getParameterCovariance(index1, index2); } /** * Set the time and update the sensor position and orientation. * Loading isis/src/base/objs/CSMCamera/CSMCamera.h +4 −0 Original line number Diff line number Diff line Loading @@ -116,6 +116,10 @@ namespace Isis { virtual double RightAscension(); virtual double Declination(); std::vector<int> getParameterIndices(csm::param::Set paramSet) const; void applyParameterCorrection(int index, double correction); double getParameterCovariance(int index1, int index2); protected: void setTarget(Pvl label); Loading isis/src/control/objs/BundleUtilities/AbstractBundleObservation.h +3 −4 Original line number Diff line number Diff line Loading @@ -18,7 +18,6 @@ find files of those names at the top level of this repository. **/ #include "LinearAlgebra.h" namespace Isis { class BundleObservationSolveSettings; /** * @brief Class for bundle observations Loading Loading @@ -73,7 +72,7 @@ namespace Isis { virtual QStringList parameterList(); virtual QStringList imageNames(); private: protected: 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 Loading isis/src/control/objs/CsmBundleObservation/CsmBundleObservation.cpp 0 → 100644 +876 −0 File added.Preview size limit exceeded, changes collapsed. Show changes isis/src/control/objs/CsmBundleObservation/CsmBundleObservation.h 0 → 100644 +79 −0 Original line number Diff line number Diff line #ifndef CsmBundleObservation_h #define CsmBundleObservation_h /** This is free and unencumbered software released into the public domain. The authors of ISIS do not claim copyright on the contents of this file. For more details about the LICENSE terms and the AUTHORS, you will find files of those names at the top level of this repository. **/ /* SPDX-License-Identifier: CC0-1.0 */ #include <QStringList> #include <QVector> #include "BundleImage.h" #include "CsmBundleObservationSolveSettings.h" #include "BundleObservationSolveSettings.h" #include "BundleTargetBody.h" #include "LinearAlgebra.h" #include "AbstractBundleObservation.h" namespace Isis { /** * @brief Class for bundle observations * * This class is used for creating a bundle observation. Contained BundleImages are stored as * shared pointers, so they will be automatically deleted when all shared pointers are deleted. * * @ingroup ControlNetworks * * @author 2021-04-19 Jesse Mapel * */ class CsmBundleObservation : public AbstractBundleObservation { public: // default constructor CsmBundleObservation(); // constructor CsmBundleObservation(BundleImageQsp image, QString observationNumber, QString instrumentId, BundleTargetBodyQsp bundleTargetBody); // copy constructor CsmBundleObservation(const CsmBundleObservation &src); // destructor ~CsmBundleObservation(); // equals operator CsmBundleObservation &operator=(const CsmBundleObservation &src); // copy method void copy(const CsmBundleObservation &src); bool setSolveSettings(CsmBundleObservationSolveSettingsQsp solveSettings); int numberParameters(); const BundleObservationSolveSettingsQsp solveSettings(); bool applyParameterCorrections(LinearAlgebra::Vector corrections); void bundleOutputString(std::ostream &fpOut,bool errorPropagation); QString bundleOutputCSV(bool errorPropagation); QString formatBundleOutputString(bool errorPropagation, bool imageCSV=false); private: bool initParameterWeights(); private: CsmBundleObservationSolveSettingsQsp m_solveSettings; //!< Solve settings for this observation. std::vector<int> m_paramIndices; //!< The indices of the parameters the observation is solving for }; } #endif // CsmBundleObservation_h Loading
isis/src/base/objs/CSMCamera/CSMCamera.cpp +35 −0 Original line number Diff line number Diff line Loading @@ -774,6 +774,41 @@ namespace Isis { } /** * Get the indices of the parameters in a set. * * @param paramSet The set of indices to get * * @returns @b std::vector<int> Vector of the parameter indices */ std::vector<int> CSMCamera::getParameterIndices(csm::param::Set paramSet) const { return m_model->getParameterSetIndices(paramSet); } /** * Adjust the value of a parameter. * * @param index The index of the parameter to update * @param correction Value to add to the parameter's current value */ void CSMCamera::applyParameterCorrection(int index, double correction) { double currentValue = m_model->getParameterValue(index); m_model->setParameterValue(index, currentValue + correction); } /** * Get the covariance between two parameters. * * @param index1 The index of the first parameter * @param index2 The index of the second parameter */ double CSMCamera::getParameterCovariance(int index1, int index2) { return m_model->getParameterCovariance(index1, index2); } /** * Set the time and update the sensor position and orientation. * Loading
isis/src/base/objs/CSMCamera/CSMCamera.h +4 −0 Original line number Diff line number Diff line Loading @@ -116,6 +116,10 @@ namespace Isis { virtual double RightAscension(); virtual double Declination(); std::vector<int> getParameterIndices(csm::param::Set paramSet) const; void applyParameterCorrection(int index, double correction); double getParameterCovariance(int index1, int index2); protected: void setTarget(Pvl label); Loading
isis/src/control/objs/BundleUtilities/AbstractBundleObservation.h +3 −4 Original line number Diff line number Diff line Loading @@ -18,7 +18,6 @@ find files of those names at the top level of this repository. **/ #include "LinearAlgebra.h" namespace Isis { class BundleObservationSolveSettings; /** * @brief Class for bundle observations Loading Loading @@ -73,7 +72,7 @@ namespace Isis { virtual QStringList parameterList(); virtual QStringList imageNames(); private: protected: 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 Loading
isis/src/control/objs/CsmBundleObservation/CsmBundleObservation.cpp 0 → 100644 +876 −0 File added.Preview size limit exceeded, changes collapsed. Show changes
isis/src/control/objs/CsmBundleObservation/CsmBundleObservation.h 0 → 100644 +79 −0 Original line number Diff line number Diff line #ifndef CsmBundleObservation_h #define CsmBundleObservation_h /** This is free and unencumbered software released into the public domain. The authors of ISIS do not claim copyright on the contents of this file. For more details about the LICENSE terms and the AUTHORS, you will find files of those names at the top level of this repository. **/ /* SPDX-License-Identifier: CC0-1.0 */ #include <QStringList> #include <QVector> #include "BundleImage.h" #include "CsmBundleObservationSolveSettings.h" #include "BundleObservationSolveSettings.h" #include "BundleTargetBody.h" #include "LinearAlgebra.h" #include "AbstractBundleObservation.h" namespace Isis { /** * @brief Class for bundle observations * * This class is used for creating a bundle observation. Contained BundleImages are stored as * shared pointers, so they will be automatically deleted when all shared pointers are deleted. * * @ingroup ControlNetworks * * @author 2021-04-19 Jesse Mapel * */ class CsmBundleObservation : public AbstractBundleObservation { public: // default constructor CsmBundleObservation(); // constructor CsmBundleObservation(BundleImageQsp image, QString observationNumber, QString instrumentId, BundleTargetBodyQsp bundleTargetBody); // copy constructor CsmBundleObservation(const CsmBundleObservation &src); // destructor ~CsmBundleObservation(); // equals operator CsmBundleObservation &operator=(const CsmBundleObservation &src); // copy method void copy(const CsmBundleObservation &src); bool setSolveSettings(CsmBundleObservationSolveSettingsQsp solveSettings); int numberParameters(); const BundleObservationSolveSettingsQsp solveSettings(); bool applyParameterCorrections(LinearAlgebra::Vector corrections); void bundleOutputString(std::ostream &fpOut,bool errorPropagation); QString bundleOutputCSV(bool errorPropagation); QString formatBundleOutputString(bool errorPropagation, bool imageCSV=false); private: bool initParameterWeights(); private: CsmBundleObservationSolveSettingsQsp m_solveSettings; //!< Solve settings for this observation. std::vector<int> m_paramIndices; //!< The indices of the parameters the observation is solving for }; } #endif // CsmBundleObservation_h