Skip to content

Commit

Permalink
Csmobservation (DOI-USGS#4419)
Browse files Browse the repository at this point in the history
* Now compiling

* Updated CSMCamera tests and docs
  • Loading branch information
jessemapel authored and tgiroux committed Jun 8, 2021
1 parent d3d35fd commit bdc15fa
Show file tree
Hide file tree
Showing 8 changed files with 1,112 additions and 4 deletions.
35 changes: 35 additions & 0 deletions isis/src/base/objs/CSMCamera/CSMCamera.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*
Expand Down
4 changes: 4 additions & 0 deletions isis/src/base/objs/CSMCamera/CSMCamera.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -43,7 +42,7 @@ namespace Isis {
virtual AbstractBundleObservation &operator=(const AbstractBundleObservation &src);

// copy method
// not implementedn in BundleObservation either???
// not implementedn in BundleObservation either???
// virtual void copy(const AbstractBundleObservation &src);

virtual void append(const BundleImageQsp &value);
Expand All @@ -61,7 +60,7 @@ namespace Isis {
virtual LinearAlgebra::Vector &adjustedSigmas();


virtual const BundleObservationSolveSettingsQsp solveSettings() = 0;
virtual const BundleObservationSolveSettingsQsp solveSettings() = 0;
virtual int numberParameters();
virtual bool applyParameterCorrections(LinearAlgebra::Vector corrections);

Expand All @@ -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
Expand Down
Loading

0 comments on commit bdc15fa

Please sign in to comment.