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
17#include <csm.h>
18
19#include "SpicePosition.h"
20#include "SpiceRotation.h"
21#include "XmlStackedHandler.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;
31 class XmlStackedHandlerReader;
83
84 public:
87 XmlStackedHandlerReader *xmlReader); // TODO: does xml stuff need project???
89 Project *project,
90 XmlStackedHandlerReader *xmlReader); // TODO: does xml stuff need project???
92 BundleObservationSolveSettings(const PvlGroup &scParameterGroup);
95 void initialize();
96
97 void setInstrumentId(QString instrumentId);
98 QString instrumentId() const;
99 void addObservationNumber(QString observationNumber);
100 bool removeObservationNumber(QString observationNumber);
101 QSet<QString> observationNumbers() const;
102
106 Set = 1,
107 Type = 2,
108 List = 3
109 };
110
111 static CSMSolveOption stringToCSMSolveOption(QString option);
112 static QString csmSolveOptionToString(CSMSolveOption option);
113 static csm::param::Set stringToCSMSolveSet(QString set);
114 static QString csmSolveSetToString(csm::param::Set set);
115 static csm::param::Type stringToCSMSolveType(QString type);
116 static QString csmSolveTypeToString(csm::param::Type type);
117 void setCSMSolveSet(csm::param::Set set);
118 void setCSMSolveType(csm::param::Type type);
120 CSMSolveOption csmSolveOption() const;
121 csm::param::Set csmParameterSet() const;
122 csm::param::Type csmParameterType() const;
124
136
137 static InstrumentPointingSolveOption stringToInstrumentPointingSolveOption(QString option);
138 static QString instrumentPointingSolveOptionToString(InstrumentPointingSolveOption option);
139 void setInstrumentPointingSettings(InstrumentPointingSolveOption option,
140 bool solveTwist,
141 int ckDegree = 2,
142 int ckSolveDegree = 2,
143 bool solvePolynomialOverExisting = false,
144 double anglesAprioriSigma = -1.0,
145 double angularVelocityAprioriSigma = -1.0,
146 double angularAccelerationAprioriSigma = -1.0,
147 QList<double> * additionalPointingSigmas=nullptr);
148 InstrumentPointingSolveOption instrumentPointingSolveOption() const;
149 bool solveTwist() const;
150 int ckDegree() const;
151 int ckSolveDegree() const;
153 bool solvePolyOverPointing() const;
154 QList<double> aprioriPointingSigmas() const;
156
157
158
169
170 static InstrumentPositionSolveOption stringToInstrumentPositionSolveOption(QString option);
171 static QString instrumentPositionSolveOptionToString(InstrumentPositionSolveOption option);
172 void setInstrumentPositionSettings(InstrumentPositionSolveOption option,
173 int spkDegree = 2,
174 int spkSolveDegree = 2,
175 bool positionOverHermite = false,
176 double positionAprioriSigma = -1.0,
177 double velocityAprioriSigma = -1.0,
178 double accelerationAprioriSigma = -1.0,
179 QList<double> * additionalPositionSigmas=nullptr);
180 InstrumentPositionSolveOption instrumentPositionSolveOption() const;
181 int spkDegree() const;
182 int spkSolveDegree() const;
184 bool solvePositionOverHermite() const;
185 QList<double> aprioriPositionSigmas() const;
187
188 // TODO: does xml stuff need project???
189 void save(QXmlStreamWriter &stream, const Project *project) const;
190
191
192 private:
200 class XmlHandler : public XmlStackedHandler {
201 public:
202 // TODO: does xml stuff need project???
203 XmlHandler(BundleObservationSolveSettings *settings, Project *project);
204 ~XmlHandler();
205
206 virtual bool startElement(const QString &namespaceURI, const QString &localName,
207 const QString &qName, const QXmlAttributes &atts);
208 virtual bool characters(const QString &ch);
209 virtual bool endElement(const QString &namespaceURI, const QString &localName,
210 const QString &qName);
211
212 private:
213 Q_DISABLE_COPY(XmlHandler);
214
215 BundleObservationSolveSettings *m_xmlHandlerObservationSettings;
216 Project *m_xmlHandlerProject; // TODO: does xml stuff need project???
217 QString m_xmlHandlerCharacters;
218 QStringList m_xmlHandlerAprioriSigmas;
219 };
220
225 QUuid *m_id;
226 QString m_instrumentId;
227 QSet<QString> m_observationNumbers;
228
229 // CSM related parameters
230 CSMSolveOption m_csmSolveOption;
231 csm::param::Set m_csmSolveSet;
233 csm::param::Type m_csmSolveType;
235 QStringList m_csmSolveList;
238 // pointing related parameters
240 InstrumentPointingSolveOption m_instrumentPointingSolveOption;
241 int m_numberCamAngleCoefSolved;
243 int m_ckDegree;
245 int m_ckSolveDegree;
247 bool m_solveTwist;
248 bool m_solvePointingPolynomialOverExisting;
250 QList<double> m_anglesAprioriSigma;
255 m_pointingInterpolationType;
264 // position related parameters
266 InstrumentPositionSolveOption m_instrumentPositionSolveOption;
267 int m_numberCamPosCoefSolved;
269 int m_spkDegree;
271 int m_spkSolveDegree;
273 bool m_solvePositionOverHermiteSpline;
275 QList<double> m_positionAprioriSigma;
280 m_positionInterpolationType;
290 };
293 typedef QSharedPointer<BundleObservationSolveSettings> BundleObservationSolveSettingsQsp;
294};
295
296#endif // BundleObservationSolveSettings_h
This class is used to modify and manage solve settings for 1 to many BundleObservations.
Definition BundleObservationSolveSettings.h:82
CSMSolveOption
Options for how to solve for CSM parameters.
Definition BundleObservationSolveSettings.h:104
@ NoCSMParameters
Do not solve for CSM parameters.
Definition BundleObservationSolveSettings.h:105
@ List
Solve for an explicit list of CSM parameters.
Definition BundleObservationSolveSettings.h:108
static InstrumentPointingSolveOption stringToInstrumentPointingSolveOption(QString option)
Translates a QString InstrumentPointingSolveOption to its enumerated value.
Definition BundleObservationSolveSettings.cpp:716
InstrumentPositionSolveOption
Options for how to solve for instrument position.
Definition BundleObservationSolveSettings.h:160
@ PositionVelocity
Solve for instrument positions and velocities.
Definition BundleObservationSolveSettings.h:163
@ PositionVelocityAcceleration
Solve for instrument positions, velocities, and accelerations.
Definition BundleObservationSolveSettings.h:164
@ AllPositionCoefficients
Solve for all coefficients in the polynomials fit to the instrument positions.
Definition BundleObservationSolveSettings.h:166
@ PositionOnly
Solve for instrument positions only.
Definition BundleObservationSolveSettings.h:162
@ NoPositionFactors
Solve for none of the position factors.
Definition BundleObservationSolveSettings.h:161
static QString csmSolveTypeToString(csm::param::Type type)
Convert a CSM parameter type enumeration value to a string.
Definition BundleObservationSolveSettings.cpp:604
CSMSolveOption csmSolveOption() const
Get how the CSM parameters to solve for are specified for this observation.
Definition BundleObservationSolveSettings.cpp:665
void addObservationNumber(QString observationNumber)
Associates an observation number with these solve settings.
Definition BundleObservationSolveSettings.cpp:429
~BundleObservationSolveSettings()
Destructor.
Definition BundleObservationSolveSettings.cpp:298
InstrumentPositionSolveOption instrumentPositionSolveOption() const
Accesses the instrument position solve option.
Definition BundleObservationSolveSettings.cpp:1133
void initialize()
Initializes the default state of this BundleObservationSolveSettings.
Definition BundleObservationSolveSettings.cpp:359
bool solveTwist() const
Accesses the flag for solving for twist.
Definition BundleObservationSolveSettings.cpp:893
void setCSMSolveType(csm::param::Type type)
Set the type of CSM parameters to solve for.
Definition BundleObservationSolveSettings.cpp:642
static QString csmSolveOptionToString(CSMSolveOption option)
Convert a CSM solve option enumeration value to a string.
Definition BundleObservationSolveSettings.cpp:498
BundleObservationSolveSettings & operator=(const BundleObservationSolveSettings &src)
Assigns the state of another BundleObservationSolveSettings to this one.
Definition BundleObservationSolveSettings.cpp:315
static csm::param::Set stringToCSMSolveSet(QString set)
Convert a string to its CSM parameter set enumeration value.
Definition BundleObservationSolveSettings.cpp:526
csm::param::Set csmParameterSet() const
Get the set of CSM parameters to solve for.
Definition BundleObservationSolveSettings.cpp:675
void setCSMSolveSet(csm::param::Set set)
Set the set of CSM parameters to solve for.
Definition BundleObservationSolveSettings.cpp:631
bool solvePolyOverPointing() const
Whether or not the solve polynomial will be fit over the existing pointing polynomial.
Definition BundleObservationSolveSettings.cpp:935
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:1050
int numberCameraPositionCoefficientsSolved() const
Accesses the number of camera position coefficients in the solution.
Definition BundleObservationSolveSettings.cpp:1164
void setInstrumentId(QString instrumentId)
Sets the instrument id for this observation.
Definition BundleObservationSolveSettings.cpp:407
void save(QXmlStreamWriter &stream, const Project *project) const
Saves this BundleObservationSolveSettings to an xml stream.
Definition BundleObservationSolveSettings.cpp:1214
BundleObservationSolveSettings()
Constructor with default parameter initializations.
Definition BundleObservationSolveSettings.cpp:37
int ckDegree() const
Accesses the degree of polynomial fit to original camera angles (ckDegree).
Definition BundleObservationSolveSettings.cpp:903
QString instrumentId() const
Accesses the instrument id for this observation.
Definition BundleObservationSolveSettings.cpp:417
csm::param::Type csmParameterType() const
Get the type of CSM parameters to solve for.
Definition BundleObservationSolveSettings.cpp:685
QList< double > aprioriPositionSigmas() const
Accesses the a priori position sigmas.
Definition BundleObservationSolveSettings.cpp:1185
static QString instrumentPointingSolveOptionToString(InstrumentPointingSolveOption option)
Tranlsates an enumerated InstrumentPointingSolveOption value to its string representation.
Definition BundleObservationSolveSettings.cpp:765
QList< double > aprioriPointingSigmas() const
Accesses the a priori pointing sigmas.
Definition BundleObservationSolveSettings.cpp:945
BundleObservationSolveSettings(FileName xmlFile, Project *project, XmlStackedHandlerReader *xmlReader)
static InstrumentPositionSolveOption stringToInstrumentPositionSolveOption(QString option)
Translates a QString InstrumentPositionSolveOption to its enumerated value.
Definition BundleObservationSolveSettings.cpp:976
SpiceRotation::Source pointingInterpolationType() const
Accesses the SpiceRotation interpolation type for the instrument pointing.
Definition BundleObservationSolveSettings.cpp:955
static QString csmSolveSetToString(csm::param::Set set)
Convert a CSM parameter set enumeration value to a string.
Definition BundleObservationSolveSettings.cpp:551
int ckSolveDegree() const
Accesses the degree of the camera angles polynomial being fit to in the bundle adjustment (ckSolveDeg...
Definition BundleObservationSolveSettings.cpp:914
static CSMSolveOption stringToCSMSolveOption(QString option)
Convert a string to a CSM solve option enumeration value.
Definition BundleObservationSolveSettings.cpp:470
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:791
bool solvePositionOverHermite() const
Whether or not the polynomial for solving will be fit over an existing Hermite spline.
Definition BundleObservationSolveSettings.cpp:1175
QStringList csmParameterList() const
Get the list of CSM parameters to solve for.
Definition BundleObservationSolveSettings.cpp:695
SpicePosition::Source positionInterpolationType() const
Accesses the SpicePosition interpolation type for the spacecraft position.
Definition BundleObservationSolveSettings.cpp:1195
QSet< QString > observationNumbers() const
Returns a list of observation numbers associated with these solve settings.
Definition BundleObservationSolveSettings.cpp:452
static QString instrumentPositionSolveOptionToString(InstrumentPositionSolveOption option)
Translates an enumerated InstrumentPositionSolveOption to its string representation.
Definition BundleObservationSolveSettings.cpp:1025
int numberCameraAngleCoefficientsSolved() const
Accesses the number of camera angle coefficients in the solution.
Definition BundleObservationSolveSettings.cpp:924
bool removeObservationNumber(QString observationNumber)
Removes an observation number from this solve settings.
Definition BundleObservationSolveSettings.cpp:442
int spkSolveDegree() const
Accesses the degree of thecamera position polynomial being fit to in the bundle adjustment (spkSolveD...
Definition BundleObservationSolveSettings.cpp:1154
InstrumentPointingSolveOption instrumentPointingSolveOption() const
Accesses the instrument pointing solve option.
Definition BundleObservationSolveSettings.cpp:883
void setCSMSolveParameterList(QStringList list)
Set an explicit list of CSM parameters to solve for.
Definition BundleObservationSolveSettings.cpp:653
InstrumentPointingSolveOption
Options for how to solve for instrument pointing.
Definition BundleObservationSolveSettings.h:126
@ AnglesVelocity
Solve for pointing angles and their angular velocities.
Definition BundleObservationSolveSettings.h:130
@ AnglesVelocityAcceleration
Solve for pointing angles, their velocities and their accelerations.
Definition BundleObservationSolveSettings.h:131
@ AllPointingCoefficients
Solve for all coefficients in the polynomials fit to the pointing angles.
Definition BundleObservationSolveSettings.h:133
@ AnglesOnly
Solve for pointing angles: right ascension, declination and, optionally, twist.
Definition BundleObservationSolveSettings.h:128
@ NoPointingFactors
Solve for none of the pointing factors.
Definition BundleObservationSolveSettings.h:127
int spkDegree() const
Accesses the degree of the polynomial fit to the original camera position (spkDegree).
Definition BundleObservationSolveSettings.cpp:1143
static csm::param::Type stringToCSMSolveType(QString type)
Convert a string to its CSM parameter type enumeration value.
Definition BundleObservationSolveSettings.cpp:576
File name manipulation and expansion.
Definition FileName.h:100
The main project for ipce.
Definition Project.h:289
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
XML Handler that parses XMLs in a stack-oriented way.
Definition XmlStackedHandler.h:118
Manage a stack of content handlers for reading XML files.
Definition XmlStackedHandlerReader.h:30
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:293