Skip to content

Commit

Permalink
Get jigsaw tests passing on csmbundle branch (DOI-USGS#4413)
Browse files Browse the repository at this point in the history
* Add virtuals to AbstractBundleObservation and get compiling again

* Remove function from parent

* Get existing jigsaw tests passing

* Remove unneeded functions from BundleObservation

* Clean up a bit more

* Clean up BundleObservation and AbstractBundleObservation more

* Remove unneeded BodyRotation

* Add target body solve back into bundle adjusment calc

* Remove debug output

* Removed unneeded memeber variables BundleObservation

Co-authored-by: Kristin Berry <kberry@gyro.wr.usgs.gov>
  • Loading branch information
2 people authored and tgiroux committed Jun 9, 2021
1 parent 3b0d3d7 commit 918fabb
Show file tree
Hide file tree
Showing 7 changed files with 135 additions and 334 deletions.
9 changes: 7 additions & 2 deletions isis/src/control/objs/BundleAdjust/BundleAdjust.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -425,6 +425,7 @@ namespace Isis {
throw IException(IException::Programmer, msg, _FILEINFO_);
}

// TODO ISIS vs. CSM (addNewIsisObservation?)
AbstractBundleObservationQsp observation =
m_bundleObservations.addNew(image, observationNumber, instrumentId, m_bundleSettings);

Expand All @@ -436,9 +437,11 @@ namespace Isis {
}

// initialize exterior orientation (spice) for all BundleImages in all BundleObservations
//
// TODO!!! - should these initializations just be done when we add the new observation above?
m_bundleObservations.initializeExteriorOrientation();

// TODO
if (m_bundleSettings->solveTargetBody()) {
m_bundleObservations.initializeBodyRotation();
}
Expand Down Expand Up @@ -2164,8 +2167,10 @@ namespace Isis {
observation->applyParameterCorrections(subrange(m_imageSolution,t,t+numParameters));

if (m_bundleSettings->solveTargetBody()) {
// TODO: needs to be updated for ISIS vs. CSM CSM has no updateBodyRotation
// observation->updateBodyRotation();
// TODO: needs to be updated for ISIS vs. CSM CSM has no updateBodyRotation]
// TODO: this is no good.
QSharedPointer<BundleObservation> isisObservation = qSharedPointerDynamicCast<BundleObservation>(observation);
isisObservation->updateBodyRotation();
}

t += numParameters;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,7 @@ namespace Isis {
* settings for this AbstractBundleObservation
*/
const BundleObservationSolveSettingsQsp AbstractBundleObservation::solveSettings() {
// NEEDED for BundleMeasure
return m_solveSettings;
}

Expand Down
19 changes: 9 additions & 10 deletions isis/src/control/objs/BundleUtilities/AbstractBundleObservation.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,15 +55,16 @@ namespace Isis {

QString instrumentId();

LinearAlgebra::Vector &parameterWeights();
LinearAlgebra::Vector &parameterCorrections();
LinearAlgebra::Vector &aprioriSigmas();
LinearAlgebra::Vector &adjustedSigmas();
virtual LinearAlgebra::Vector &parameterWeights();
virtual LinearAlgebra::Vector &parameterCorrections();
virtual LinearAlgebra::Vector &aprioriSigmas();
virtual LinearAlgebra::Vector &adjustedSigmas();

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

// TODO: remove later
virtual const BundleObservationSolveSettingsQsp solveSettings();
virtual int numberParameters();
virtual bool applyParameterCorrections(LinearAlgebra::Vector corrections);

virtual void bundleOutputString(std::ostream &fpOut,bool errorPropagation);
virtual QString bundleOutputCSV(bool errorPropagation);
Expand All @@ -87,17 +88,15 @@ namespace Isis {
QStringList m_imageNames; //!< List of all cube names.
QString m_instrumentId; //!< Spacecraft instrument id.

BundleObservationSolveSettingsQsp m_solveSettings; //!< Solve settings for this observation.

// TODO??? change these to LinearAlgebra vectors...
LinearAlgebra::Vector m_weights; //!< Parameter weights.
//! Cumulative parameter correction vector.
LinearAlgebra::Vector m_corrections;
//LinearAlgebra::Vector m_solution; //!< parameter solution vector.
//! A posteriori (adjusted) parameter sigmas.
LinearAlgebra::Vector m_aprioriSigmas;
//! A posteriori (adjusted) parameter sigmas.
LinearAlgebra::Vector m_adjustedSigmas;
BundleObservationSolveSettingsQsp m_solveSettings; //!< Solve settings for this observation.
};

//! Typdef for AbstractBundleObservation QSharedPointer.
Expand Down
Loading

0 comments on commit 918fabb

Please sign in to comment.