Isis Developer Reference
IsisBundleObservation.h
Go to the documentation of this file.
1 #ifndef IsisBundleObservation_h
2 #define IsisBundleObservation_h
3 
10 /* SPDX-License-Identifier: CC0-1.0 */
11 
12 #include <QStringList>
13 #include <QVector>
14 
15 #include "BundleImage.h"
17 #include "BundleSettings.h"
18 #include "BundleTargetBody.h"
19 #include "LinearAlgebra.h"
20 #include "BundleObservation.h"
21 #include "BundleMeasure.h"
22 #include "SurfacePoint.h"
23 
24 namespace Isis {
26  class SpicePosition;
27  class SpiceRotation;
28 
35 
36  public:
37  // default constructor
39 
40  // constructor
41  IsisBundleObservation(BundleImageQsp image, QString observationNumber, QString instrumentId,
42  BundleTargetBodyQsp bundleTargetBody);
43 
44  // copy constructor
46 
47  // destructor
49 
50  // equals operator
52 
53  // copy method
54  void copy(const IsisBundleObservation &src);
55 
57 
60  int numberParameters();
61 
64 
66 
70  void updateBodyRotation();
71 
72  void bundleOutputFetchData(QVector<double> &finalParameterValues,
73  int &nPositionCoefficients, int &nPointingCoefficients,
74  bool &useDefaultPosition, bool &useDefaultPointing,
75  bool &useDefaultTwist);
76  void bundleOutputString(std::ostream &fpOut,bool errorPropagation);
77  QString bundleOutputCSV(bool errorPropagation);
78 
79  virtual QStringList parameterList();
80 
81  bool computeTargetPartials(LinearAlgebra::Matrix &coeffTarget, BundleMeasure &measure, BundleSettingsQsp &bundleSettings, BundleTargetBodyQsp &bundleTargetBody);
82  bool computeImagePartials(LinearAlgebra::Matrix &coeffImage, BundleMeasure &measure);
84  bool computeRHSPartials(LinearAlgebra::Vector &coeffRHS, BundleMeasure &measure);
85  double computeObservationValue(BundleMeasure &measure, double deltaVal);
86 
87  private:
88  bool initParameterWeights();
89  BundleObservationSolveSettingsQsp m_solveSettings;
90 
91  SpiceRotation *m_instrumentRotation;
92  SpicePosition *m_instrumentPosition;
93 
94  BundleTargetBodyQsp m_bundleTargetBody;
95  };
96 
99 }
100 
101 #endif // IsisBundleObservation_h
Isis::SpiceRotation::GetBaseTime
double GetBaseTime()
Accessor method to get the rotation base time.
Definition: SpiceRotation.cpp:2423
Isis::CameraGroundMap::GetdXYdPoint
virtual bool GetdXYdPoint(std::vector< double > d_pB, double *dx, double *dy)
Compute derivative of focal plane coordinate w/r to ground point using current state.
Definition: CameraGroundMap.cpp:398
Isis::IsisBundleObservation::updateBodyRotation
void updateBodyRotation()
Updates the body rotation.
Definition: IsisBundleObservation.cpp:288
BundleObservationSolveSettings.h
Isis::SpicePosition::GetPolynomial
void GetPolynomial(std::vector< double > &XC, std::vector< double > &YC, std::vector< double > &ZC)
Return the coefficients of a polynomial fit to each of the three coordinates of the position for the ...
Definition: SpicePosition.cpp:1103
Isis::BundleObservationSolveSettings::instrumentPositionSolveOptionToString
static QString instrumentPositionSolveOptionToString(InstrumentPositionSolveOption option)
Translates an enumerated InstrumentPositionSolveOption to its string representation.
Definition: BundleObservationSolveSettings.cpp:1025
BundleImage.h
Isis::SpicePosition
Obtain SPICE position information for a body.
Definition: SpicePosition.h:173
Isis::CameraGroundMap::EllipsoidPartial
std::vector< double > EllipsoidPartial(SurfacePoint spoint, PartialType raxis)
Compute derivative of focal plane coordinate w/r to one of the ellipsoidal radii (a,...
Definition: CameraGroundMap.cpp:436
Isis::BundleMeasure::cubeSerialNumber
QString cubeSerialNumber() const
Accesses the serial number of the cube containing this control measure.
Definition: BundleMeasure.cpp:251
Isis::BundleControlPoint::adjustedSurfacePoint
SurfacePoint adjustedSurfacePoint() const
Accesses the adjusted SurfacePoint associated with this BundleControlPoint.
Definition: BundleControlPoint.cpp:479
Isis::IsisBundleObservation::computeObservationValue
double computeObservationValue(BundleMeasure &measure, double deltaVal)
Converts the observed value from a focal plane coordinate to an image sample or line.
Definition: IsisBundleObservation.cpp:1370
Isis::BundleObservationSolveSettings::NoPositionFactors
@ NoPositionFactors
Solve for none of the position factors.
Definition: BundleObservationSolveSettings.h:161
Isis::CameraGroundMap::GetXY
virtual bool GetXY(const SurfacePoint &spoint, double *cudx, double *cudy, bool test=true)
Compute undistorted focal plane coordinate from ground position using current Spice from SetImage cal...
Definition: CameraGroundMap.cpp:152
Isis::IsisBundleObservation::numberPointingParameters
int numberPointingParameters()
Returns the number of pointing parameters being solved for.
Definition: IsisBundleObservation.cpp:530
QList< double >
Isis::IsisBundleObservation::setSolveSettings
virtual bool setSolveSettings(BundleObservationSolveSettings solveSettings)
Set solve parameters.
Definition: IsisBundleObservation.cpp:122
Isis::IsisBundleObservation::computeRHSPartials
bool computeRHSPartials(LinearAlgebra::Vector &coeffRHS, BundleMeasure &measure)
Calculates the sample, line residuals between the measured focal plane values and the focal plane coo...
Definition: IsisBundleObservation.cpp:1324
Isis::BundleObservation::operator=
virtual BundleObservation & operator=(const BundleObservation &src)
Assignment operator.
Definition: BundleObservation.cpp:112
Isis::CameraGroundMap::GetdXYdOrientation
virtual bool GetdXYdOrientation(const SpiceRotation::PartialType varType, int coefIndex, double *cudx, double *cudy)
Compute derivative of focal plane coordinate w/r to instrument using current state from SetImage call...
Definition: CameraGroundMap.cpp:318
Isis::SpicePosition::SetPolynomial
void SetPolynomial(const Source type=PolyFunction)
Set the coefficients of a polynomial fit to each of the components (X, Y, Z) of the position vector f...
Definition: SpicePosition.cpp:930
Isis::IsisBundleObservation::spicePosition
SpicePosition * spicePosition()
Accesses the instrument's spice position.
Definition: IsisBundleObservation.cpp:169
Isis::SpiceRotation::SetPolynomialDegree
void SetPolynomialDegree(int degree)
Set the degree of the polynomials to be fit to the three camera angles for the time period covered by...
Definition: SpiceRotation.cpp:2343
Isis::DEG2RAD
const double DEG2RAD
Multiplier for converting from degrees to radians.
Definition: Constants.h:43
Isis::SpicePosition::GetBaseTime
double GetBaseTime()
Return the base time for the position.
Definition: SpicePosition.h:271
Isis::IException::Unknown
@ Unknown
A type of error that cannot be classified as any of the other error types.
Definition: IException.h:118
SpicePosition.h
Isis::SpicePosition::WRT_X
@ WRT_X
Definition: SpicePosition.h:201
Isis::IsisBundleObservation::numberPositionParameters
int numberPositionParameters()
Returns the number of position parameters there are.
Definition: IsisBundleObservation.cpp:520
Isis::BundleMeasure::focalPlaneMeasuredY
double focalPlaneMeasuredY() const
Accesses the measured focal plane y value for this control measure //TODO verify?
Definition: BundleMeasure.cpp:299
Isis::SpiceRotation::GetCenterAngles
std::vector< double > GetCenterAngles()
Return the camera angles at the center time of the observation.
Definition: SpiceRotation.cpp:1290
Isis::IsisBundleObservation::initializeExteriorOrientation
bool initializeExteriorOrientation()
Initializes the exterior orientation.
Definition: IsisBundleObservation.cpp:190
Isis::IsisBundleObservation::IsisBundleObservation
IsisBundleObservation()
Constructs a IsisBundleObservation initialized to a default state.
Definition: IsisBundleObservation.cpp:34
BundleSettings.h
Isis::SpiceRotation::SetPolynomial
void SetPolynomial(const Source type=PolyFunction)
Set the coefficients of a polynomial fit to each of the three camera angles for the time period cover...
Definition: SpiceRotation.cpp:1739
Isis::BundleMeasure::camera
Camera * camera() const
Accesses the associated camera for this bundle measure.
Definition: BundleMeasure.cpp:128
Isis::SurfacePoint::Two
@ Two
Definition: SurfacePoint.h:151
Isis::IsisBundleObservation::bundleOutputCSV
QString bundleOutputCSV(bool errorPropagation)
Creates and returns a formatted QString representing the bundle coefficients and parameters in csv fo...
Definition: IsisBundleObservation.cpp:965
Isis::CameraGroundMap::WRT_MajorAxis
@ WRT_MajorAxis
Definition: CameraGroundMap.h:91
Isis::BundleControlPoint
This class holds information about a control point that BundleAdjust needs to run correctly.
Definition: BundleControlPoint.h:91
Isis::SurfacePoint::Three
@ Three
Definition: SurfacePoint.h:152
BundleTargetBody.h
QSharedPointer
Definition: JigsawWorkOrder.h:28
Isis::CameraGroundMap::GetdXYdPosition
virtual bool GetdXYdPosition(const SpicePosition::PartialType varType, int coefIndex, double *cudx, double *cudy)
Compute derivative w/r to position of focal plane coordinate from ground position using current Spice...
Definition: CameraGroundMap.cpp:279
Isis::Camera
Definition: Camera.h:236
Isis::LinearAlgebra::Matrix
boost::numeric::ublas::matrix< double > Matrix
Definition for an Isis::LinearAlgebra::Matrix of doubles.
Definition: LinearAlgebra.h:100
Isis::IsisBundleObservation::applyParameterCorrections
bool applyParameterCorrections(LinearAlgebra::Vector corrections)
Applies the parameter corrections.
Definition: IsisBundleObservation.cpp:405
QStringList
Isis::BundleObservation::m_weights
LinearAlgebra::Vector m_weights
Parameter weights. Cumulative parameter correction vector.
Definition: BundleObservation.h:102
Isis::BundleControlPoint::id
QString id() const
Accesses the Point ID associated with this BundleControlPoint.
Definition: BundleControlPoint.cpp:489
Isis::toString
QString toString(bool boolToConvert)
Global function to convert a boolean to a string.
Definition: IString.cpp:211
Isis::IsisBundleObservation::copy
void copy(const IsisBundleObservation &src)
Isis::IsisBundleObservation::computePoint3DPartials
bool computePoint3DPartials(LinearAlgebra::Matrix &coeffPoint3D, BundleMeasure &measure, SurfacePoint::CoordinateType coordType)
Calculates the ground partials for the ground point currently set in the sensor model.
Definition: IsisBundleObservation.cpp:1281
Isis::IsSpecial
bool IsSpecial(const double d)
Returns if the input pixel is special.
Definition: SpecialPixel.h:197
SpiceRotation.h
Isis::BundleObservationSolveSettingsQsp
QSharedPointer< BundleObservationSolveSettings > BundleObservationSolveSettingsQsp
Definition for BundleObservationSolveSettingsQsp, a QSharedPointer to a BundleObservationSolveSetting...
Definition: BundleObservationSolveSettings.h:293
Isis::SpicePosition::GetCenterCoordinate
const std::vector< double > & GetCenterCoordinate()
Compute and return the coordinate at the center time.
Definition: SpicePosition.cpp:1586
Isis::BundleObservation::index
int index()
Accesses the observation's index.
Definition: BundleObservation.cpp:227
Isis::BundleObservationSolveSettings::instrumentPointingSolveOptionToString
static QString instrumentPointingSolveOptionToString(InstrumentPointingSolveOption option)
Tranlsates an enumerated InstrumentPointingSolveOption value to its string representation.
Definition: BundleObservationSolveSettings.cpp:765
Isis::BundleObservation::m_aprioriSigmas
LinearAlgebra::Vector m_aprioriSigmas
A posteriori (adjusted) parameter sigmas.
Definition: BundleObservation.h:106
BundleObservation.h
Isis::LinearAlgebra::Vector
boost::numeric::ublas::vector< double > Vector
Definition for an Isis::LinearAlgebra::Vector of doubles.
Definition: LinearAlgebra.h:120
_FILEINFO_
#define _FILEINFO_
Macro for the filename and line number.
Definition: IException.h:24
Isis::SurfacePoint::CoordinateType
CoordinateType
Defines the coordinate typ, units, and coordinate index for some of the output methods.
Definition: SurfacePoint.h:139
Isis::BundleObservationSolveSettings::InstrumentPointingSolveOption
InstrumentPointingSolveOption
Options for how to solve for instrument pointing.
Definition: BundleObservationSolveSettings.h:126
Isis::IsisBundleObservation::numberParameters
int numberParameters()
Returns the number of total parameters there are for solving.
Definition: IsisBundleObservation.cpp:548
CameraGroundMap.h
IsisBundleObservation.h
Isis::BundleObservation::m_corrections
LinearAlgebra::Vector m_corrections
Definition: BundleObservation.h:104
SurfacePoint.h
Isis::IsisBundleObservation::bundleOutputString
void bundleOutputString(std::ostream &fpOut, bool errorPropagation)
Takes in an open std::ofstream and writes out information which goes into the bundleout....
Definition: IsisBundleObservation.cpp:744
Isis::BundleMeasure::parentControlPoint
BundleControlPoint * parentControlPoint()
Accesses the parent BundleControlPoint for this bundle measure.
Definition: BundleMeasure.cpp:138
Isis::SurfacePoint::One
@ One
Definition: SurfacePoint.h:150
Isis::IsisBundleObservation::initializeBodyRotation
void initializeBodyRotation()
Intializes the body rotation.
Definition: IsisBundleObservation.cpp:273
Isis::SpiceRotation::WRT_Declination
@ WRT_Declination
With respect to Declination.
Definition: SpiceRotation.h:260
BundleControlPoint.h
Isis::BundleObservationSolveSettings::NoPointingFactors
@ NoPointingFactors
Solve for none of the pointing factors.
Definition: BundleObservationSolveSettings.h:127
Isis::SpiceRotation::WRT_Twist
@ WRT_Twist
With respect to Twist or Prime Meridian Rotation.
Definition: SpiceRotation.h:261
Isis::IsisBundleObservationQsp
QSharedPointer< IsisBundleObservation > IsisBundleObservationQsp
Typdef for IsisBundleObservation QSharedPointer.
Definition: IsisBundleObservation.h:98
Isis::IsisBundleObservation::spiceRotation
SpiceRotation * spiceRotation()
Accesses the instrument's spice rotation.
Definition: IsisBundleObservation.cpp:159
Isis::IsisBundleObservation::solveSettings
const BundleObservationSolveSettingsQsp solveSettings()
Accesses the solve settings.
Definition: IsisBundleObservation.cpp:180
Isis::BundleMeasure
A container class for a ControlMeasure.
Definition: BundleMeasure.h:55
Isis::CameraGroundMap::GetdXYdTOrientation
virtual bool GetdXYdTOrientation(const SpiceRotation::PartialType varType, int coefIndex, double *cudx, double *cudy)
Compute derivative of focal plane coordinate w/r to target body using current state.
Definition: CameraGroundMap.cpp:354
Isis::IException
Isis exception class.
Definition: IException.h:91
Isis::SurfacePoint::Partial
std::vector< double > Partial(CoordinateType type, CoordIndex index)
Compute partial derivative of conversion from body-fixed coordinates to the specified.
Definition: SurfacePoint.cpp:773
Isis::IsisBundleObservation::computeImagePartials
bool computeImagePartials(LinearAlgebra::Matrix &coeffImage, BundleMeasure &measure)
Calculates the sensor partials with respect to the selected solve parameters and populates the coeffI...
Definition: IsisBundleObservation.cpp:1184
Camera.h
Isis::Null
const double Null
Value for an Isis Null pixel.
Definition: SpecialPixel.h:95
Isis::IsisBundleObservation::~IsisBundleObservation
~IsisBundleObservation()
Destructor.
Definition: IsisBundleObservation.cpp:90
Isis::SpiceRotation::SetOverrideBaseTime
void SetOverrideBaseTime(double baseTime, double timeScale)
Set an override base time to be used with observations on scanners to allow all images in an observat...
Definition: SpiceRotation.cpp:2110
Isis::IsisBundleObservation::bundleOutputFetchData
void bundleOutputFetchData(QVector< double > &finalParameterValues, int &nPositionCoefficients, int &nPointingCoefficients, bool &useDefaultPosition, bool &useDefaultPointing, bool &useDefaultTwist)
Fetches data for the log file output methods.
Definition: IsisBundleObservation.cpp:646
std
Namespace for the standard library.
Isis::Camera::GroundMap
CameraGroundMap * GroundMap()
Returns a pointer to the CameraGroundMap object.
Definition: Camera.cpp:2856
Isis::Camera::PixelPitch
double PixelPitch() const
Returns the pixel pitch.
Definition: Camera.cpp:2742
LinearAlgebra.h
Isis::SpiceRotation::GetPolynomial
void GetPolynomial(std::vector< double > &abcAng1, std::vector< double > &abcAng2, std::vector< double > &abcAng3)
Return the coefficients of a polynomial fit to each of the three camera angles for the time period co...
Definition: SpiceRotation.cpp:2051
Isis::CameraGroundMap::WRT_PolarAxis
@ WRT_PolarAxis
Definition: CameraGroundMap.h:93
Isis::SpicePosition::SetOverrideBaseTime
void SetOverrideBaseTime(double baseTime, double timeScale)
Set an override base time to be used with observations on scanners to allow all images in an observat...
Definition: SpicePosition.cpp:1147
Isis::BundleObservation::m_adjustedSigmas
LinearAlgebra::Vector m_adjustedSigmas
A posteriori (adjusted) parameter sigmas.
Definition: BundleObservation.h:108
Isis::IsisBundleObservation::parameterList
virtual QStringList parameterList()
Returns the list of observation parameter names.
Definition: IsisBundleObservation.cpp:562
Isis::SpiceRotation::WRT_RightAscension
@ WRT_RightAscension
With respect to Right Ascension.
Definition: SpiceRotation.h:259
Isis::IsisBundleObservation
Class for observations that use ISIS camera models in bundle adjustment.
Definition: IsisBundleObservation.h:34
Isis::SpiceRotation::GetTimeScale
double GetTimeScale()
Accessor method to get the rotation time scale.
Definition: SpiceRotation.cpp:2433
Isis::SpicePosition::WRT_Z
@ WRT_Z
Definition: SpicePosition.h:201
Isis::BundleObservationSolveSettings
This class is used to modify and manage solve settings for 1 to many BundleObservations.
Definition: BundleObservationSolveSettings.h:82
Isis::SpicePosition::WRT_Y
@ WRT_Y
Definition: SpicePosition.h:201
QVector< double >
Isis::CameraGroundMap::WRT_MinorAxis
@ WRT_MinorAxis
Definition: CameraGroundMap.h:92
Isis::BundleObservationSolveSettings::InstrumentPositionSolveOption
InstrumentPositionSolveOption
Options for how to solve for instrument position.
Definition: BundleObservationSolveSettings.h:160
Isis::RAD2DEG
const double RAD2DEG
Multiplier for converting from radians to degrees.
Definition: Constants.h:44
Isis::SpicePosition::GetTimeScale
double GetTimeScale()
Return the time scale for the position.
Definition: SpicePosition.h:278
Isis::CameraGroundMap::MeanRadiusPartial
std::vector< double > MeanRadiusPartial(SurfacePoint spoint, Distance meanRadius)
Compute derivative of focal plane coordinate w/r to mean of the ellipsoidal radii (a,...
Definition: CameraGroundMap.cpp:486
Isis::SurfacePoint
This class defines a body-fixed surface point.
Definition: SurfacePoint.h:132
Isis
This is free and unencumbered software released into the public domain.
Definition: Apollo.h:16
Isis::BundleMeasure::focalPlaneMeasuredX
double focalPlaneMeasuredX() const
Accesses the measured focal plane x value for this control measure //TODO verify?
Definition: BundleMeasure.cpp:287
Isis::IsisBundleObservation::computeTargetPartials
bool computeTargetPartials(LinearAlgebra::Matrix &coeffTarget, BundleMeasure &measure, BundleSettingsQsp &bundleSettings, BundleTargetBodyQsp &bundleTargetBody)
Computes any needed partials for the target body parameters.
Definition: IsisBundleObservation.cpp:1073
Isis::IException::User
@ User
A type of error that could only have occurred due to a mistake on the user's part (e....
Definition: IException.h:126
Isis::BundleObservation::instrumentId
QString instrumentId()
Accesses the instrument id.
Definition: BundleObservation.cpp:167
BundleMeasure.h
Isis::BundleObservation
Abstract base class for an observation in bundle adjustment.
Definition: BundleObservation.h:35
Isis::SpiceRotation
Obtain SPICE rotation information for a body.
Definition: SpiceRotation.h:209
Isis::IsisBundleObservation::operator=
IsisBundleObservation & operator=(const IsisBundleObservation &src)
Assignment operator.
Definition: IsisBundleObservation.cpp:103
Isis::SpicePosition::SetPolynomialDegree
void SetPolynomialDegree(int degree)
Set the polynomial degree.
Definition: SpicePosition.cpp:1502