Skip to content

Commit

Permalink
Remove duplicated member variables and accesor functions from BundleO…
Browse files Browse the repository at this point in the history
…bservation and add Csm camera type to Camera enum
  • Loading branch information
Kristin Berry authored and tgiroux committed Jun 8, 2021
1 parent bdc15fa commit ecaff65
Show file tree
Hide file tree
Showing 8 changed files with 11 additions and 79 deletions.
7 changes: 3 additions & 4 deletions isis/src/base/objs/CSMCamera/CSMCamera.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ find files of those names at the top level of this repository. **/
/* SPDX-License-Identifier: CC0-1.0 */

#include "CSMCamera.h"
#include "CameraGroundMap.h"
#include "CameraSkyMap.h"

#include <fstream>
Expand Down Expand Up @@ -231,7 +230,7 @@ namespace Isis {
latitude = Latitude(0.,Angle::Degrees);
}

if (!localRadius.isValid()) {
if (!localRadius.isValid()) {
target()->shape()->clearSurfacePoint();
return false;
}
Expand Down Expand Up @@ -738,8 +737,8 @@ namespace Isis {


/**
* Compute the slant distance form the sensor to the ground point at the
* currently set time.
* Compute the slant distance from the sensor to the ground
* point at the currently set time.
*
* @returns @b double The distance from the sensor to the ground point in kilometers
*/
Expand Down
2 changes: 1 addition & 1 deletion isis/src/base/objs/CSMCamera/CSMCamera.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ namespace Isis {
* @return CameraType Camera::Point
*/
virtual CameraType GetCameraType() const {
return Point;
return Csm;
}

/**
Expand Down
1 change: 1 addition & 0 deletions isis/src/base/objs/Camera/Camera.h
Original file line number Diff line number Diff line change
Expand Up @@ -361,6 +361,7 @@ namespace Isis {
Radar, //!< Radar Camera
Point, //!< Point Camera
RollingShutter, //!< RollingShutter
Csm //!< Community Sensor Model Camera
};

/**
Expand Down
1 change: 1 addition & 0 deletions isis/src/base/objs/SpiceRotation/SpiceRotation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,7 @@ namespace Isis {
return p_et;
}


/**
* Accessor method to get current time bias.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -233,17 +233,6 @@ namespace Isis {
}


/**
* Returns the number of total parameters there are for solving
*
* @return @b int Returns the number of parameters there are
*/
// FIXME: can this work at parent level or should be pure virtual?
int AbstractBundleObservation::numberParameters() {
return 0;
}


/**
* Sets the index for the observation
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ namespace Isis {


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

virtual void bundleOutputString(std::ostream &fpOut,bool errorPropagation) = 0;
Expand Down
49 changes: 4 additions & 45 deletions isis/src/control/objs/BundleUtilities/BundleObservation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@ namespace Isis {
* Constructs a BundleObservation initialized to a default state.
*/
BundleObservation::BundleObservation() {
m_weights.clear();
/* m_weights.clear();
m_corrections.clear();
m_aprioriSigmas.clear();
m_adjustedSigmas.clear();
m_adjustedSigmas.clear();*/

m_parameterNamesList.clear();
m_instrumentPosition = NULL;
Expand All @@ -53,10 +53,10 @@ namespace Isis {
*/
BundleObservation::BundleObservation(BundleImageQsp image, QString observationNumber,
QString instrumentId, BundleTargetBodyQsp bundleTargetBody) : AbstractBundleObservation(image, observationNumber, instrumentId, bundleTargetBody) {
m_weights.clear();
/* m_weights.clear();
m_corrections.clear();
m_aprioriSigmas.clear();
m_adjustedSigmas.clear();
m_adjustedSigmas.clear();*/

m_parameterNamesList.clear();
m_bundleTargetBody = bundleTargetBody;
Expand Down Expand Up @@ -102,7 +102,6 @@ namespace Isis {
* Contained BundleImages will remain until all shared pointers are deleted.
*/
BundleObservation::~BundleObservation() {
clear();
}


Expand Down Expand Up @@ -191,46 +190,6 @@ namespace Isis {
}


/**
* Accesses the solve parameter weights
*
* @return @b LinearAlgebra::Vector Returns the parameter weights for solving
*/
LinearAlgebra::Vector &BundleObservation::parameterWeights() {
return m_weights;
}


/**
* Accesses the parameter corrections
*
* @return @b LinearAlgebra::Vector Returns the parameter corrections
*/
LinearAlgebra::Vector &BundleObservation::parameterCorrections() {
return m_corrections;
}


/**
* Accesses the a priori sigmas
*
* @return @b LinearAlgebra::Vector Returns the a priori sigmas
*/
LinearAlgebra::Vector &BundleObservation::aprioriSigmas() {
return m_aprioriSigmas;
}


/**
* Accesses the adjusted sigmas
*
* @return @b LinearAlgebra::Vector Returns the adjusted sigmas
*/
LinearAlgebra::Vector &BundleObservation::adjustedSigmas() {
return m_adjustedSigmas;
}


/**
* Accesses the solve settings
*
Expand Down
17 changes: 0 additions & 17 deletions isis/src/control/objs/BundleUtilities/BundleObservation.h
Original file line number Diff line number Diff line change
Expand Up @@ -113,11 +113,6 @@ namespace Isis {
SpiceRotation *spiceRotation();
SpicePosition *spicePosition();

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

const BundleObservationSolveSettingsQsp solveSettings();

bool applyParameterCorrections(LinearAlgebra::Vector corrections);
Expand All @@ -136,24 +131,12 @@ namespace Isis {

private:
bool initParameterWeights();

private:
QStringList m_parameterNamesList; //!< List of all cube parameters.
BundleObservationSolveSettingsQsp m_solveSettings; //!< Solve settings for this observation.

SpiceRotation *m_instrumentRotation; //!< Instrument spice rotation (in primary image).
SpicePosition *m_instrumentPosition; //!< Instrument spice position (in primary image).

BundleTargetBodyQsp m_bundleTargetBody; //!< QShared pointer to BundleTargetBody.

// TODO??? change these to LinearAlgebra vectors...
LinearAlgebra::Vector m_weights; //!< Parameter weights.
//! Cumulative parameter correction vector.
LinearAlgebra::Vector m_corrections;
//! A posteriori (adjusted) parameter sigmas.
LinearAlgebra::Vector m_aprioriSigmas;
//! A posteriori (adjusted) parameter sigmas.
LinearAlgebra::Vector m_adjustedSigmas;
};

//! Typdef for BundleObservation QSharedPointer.
Expand Down

0 comments on commit ecaff65

Please sign in to comment.