Isis Developer Reference
BundleObservationSolveSettings.h
Go to the documentation of this file.
1#ifndef BundleObservationSolveSettings_h
2#define BundleObservationSolveSettings_h
3
10/* SPDX-License-Identifier: CC0-1.0 */
11
12#include <QList>
13#include <QSet>
14#include <QString>
15#include <QStringList>
16#include <QXmlStreamReader>
17
18#include <csm.h>
19
20#include "SpicePosition.h"
21#include "SpiceRotation.h"
22
23class QDataStream;
24class QUuid;
25class QXmlStreamWriter;
26
27namespace Isis {
28 class FileName;
29 class Project; // TODO: does xml stuff need project???
30 class PvlObject;
82
83 public:
85 BundleObservationSolveSettings(QXmlStreamReader *xmlReader);
87 QXmlStreamReader *xmlReader);
89 BundleObservationSolveSettings(const PvlGroup &scParameterGroup);
92 void initialize();
93
94 void setInstrumentId(QString instrumentId);
95 QString instrumentId() const;
96 void addObservationNumber(QString observationNumber);
97 bool removeObservationNumber(QString observationNumber);
98 QSet<QString> observationNumbers() const;
99
103 Set = 1,
104 Type = 2,
105 List = 3
106 };
107
108 static CSMSolveOption stringToCSMSolveOption(QString option);
109 static QString csmSolveOptionToString(CSMSolveOption option);
110 static csm::param::Set stringToCSMSolveSet(QString set);
111 static QString csmSolveSetToString(csm::param::Set set);
112 static csm::param::Type stringToCSMSolveType(QString type);
113 static QString csmSolveTypeToString(csm::param::Type type);
114 void setCSMSolveSet(csm::param::Set set);
115 void setCSMSolveType(csm::param::Type type);
117 CSMSolveOption csmSolveOption() const;
118 csm::param::Set csmParameterSet() const;
119 csm::param::Type csmParameterType() const;
121
133
134 static InstrumentPointingSolveOption stringToInstrumentPointingSolveOption(QString option);
135 static QString instrumentPointingSolveOptionToString(InstrumentPointingSolveOption option);
136 void setInstrumentPointingSettings(InstrumentPointingSolveOption option,
137 bool solveTwist,
138 int ckDegree = 2,
139 int ckSolveDegree = 2,
140 bool solvePolynomialOverExisting = false,
141 double anglesAprioriSigma = -1.0,
142 double angularVelocityAprioriSigma = -1.0,
143 double angularAccelerationAprioriSigma = -1.0,
144 QList<double> * additionalPointingSigmas=nullptr);
145 InstrumentPointingSolveOption instrumentPointingSolveOption() const;
146 bool solveTwist() const;
147 int ckDegree() const;
148 int ckSolveDegree() const;
150 bool solvePolyOverPointing() const;
151 QList<double> aprioriPointingSigmas() const;
153
154
155
166
167 static InstrumentPositionSolveOption stringToInstrumentPositionSolveOption(QString option);
168 static QString instrumentPositionSolveOptionToString(InstrumentPositionSolveOption option);
169 void setInstrumentPositionSettings(InstrumentPositionSolveOption option,
170 int spkDegree = 2,
171 int spkSolveDegree = 2,
172 bool positionOverHermite = false,
173 double positionAprioriSigma = -1.0,
174 double velocityAprioriSigma = -1.0,
175 double accelerationAprioriSigma = -1.0,
176 QList<double> * additionalPositionSigmas=nullptr);
177 InstrumentPositionSolveOption instrumentPositionSolveOption() const;
178 int spkDegree() const;
179 int spkSolveDegree() const;
181 bool solvePositionOverHermite() const;
182 QList<double> aprioriPositionSigmas() const;
184
185 void save(QXmlStreamWriter &stream, const Project *project) const;
186 void readSolveSettings(QXmlStreamReader *xmlReader);
187
192 QUuid *m_id;
194 QSet<QString> m_observationNumbers;
195
196 // CSM related parameters
198 csm::param::Set m_csmSolveSet;
200 csm::param::Type m_csmSolveType;
205 // pointing related parameters
217 QList<double> m_anglesAprioriSigma;
231 // position related parameters
257 };
260 typedef QSharedPointer<BundleObservationSolveSettings> BundleObservationSolveSettingsQsp;
261};
262
263#endif // BundleObservationSolveSettings_h
This class is used to modify and manage solve settings for 1 to many BundleObservations.
Definition BundleObservationSolveSettings.h:81
CSMSolveOption
Options for how to solve for CSM parameters.
Definition BundleObservationSolveSettings.h:101
@ NoCSMParameters
Do not solve for CSM parameters.
Definition BundleObservationSolveSettings.h:102
@ List
Solve for an explicit list of CSM parameters.
Definition BundleObservationSolveSettings.h:105
static InstrumentPointingSolveOption stringToInstrumentPointingSolveOption(QString option)
Translates a QString InstrumentPointingSolveOption to its enumerated value.
Definition BundleObservationSolveSettings.cpp:712
InstrumentPositionSolveOption
Options for how to solve for instrument position.
Definition BundleObservationSolveSettings.h:157
@ PositionVelocity
Solve for instrument positions and velocities.
Definition BundleObservationSolveSettings.h:160
@ PositionVelocityAcceleration
Solve for instrument positions, velocities, and accelerations.
Definition BundleObservationSolveSettings.h:161
@ AllPositionCoefficients
Solve for all coefficients in the polynomials fit to the instrument positions.
Definition BundleObservationSolveSettings.h:163
@ PositionOnly
Solve for instrument positions only.
Definition BundleObservationSolveSettings.h:159
@ NoPositionFactors
Solve for none of the position factors.
Definition BundleObservationSolveSettings.h:158
static QString csmSolveTypeToString(csm::param::Type type)
Convert a CSM parameter type enumeration value to a string.
Definition BundleObservationSolveSettings.cpp:600
csm::param::Type m_csmSolveType
The CSM parameter type to solve for.
Definition BundleObservationSolveSettings.h:200
SpicePosition::Source m_positionInterpolationType
SpicePosition interpolation types.
Definition BundleObservationSolveSettings.h:247
CSMSolveOption csmSolveOption() const
Get how the CSM parameters to solve for are specified for this observation.
Definition BundleObservationSolveSettings.cpp:661
CSMSolveOption m_csmSolveOption
How the CSM solution is specified.
Definition BundleObservationSolveSettings.h:197
void addObservationNumber(QString observationNumber)
Associates an observation number with these solve settings.
Definition BundleObservationSolveSettings.cpp:425
~BundleObservationSolveSettings()
Destructor.
Definition BundleObservationSolveSettings.cpp:294
InstrumentPositionSolveOption instrumentPositionSolveOption() const
Accesses the instrument position solve option.
Definition BundleObservationSolveSettings.cpp:1129
int m_numberCamAngleCoefSolved
The number of camera angle coefficients in solution.
Definition BundleObservationSolveSettings.h:208
BundleObservationSolveSettings(FileName xmlFile, QXmlStreamReader *xmlReader)
void initialize()
Initializes the default state of this BundleObservationSolveSettings.
Definition BundleObservationSolveSettings.cpp:355
bool solveTwist() const
Accesses the flag for solving for twist.
Definition BundleObservationSolveSettings.cpp:889
void setCSMSolveType(csm::param::Type type)
Set the type of CSM parameters to solve for.
Definition BundleObservationSolveSettings.cpp:638
static QString csmSolveOptionToString(CSMSolveOption option)
Convert a CSM solve option enumeration value to a string.
Definition BundleObservationSolveSettings.cpp:494
int m_numberCamPosCoefSolved
The number of camera position coefficients in the solution.
Definition BundleObservationSolveSettings.h:234
BundleObservationSolveSettings & operator=(const BundleObservationSolveSettings &src)
Assigns the state of another BundleObservationSolveSettings to this one.
Definition BundleObservationSolveSettings.cpp:311
static csm::param::Set stringToCSMSolveSet(QString set)
Convert a string to its CSM parameter set enumeration value.
Definition BundleObservationSolveSettings.cpp:522
csm::param::Set csmParameterSet() const
Get the set of CSM parameters to solve for.
Definition BundleObservationSolveSettings.cpp:671
bool m_solvePositionOverHermiteSpline
The polynomial will be fit over an existing Hermite spline.
Definition BundleObservationSolveSettings.h:240
void setCSMSolveSet(csm::param::Set set)
Set the set of CSM parameters to solve for.
Definition BundleObservationSolveSettings.cpp:627
SpiceRotation::Source m_pointingInterpolationType
SpiceRotation interpolation type.
Definition BundleObservationSolveSettings.h:222
QSet< QString > m_observationNumbers
Associated observation numbers for these settings.
Definition BundleObservationSolveSettings.h:194
bool solvePolyOverPointing() const
Whether or not the solve polynomial will be fit over the existing pointing polynomial.
Definition BundleObservationSolveSettings.cpp:931
void setInstrumentPositionSettings(InstrumentPositionSolveOption option, int spkDegree=2, int spkSolveDegree=2, bool positionOverHermite=false, double positionAprioriSigma=-1.0, double velocityAprioriSigma=-1.0, double accelerationAprioriSigma=-1.0, QList< double > *additionalPositionSigmas=nullptr)
Sets the instrument pointing settings.
Definition BundleObservationSolveSettings.cpp:1046
int m_spkDegree
Degree of the polynomial fit to the original camera position.
Definition BundleObservationSolveSettings.h:236
int numberCameraPositionCoefficientsSolved() const
Accesses the number of camera position coefficients in the solution.
Definition BundleObservationSolveSettings.cpp:1160
void setInstrumentId(QString instrumentId)
Sets the instrument id for this observation.
Definition BundleObservationSolveSettings.cpp:403
QString m_instrumentId
The spacecraft instrument id for this observation.
Definition BundleObservationSolveSettings.h:193
void save(QXmlStreamWriter &stream, const Project *project) const
Saves this BundleObservationSolveSettings to an xml stream.
Definition BundleObservationSolveSettings.cpp:1210
BundleObservationSolveSettings()
Constructor with default parameter initializations.
Definition BundleObservationSolveSettings.cpp:36
int ckDegree() const
Accesses the degree of polynomial fit to original camera angles (ckDegree).
Definition BundleObservationSolveSettings.cpp:899
QString instrumentId() const
Accesses the instrument id for this observation.
Definition BundleObservationSolveSettings.cpp:413
csm::param::Type csmParameterType() const
Get the type of CSM parameters to solve for.
Definition BundleObservationSolveSettings.cpp:681
QList< double > aprioriPositionSigmas() const
Accesses the a priori position sigmas.
Definition BundleObservationSolveSettings.cpp:1181
QList< double > m_anglesAprioriSigma
The image position a priori sigmas.The size of the list is equal to the number of coefficients in the...
Definition BundleObservationSolveSettings.h:217
InstrumentPointingSolveOption m_instrumentPointingSolveOption
Option for how to solve for instrument pointing.
Definition BundleObservationSolveSettings.h:207
int m_spkSolveDegree
Degree of the camera position polynomial being fit to in the bundle adjustment.
Definition BundleObservationSolveSettings.h:238
bool m_solveTwist
Solve for "twist" angle.
Definition BundleObservationSolveSettings.h:214
static QString instrumentPointingSolveOptionToString(InstrumentPointingSolveOption option)
Tranlsates an enumerated InstrumentPointingSolveOption value to its string representation.
Definition BundleObservationSolveSettings.cpp:761
QList< double > aprioriPointingSigmas() const
Accesses the a priori pointing sigmas.
Definition BundleObservationSolveSettings.cpp:941
static InstrumentPositionSolveOption stringToInstrumentPositionSolveOption(QString option)
Translates a QString InstrumentPositionSolveOption to its enumerated value.
Definition BundleObservationSolveSettings.cpp:972
SpiceRotation::Source pointingInterpolationType() const
Accesses the SpiceRotation interpolation type for the instrument pointing.
Definition BundleObservationSolveSettings.cpp:951
static QString csmSolveSetToString(csm::param::Set set)
Convert a CSM parameter set enumeration value to a string.
Definition BundleObservationSolveSettings.cpp:547
int ckSolveDegree() const
Accesses the degree of the camera angles polynomial being fit to in the bundle adjustment (ckSolveDeg...
Definition BundleObservationSolveSettings.cpp:910
bool m_solvePointingPolynomialOverExisting
The polynomial will be fit over the existing pointing polynomial.
Definition BundleObservationSolveSettings.h:215
static CSMSolveOption stringToCSMSolveOption(QString option)
Convert a string to a CSM solve option enumeration value.
Definition BundleObservationSolveSettings.cpp:466
csm::param::Set m_csmSolveSet
The CSM parameter set to solve for.
Definition BundleObservationSolveSettings.h:198
void readSolveSettings(QXmlStreamReader *xmlReader)
Definition BundleObservationSolveSettings.cpp:1266
void setInstrumentPointingSettings(InstrumentPointingSolveOption option, bool solveTwist, int ckDegree=2, int ckSolveDegree=2, bool solvePolynomialOverExisting=false, double anglesAprioriSigma=-1.0, double angularVelocityAprioriSigma=-1.0, double angularAccelerationAprioriSigma=-1.0, QList< double > *additionalPointingSigmas=nullptr)
Sets the instrument pointing settings.
Definition BundleObservationSolveSettings.cpp:787
bool solvePositionOverHermite() const
Whether or not the polynomial for solving will be fit over an existing Hermite spline.
Definition BundleObservationSolveSettings.cpp:1171
InstrumentPositionSolveOption m_instrumentPositionSolveOption
Option for how to solve for instrument position.
Definition BundleObservationSolveSettings.h:233
QList< double > m_positionAprioriSigma
The instrument pointing a priori sigmas.
Definition BundleObservationSolveSettings.h:242
QStringList csmParameterList() const
Get the list of CSM parameters to solve for.
Definition BundleObservationSolveSettings.cpp:691
int m_ckSolveDegree
Degree of the camera angles polynomial being fit to in the bundle adjustment.
Definition BundleObservationSolveSettings.h:212
SpicePosition::Source positionInterpolationType() const
Accesses the SpicePosition interpolation type for the spacecraft position.
Definition BundleObservationSolveSettings.cpp:1191
QSet< QString > observationNumbers() const
Returns a list of observation numbers associated with these solve settings.
Definition BundleObservationSolveSettings.cpp:448
static QString instrumentPositionSolveOptionToString(InstrumentPositionSolveOption option)
Translates an enumerated InstrumentPositionSolveOption to its string representation.
Definition BundleObservationSolveSettings.cpp:1021
int numberCameraAngleCoefficientsSolved() const
Accesses the number of camera angle coefficients in the solution.
Definition BundleObservationSolveSettings.cpp:920
bool removeObservationNumber(QString observationNumber)
Removes an observation number from this solve settings.
Definition BundleObservationSolveSettings.cpp:438
int spkSolveDegree() const
Accesses the degree of thecamera position polynomial being fit to in the bundle adjustment (spkSolveD...
Definition BundleObservationSolveSettings.cpp:1150
QUuid * m_id
A unique ID for this object (useful for others to reference this object when saving to disk).
Definition BundleObservationSolveSettings.h:192
InstrumentPointingSolveOption instrumentPointingSolveOption() const
Accesses the instrument pointing solve option.
Definition BundleObservationSolveSettings.cpp:879
void setCSMSolveParameterList(QStringList list)
Set an explicit list of CSM parameters to solve for.
Definition BundleObservationSolveSettings.cpp:649
QStringList m_csmSolveList
The names of the CSM parameters to solve for.
Definition BundleObservationSolveSettings.h:202
int m_ckDegree
Degree of the polynomial fit to the original camera angles.
Definition BundleObservationSolveSettings.h:210
InstrumentPointingSolveOption
Options for how to solve for instrument pointing.
Definition BundleObservationSolveSettings.h:123
@ AnglesVelocity
Solve for pointing angles and their angular velocities.
Definition BundleObservationSolveSettings.h:127
@ AnglesVelocityAcceleration
Solve for pointing angles, their velocities and their accelerations.
Definition BundleObservationSolveSettings.h:128
@ AllPointingCoefficients
Solve for all coefficients in the polynomials fit to the pointing angles.
Definition BundleObservationSolveSettings.h:130
@ AnglesOnly
Solve for pointing angles: right ascension, declination and, optionally, twist.
Definition BundleObservationSolveSettings.h:125
@ NoPointingFactors
Solve for none of the pointing factors.
Definition BundleObservationSolveSettings.h:124
int spkDegree() const
Accesses the degree of the polynomial fit to the original camera position (spkDegree).
Definition BundleObservationSolveSettings.cpp:1139
static csm::param::Type stringToCSMSolveType(QString type)
Convert a string to its CSM parameter type enumeration value.
Definition BundleObservationSolveSettings.cpp:572
File name manipulation and expansion.
Definition FileName.h:100
The main project for ipce.
Definition Project.h:287
Contains multiple PvlContainers.
Definition PvlGroup.h:41
Source
This enum indicates the status of the object.
Definition SpicePosition.h:183
Source
The rotation can come from one of 3 places for an Isis cube.
Definition SpiceRotation.h:243
This is free and unencumbered software released into the public domain.
Definition Apollo.h:16
QSharedPointer< BundleObservationSolveSettings > BundleObservationSolveSettingsQsp
Definition for BundleObservationSolveSettingsQsp, a QSharedPointer to a BundleObservationSolveSetting...
Definition BundleObservationSolveSettings.h:260