Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Csmobservation #4419

Merged
merged 2 commits into from
Apr 26, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note that these are not exposed via the Camera API so we have to dynamic cast to get to them.


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:
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The members below here are duplicated in the BundleObservation class. They probably need to go away.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed. Making the values protected in the parent and removing from the child classes works as a solution and I merged this, but am still potentially interested in investigating if it's possible to handle weights/corrections/apriori/adjustedsigmas at the parent level if we were to modify how these are applied to be be more generalized.

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