Isis Developer Reference
BundleTargetBody.h
Go to the documentation of this file.
1 #ifndef BundleTargetBody_h
2 #define BundleTargetBody_h
3 
10 /* SPDX-License-Identifier: CC0-1.0 */
11 
12 #include <set>
13 
14 #include <QSharedPointer>
15 #include <QStringList>
16 
17 #include <boost/numeric/ublas/vector.hpp>
18 
19 #include "Angle.h"
20 #include "Distance.h"
21 #include "Latitude.h"
22 #include "LinearAlgebra.h"
23 #include "Longitude.h"
24 
25 namespace Isis {
26 
27  class BundleSettings;
28  class PvlObject;
29  class Target;
30 
53 
54  public:
55  // constructors
56  BundleTargetBody(); // default
57  BundleTargetBody(Target *target);
58  BundleTargetBody(const BundleTargetBody &src); // copy
59  virtual ~BundleTargetBody();
60 
62 
65  None = 0,
66  Mean = 1,
67  All = 2
68  };
69 
74  PoleDec = 3,
77  PM = 6,
83  MeanRadius = 12
84  };
85 
86  void setSolveSettings(std::set<int> targetParameterSolveCodes,
87  Angle aprioriPoleRA, Angle sigmaPoleRA, Angle aprioriVelocityPoleRA,
88  Angle sigmaVelocityPoleRA, Angle aprioriPoleDec, Angle sigmaPoleDec,
89  Angle aprioriVelocityPoleDec, Angle sigmaVelocityPoleDec,
90  Angle aprioriPM, Angle sigmaPM, Angle aprioriVelocityPM,
91  Angle sigmaVelocityPM, TargetRadiiSolveMethod solveRadiiMethod,
92  Distance aprioriRadiusA, Distance sigmaRadiusA, Distance aprioriRadiusB,
93  Distance sigmaRadiusB, Distance aprioriRadiusC, Distance sigmaRadiusC,
94  Distance aprioriMeanRadius, Distance sigmaMeanRadius);
95 
97  static QString targetRadiiOptionToString(TargetRadiiSolveMethod targetRadiiSolveMethod);
98 
99  bool readFromPvl(PvlObject &tbPvlObject);
100 
101  // mutators
102  //
103 
104  // accessors
110 
111  std::vector<Angle> poleRaCoefs();
112  std::vector<Angle> poleDecCoefs();
113  std::vector<Angle> pmCoefs();
114 
115  std::vector<Distance> radii();
117 
118  // string format methods
119  QString formatBundleOutputString(bool errorPropagation);
121  // TODO implement
122  QString formatValue(double value, int fieldWidth, int precision) const;
123  QString formatAprioriSigmaString(int type, int fieldWidth, int precision) const;
124  QString formatPolePositionAprioriSigmaString(int fieldWidth, int precision) const;
125  QString formatW0AprioriSigmaString(int fieldWidth, int precision) const;
126  QString formatWDotAprioriSigmaString(int fieldWidth, int precision) const;
127  QString formatRadiusAprioriSigmaString(int fieldWidth, int precision) const;
128  QString formatPolePositionAdjustedSigmaString(int fieldWidth, int precision) const;
129  QString formatW0AdjustedSigmaString(int fieldWidth, int precision) const;
130  QString formatWDotAdjustedSigmaString(int fieldWidth, int precision) const;
131  QString formatRadiusAdjustedSigmaString(int fieldWidth, int precision) const;
132 
133  virtual bool solvePoleRA();
134  virtual bool solvePoleRAVelocity();
135  virtual bool solvePoleRAAcceleration();
136  virtual bool solvePoleDec();
137  virtual bool solvePoleDecVelocity();
138  virtual bool solvePoleDecAcceleration();
139  virtual bool solvePM();
140  virtual bool solvePMVelocity();
141  virtual bool solvePMAcceleration();
142  virtual bool solveTriaxialRadii();
143  virtual bool solveMeanRadius();
144 
145 // int numberPoleParameters();
146 // int numberW0Parameters();
147 // int numberWDotParameters();
149  virtual int numberParameters();
150 
152 
153  double vtpv();
154 
155  Distance localRadius(const Latitude &lat, const Longitude &lon);
156 
157  private:
158  TargetRadiiSolveMethod m_solveTargetBodyRadiusMethod;
159  Distance m_aprioriRadiusA;
160  Distance m_sigmaRadiusA;
161  Distance m_aprioriRadiusB;
162  Distance m_sigmaRadiusB;
163  Distance m_aprioriRadiusC;
164  Distance m_sigmaRadiusC;
165  Distance m_aprioriMeanRadius;
166  Distance m_sigmaMeanRadius;
167 
168  std::vector<Distance> m_radii;
169  Distance m_meanRadius;
170 
171  std::vector<Angle> m_raPole;
172  std::vector<Angle> m_decPole;
173  std::vector<Angle> m_pm ;
174 
175  std::set<int> m_parameterSolveCodes;
177  QStringList m_parameterNamesList;
178 
179  LinearAlgebra::Vector m_weights;
180  LinearAlgebra::Vector m_corrections;
181  LinearAlgebra::Vector m_solution;
182  LinearAlgebra::Vector m_aprioriSigmas;
183  LinearAlgebra::Vector m_adjustedSigmas;
184  };
185 
188 }
189 
190 #endif // BundleTargetBody_h
Isis::Distance::kilometers
double kilometers() const
Get the distance in kilometers.
Definition: Distance.cpp:106
Isis::BundleTargetBody::TriaxialRadiusC
@ TriaxialRadiusC
Definition: BundleTargetBody.h:82
Isis::BundleTargetBody::parameterCorrections
LinearAlgebra::Vector & parameterCorrections()
Returns the vector of corrections applied to the parameters.
Definition: BundleTargetBody.cpp:743
Isis::Angle::Degrees
@ Degrees
Degrees are generally considered more human readable, 0-360 is one circle, however most math does not...
Definition: Angle.h:56
Isis::BundleTargetBody::TriaxialRadiusA
@ TriaxialRadiusA
Definition: BundleTargetBody.h:80
Isis::BundleTargetBody::PoleDec
@ PoleDec
Definition: BundleTargetBody.h:74
Isis::PvlObject::endGroup
PvlGroupIterator endGroup()
Returns the ending group index.
Definition: PvlObject.h:109
Isis::Target::poleDecCoefs
std::vector< Angle > poleDecCoefs()
Definition: Target.cpp:547
Isis::BundleTargetBody::formatBundleOutputString
QString formatBundleOutputString(bool errorPropagation)
Formats and returns the parameter values as a QString.
Definition: BundleTargetBody.cpp:966
Isis::PvlObject::PvlGroupIterator
QList< Isis::PvlGroup >::iterator PvlGroupIterator
The counter for groups.
Definition: PvlObject.h:83
Isis::BundleTargetBody::localRadius
Distance localRadius(const Latitude &lat, const Longitude &lon)
Gets the local radius for the given latitude/longitude coordinate.
Definition: BundleTargetBody.cpp:1690
Isis::PvlObject
Contains Pvl Groups and Pvl Objects.
Definition: PvlObject.h:61
Isis::BundleTargetBody::formatWDotAdjustedSigmaString
QString formatWDotAdjustedSigmaString(int fieldWidth, int precision) const
Isis::Latitude
This class is designed to encapsulate the concept of a Latitude.
Definition: Latitude.h:51
Isis::BundleTargetBody::AccelerationPoleRA
@ AccelerationPoleRA
Definition: BundleTargetBody.h:73
Isis::BundleTargetBody::solvePoleDec
virtual bool solvePoleDec()
If the pole declination angle will be solved for with this target body.
Definition: BundleTargetBody.cpp:471
Isis::BundleTargetBody::radii
std::vector< Distance > radii()
Returns the radius values.
Definition: BundleTargetBody.cpp:906
Isis::BundleTargetBody::numberRadiusParameters
int numberRadiusParameters()
Returns the number of radius parameters being solved for.
Definition: BundleTargetBody.cpp:823
Isis::BundleTargetBody::poleDecCoefs
std::vector< Angle > poleDecCoefs()
Returns the coefficients of the declination polynomial.
Definition: BundleTargetBody.cpp:873
Isis::BundleTargetBody::None
@ None
Solve for none.
Definition: BundleTargetBody.h:65
Isis::IException::Unknown
@ Unknown
A type of error that cannot be classified as any of the other error types.
Definition: IException.h:118
PvlGroup.h
Isis::BundleTargetBody::adjustedSigmas
LinearAlgebra::Vector & adjustedSigmas()
Returns the vector of adjusted parameters sigmas.
Definition: BundleTargetBody.cpp:782
Target.h
Isis::BundleTargetBody::aprioriSigmas
LinearAlgebra::Vector & aprioriSigmas()
Returns the vector of apriori parameters sigmas.
Definition: BundleTargetBody.cpp:769
Isis::BundleTargetBody::stringToTargetRadiiOption
static TargetRadiiSolveMethod stringToTargetRadiiOption(QString option)
Converts a QString to a TargetRadiiSolveMethod.
Definition: BundleTargetBody.cpp:681
Isis::BundleTargetBody::formatAprioriSigmaString
QString formatAprioriSigmaString(int type, int fieldWidth, int precision) const
Longitude.h
Isis::BundleTargetBody::solvePM
virtual bool solvePM()
If the prime meridian angle will be solved for with this target body.
Definition: BundleTargetBody.cpp:507
BundleSettings.h
Isis::BundleTargetBody::TriaxialRadiusB
@ TriaxialRadiusB
Definition: BundleTargetBody.h:81
Isis::BundleTargetBody::TargetSolveCodes
TargetSolveCodes
Enumeration that defines what BundleTargetBody can solve for.
Definition: BundleTargetBody.h:71
Isis::BundleTargetBody::targetRadiiOptionToString
static QString targetRadiiOptionToString(TargetRadiiSolveMethod targetRadiiSolveMethod)
Converts a TargetRadiiSolveMethod to a QString.
Definition: BundleTargetBody.cpp:709
Isis::BundleTargetBody::AccelerationPoleDec
@ AccelerationPoleDec
Definition: BundleTargetBody.h:76
Isis::BundleTargetBody::parameterSolution
LinearAlgebra::Vector & parameterSolution()
Returns the vector of parameters solution.
Definition: BundleTargetBody.cpp:756
Isis::Target::pmCoefs
std::vector< Angle > pmCoefs()
Definition: Target.cpp:552
Isis::BundleTargetBody::formatW0AdjustedSigmaString
QString formatW0AdjustedSigmaString(int fieldWidth, int precision) const
BundleTargetBody.h
QSharedPointer< BundleTargetBody >
Isis::BundleTargetBody::All
@ All
Solve for all radii.
Definition: BundleTargetBody.h:67
Isis::BundleTargetBody::formatPolePositionAprioriSigmaString
QString formatPolePositionAprioriSigmaString(int fieldWidth, int precision) const
Isis::BundleTargetBody::meanRadius
Distance meanRadius()
Returns the mean radius.
Definition: BundleTargetBody.cpp:923
Isis::BundleTargetBody::pmCoefs
std::vector< Angle > pmCoefs()
Returns the coefficients of the prime meridian polynomial.
Definition: BundleTargetBody.cpp:891
Isis::BundleTargetBody::solvePoleRA
virtual bool solvePoleRA()
If the pole right ascension angle will be solved for with this target body.
Definition: BundleTargetBody.cpp:435
QStringList
Isis::toString
QString toString(bool boolToConvert)
Global function to convert a boolean to a string.
Definition: IString.cpp:211
Isis::BundleTargetBody::VelocityPM
@ VelocityPM
Definition: BundleTargetBody.h:78
Isis::BundleTargetBody::TargetRadiiSolveMethod
TargetRadiiSolveMethod
Enumeration that defines how to solve for target radii.
Definition: BundleTargetBody.h:64
Isis::Distance
Distance measurement, usually in meters.
Definition: Distance.h:34
Isis::Longitude
This class is designed to encapsulate the concept of a Longitude.
Definition: Longitude.h:40
Isis::BundleTargetBody::parameterList
QStringList parameterList()
Returns a list of all the parameters being solved for as QStrings.
Definition: BundleTargetBody.cpp:1116
Isis::BundleTargetBody::formatRadiusAprioriSigmaString
QString formatRadiusAprioriSigmaString(int fieldWidth, int precision) const
Isis::Target::radii
std::vector< Distance > radii() const
Returns the radii of the body in km.
Definition: Target.cpp:532
Isis::Distance::Kilometers
@ Kilometers
The distance is being specified in kilometers.
Definition: Distance.h:45
Isis::BundleTargetBody::parameterWeights
LinearAlgebra::Vector & parameterWeights()
Returns the vector of parameter weights.
Definition: BundleTargetBody.cpp:730
Isis::BundleTargetBody::readFromPvl
bool readFromPvl(PvlObject &tbPvlObject)
Set bundle solve parameters for target body from a pvl file.
Definition: BundleTargetBody.cpp:1180
Isis::Distance::Meters
@ Meters
The distance is being specified in meters.
Definition: Distance.h:43
Latitude.h
Isis::LinearAlgebra::Vector
boost::numeric::ublas::vector< double > Vector
Definition for an Isis::LinearAlgebra::Vector of doubles.
Definition: LinearAlgebra.h:120
Isis::BundleTargetBody::vtpv
double vtpv()
Calculates and returns the weighted sum of the squares of the corrections.
Definition: BundleTargetBody.cpp:943
Isis::BundleTargetBody::applyParameterCorrections
void applyParameterCorrections(LinearAlgebra::Vector corrections)
Applies a vector of corrections to the parameters for the target body.
Definition: BundleTargetBody.cpp:580
_FILEINFO_
#define _FILEINFO_
Macro for the filename and line number.
Definition: IException.h:24
Isis::Target::poleRaCoefs
std::vector< Angle > poleRaCoefs()
Definition: Target.cpp:542
Isis::BundleTargetBody::solvePoleRAAcceleration
virtual bool solvePoleRAAcceleration()
If the pole right ascension acceleration will be solved for with this target body.
Definition: BundleTargetBody.cpp:459
Isis::BundleTargetBody::solvePMVelocity
virtual bool solvePMVelocity()
If the prime meridian velocity will be solved for with this target body.
Definition: BundleTargetBody.cpp:519
Isis::BundleTargetBody::formatW0AprioriSigmaString
QString formatW0AprioriSigmaString(int fieldWidth, int precision) const
Isis::BundleTargetBody::BundleTargetBody
BundleTargetBody()
Creates an empty BundleTargetBody object.
Definition: BundleTargetBody.cpp:26
Isis::BundleTargetBodyQsp
QSharedPointer< BundleTargetBody > BundleTargetBodyQsp
Definition for BundleTargetBodyQsp, a QSharedPointer to a BundleTargetBody.
Definition: BundleTargetBody.h:187
Isis::BundleTargetBody::VelocityPoleDec
@ VelocityPoleDec
Definition: BundleTargetBody.h:75
Isis::BundleTargetBody
This class is used to represent a target body in a bundle and how to solve for it.
Definition: BundleTargetBody.h:52
Isis::IException
Isis exception class.
Definition: IException.h:91
Isis::BundleTargetBody::solvePoleDecVelocity
virtual bool solvePoleDecVelocity()
If the pole declination velocity will be solved for with this target body.
Definition: BundleTargetBody.cpp:483
Isis::Angle
Defines an angle and provides unit conversions.
Definition: Angle.h:45
Isis::BundleTargetBody::AccelerationPM
@ AccelerationPM
Definition: BundleTargetBody.h:79
Isis::BundleTargetBody::operator=
BundleTargetBody & operator=(const BundleTargetBody &src)
Assignment operator.
Definition: BundleTargetBody.cpp:125
IException.h
Isis::IException::Programmer
@ Programmer
This error is for when a programmer made an API call that was illegal.
Definition: IException.h:146
Isis::BundleTargetBody::numberParameters
virtual int numberParameters()
Returns the total number of parameters being solved for.
Definition: BundleTargetBody.cpp:837
Isis::BundleTargetBody::PM
@ PM
Definition: BundleTargetBody.h:77
LinearAlgebra.h
Isis::PvlObject::beginGroup
PvlGroupIterator beginGroup()
Returns the beginning group index.
Definition: PvlObject.h:91
Isis::BundleTargetBody::setSolveSettings
void setSolveSettings(std::set< int > targetParameterSolveCodes, Angle aprioriPoleRA, Angle sigmaPoleRA, Angle aprioriVelocityPoleRA, Angle sigmaVelocityPoleRA, Angle aprioriPoleDec, Angle sigmaPoleDec, Angle aprioriVelocityPoleDec, Angle sigmaVelocityPoleDec, Angle aprioriPM, Angle sigmaPM, Angle aprioriVelocityPM, Angle sigmaVelocityPM, TargetRadiiSolveMethod solveRadiiMethod, Distance aprioriRadiusA, Distance sigmaRadiusA, Distance aprioriRadiusB, Distance sigmaRadiusB, Distance aprioriRadiusC, Distance sigmaRadiusC, Distance aprioriMeanRadius, Distance sigmaMeanRadius)
Sets the solve settings for the target body.
Definition: BundleTargetBody.cpp:215
PvlKeyword.h
Angle.h
PvlObject.h
Isis::Angle::degrees
double degrees() const
Get the angle in units of Degrees.
Definition: Angle.h:232
Isis::BundleTargetBody::VelocityPoleRA
@ VelocityPoleRA
Definition: BundleTargetBody.h:72
Isis::BundleTargetBody::MeanRadius
@ MeanRadius
Definition: BundleTargetBody.h:83
Isis::BundleTargetBody::formatWDotAprioriSigmaString
QString formatWDotAprioriSigmaString(int fieldWidth, int precision) const
Isis::BundleTargetBody::solvePoleDecAcceleration
virtual bool solvePoleDecAcceleration()
If the pole declination acceleration will be solved for with this target body.
Definition: BundleTargetBody.cpp:495
Isis::BundleTargetBody::solvePoleRAVelocity
virtual bool solvePoleRAVelocity()
If the pole right ascension velocity will be solved for with this target body.
Definition: BundleTargetBody.cpp:447
Distance.h
Isis::BundleTargetBody::formatPolePositionAdjustedSigmaString
QString formatPolePositionAdjustedSigmaString(int fieldWidth, int precision) const
Isis::BundleTargetBody::solveMeanRadius
virtual bool solveMeanRadius()
If the mean radius will be solved for with this target body.
Definition: BundleTargetBody.cpp:557
Isis::BundleTargetBody::formatValue
QString formatValue(double value, int fieldWidth, int precision) const
Isis::BundleTargetBody::~BundleTargetBody
virtual ~BundleTargetBody()
Destructor.
Definition: BundleTargetBody.cpp:116
Isis::Target
This class is used to create and store valid Isis targets.
Definition: Target.h:63
Isis::BundleTargetBody::PoleRA
@ PoleRA
Definition: BundleTargetBody.h:71
Isis::BundleTargetBody::Mean
@ Mean
Solve for mean radius.
Definition: BundleTargetBody.h:66
Isis::BundleTargetBody::formatRadiusAdjustedSigmaString
QString formatRadiusAdjustedSigmaString(int fieldWidth, int precision) const
Isis::BundleTargetBody::solvePMAcceleration
virtual bool solvePMAcceleration()
If the prime meridian acceleration will be solved for with this target body.
Definition: BundleTargetBody.cpp:531
Isis::Angle::Radians
@ Radians
Radians are generally used in mathematical equations, 0-2*PI is one circle, however these are more di...
Definition: Angle.h:63
Isis
This is free and unencumbered software released into the public domain.
Definition: Apollo.h:16
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::BundleTargetBody::poleRaCoefs
std::vector< Angle > poleRaCoefs()
Returns the coefficients of the right ascension polynomial.
Definition: BundleTargetBody.cpp:855
Isis::BundleTargetBody::solveTriaxialRadii
virtual bool solveTriaxialRadii()
If the triaxial radii will be solved for with this target body.
Definition: BundleTargetBody.cpp:543
Isis::Angle::radians
double radians() const
Convert an angle to a double.
Definition: Angle.h:226