Isis 3 Programmer Reference
BundleTargetBody.h
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
25namespace 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
71 enum TargetSolveCodes { PoleRA = 0,
72 VelocityPoleRA = 1,
73 AccelerationPoleRA = 2,
74 PoleDec = 3,
75 VelocityPoleDec = 4,
76 AccelerationPoleDec = 5,
77 PM = 6,
78 VelocityPM = 7,
79 AccelerationPM = 8,
80 TriaxialRadiusA = 9,
81 TriaxialRadiusB = 10,
82 TriaxialRadiusC = 11,
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
96 static TargetRadiiSolveMethod stringToTargetRadiiOption(QString option);
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:
167
168 std::vector<Distance> m_radii;
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;
178
184 };
185
187 typedef QSharedPointer<BundleTargetBody> BundleTargetBodyQsp;
188}
189
190#endif // BundleTargetBody_h
Defines an angle and provides unit conversions.
Definition Angle.h:45
This class is used to represent a target body in a bundle and how to solve for it.
Distance m_sigmaRadiusC
Apriori Radius C Sigma.
TargetRadiiSolveMethod
Enumeration that defines how to solve for target radii.
@ Mean
Solve for mean radius.
@ All
Solve for all radii.
LinearAlgebra::Vector & parameterWeights()
Returns the vector of parameter weights.
std::vector< Angle > m_raPole
pole ra quadratic polynomial coefficients
std::vector< Angle > m_pm
pole pm quadratic polynomial coefficients
virtual bool solvePoleRAAcceleration()
If the pole right ascension acceleration will be solved for with this target body.
LinearAlgebra::Vector & aprioriSigmas()
Returns the vector of apriori parameters sigmas.
std::vector< Angle > poleRaCoefs()
Returns the coefficients of the right ascension polynomial.
virtual bool solvePoleDec()
If the pole declination angle will be solved for with this target body.
static QString targetRadiiOptionToString(TargetRadiiSolveMethod targetRadiiSolveMethod)
Converts a TargetRadiiSolveMethod to a QString.
virtual bool solvePoleDecVelocity()
If the pole declination velocity will be solved for with this target body.
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.
LinearAlgebra::Vector & parameterCorrections()
Returns the vector of corrections applied to the parameters.
std::vector< Distance > radii()
Returns the radius values.
LinearAlgebra::Vector m_corrections
Cumulative parameter corrections.
BundleTargetBody & operator=(const BundleTargetBody &src)
Assignment operator.
double vtpv()
Calculates and returns the weighted sum of the squares of the corrections.
std::vector< Angle > pmCoefs()
Returns the coefficients of the prime meridian polynomial.
LinearAlgebra::Vector & adjustedSigmas()
Returns the vector of adjusted parameters sigmas.
virtual bool solvePoleRA()
If the pole right ascension angle will be solved for with this target body.
int numberRadiusParameters()
Returns the number of radius parameters being solved for.
Distance m_sigmaMeanRadius
Apriori Mean Radius Sigma.
virtual bool solvePM()
If the prime meridian angle will be solved for with this target body.
Distance m_sigmaRadiusA
Apriori Radius A Sigma.
QString formatBundleOutputString(bool errorPropagation)
Formats and returns the parameter values as a QString.
Distance m_aprioriRadiusC
Apriori Radius C.
Distance meanRadius()
Returns the mean radius.
LinearAlgebra::Vector & parameterSolution()
Returns the vector of parameters solution.
virtual bool solvePMAcceleration()
If the prime meridian acceleration will be solved for with this target body.
LinearAlgebra::Vector m_aprioriSigmas
A priori parameter sigmas.
Distance m_aprioriRadiusA
Apriori Radius A.
virtual bool solveTriaxialRadii()
If the triaxial radii will be solved for with this target body.
virtual bool solveMeanRadius()
If the mean radius will be solved for with this target body.
TargetSolveCodes
Enumeration that defines what BundleTargetBody can solve for.
Distance m_aprioriMeanRadius
Apriori Mean Radius.
virtual int numberParameters()
Returns the total number of parameters being solved for.
static TargetRadiiSolveMethod stringToTargetRadiiOption(QString option)
Converts a QString to a TargetRadiiSolveMethod.
std::vector< Distance > m_radii
Adjusted triaxial radii values.
Distance localRadius(const Latitude &lat, const Longitude &lon)
Gets the local radius for the given latitude/longitude coordinate.
virtual bool solvePoleRAVelocity()
If the pole right ascension velocity will be solved for with this target body.
virtual bool solvePoleDecAcceleration()
If the pole declination acceleration will be solved for with this target body.
BundleTargetBody()
Creates an empty BundleTargetBody object.
QStringList m_parameterNamesList
List of all target parameters.
LinearAlgebra::Vector m_adjustedSigmas
Adjusted parameter sigmas.
Distance m_sigmaRadiusB
Apriori Radius B Sigma.
virtual ~BundleTargetBody()
Destructor.
Distance m_meanRadius
Adjusted mean radius value.
LinearAlgebra::Vector m_weights
Parameter weights.
std::vector< Angle > poleDecCoefs()
Returns the coefficients of the declination polynomial.
QStringList parameterList()
Returns a list of all the parameters being solved for as QStrings.
Distance m_aprioriRadiusB
Apriori Radius B.
bool readFromPvl(PvlObject &tbPvlObject)
Set bundle solve parameters for target body from a pvl file.
LinearAlgebra::Vector m_solution
Parameter solution vector.
virtual bool solvePMVelocity()
If the prime meridian velocity will be solved for with this target body.
void applyParameterCorrections(LinearAlgebra::Vector corrections)
Applies a vector of corrections to the parameters for the target body.
std::set< int > m_parameterSolveCodes
Target parameter solve codes.
TargetRadiiSolveMethod m_solveTargetBodyRadiusMethod
Which radii will be solved for.
std::vector< Angle > m_decPole
pole dec quadratic polynomial coefficients
Distance measurement, usually in meters.
Definition Distance.h:34
This class is designed to encapsulate the concept of a Latitude.
Definition Latitude.h:51
boost::numeric::ublas::vector< double > Vector
Definition for an Isis::LinearAlgebra::Vector of doubles.
This class is designed to encapsulate the concept of a Longitude.
Definition Longitude.h:40
Contains Pvl Groups and Pvl Objects.
Definition PvlObject.h:61
This class is used to create and store valid Isis targets.
Definition Target.h:63
This is free and unencumbered software released into the public domain.
Definition Apollo.h:16
QSharedPointer< BundleTargetBody > BundleTargetBodyQsp
Definition for BundleTargetBodyQsp, a QSharedPointer to a BundleTargetBody.