Isis 3 Programmer Reference
BundleObservationSolveSettings.h
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:
201 public:
202 // TODO: does xml stuff need 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;
227 QSet<QString> m_observationNumbers;
228
229 // CSM related parameters
231 csm::param::Set m_csmSolveSet;
233 csm::param::Type m_csmSolveType;
238 // pointing related parameters
250 QList<double> m_anglesAprioriSigma;
264 // position related parameters
290 };
293 typedef QSharedPointer<BundleObservationSolveSettings> BundleObservationSolveSettingsQsp;
294};
295
296#endif // BundleObservationSolveSettings_h
XmlHandler(BundleObservationSolveSettings *settings, Project *project)
Constructs an XmlHandler for serialization.
virtual bool endElement(const QString &namespaceURI, const QString &localName, const QString &qName)
virtual bool startElement(const QString &namespaceURI, const QString &localName, const QString &qName, const QXmlAttributes &atts)
This class is used to modify and manage solve settings for 1 to many BundleObservations.
CSMSolveOption
Options for how to solve for CSM parameters.
@ NoCSMParameters
Do not solve for CSM parameters.
@ List
Solve for an explicit list of CSM parameters.
static InstrumentPointingSolveOption stringToInstrumentPointingSolveOption(QString option)
Translates a QString InstrumentPointingSolveOption to its enumerated value.
InstrumentPositionSolveOption
Options for how to solve for instrument position.
@ PositionVelocity
Solve for instrument positions and velocities.
@ PositionVelocityAcceleration
Solve for instrument positions, velocities, and accelerations.
@ AllPositionCoefficients
Solve for all coefficients in the polynomials fit to the instrument positions.
@ PositionOnly
Solve for instrument positions only.
@ NoPositionFactors
Solve for none of the position factors.
static QString csmSolveTypeToString(csm::param::Type type)
Convert a CSM parameter type enumeration value to a string.
csm::param::Type m_csmSolveType
The CSM parameter type to solve for.
SpicePosition::Source m_positionInterpolationType
SpicePosition interpolation types.
CSMSolveOption csmSolveOption() const
Get how the CSM parameters to solve for are specified for this observation.
CSMSolveOption m_csmSolveOption
How the CSM solution is specified.
void addObservationNumber(QString observationNumber)
Associates an observation number with these solve settings.
InstrumentPositionSolveOption instrumentPositionSolveOption() const
Accesses the instrument position solve option.
int m_numberCamAngleCoefSolved
The number of camera angle coefficients in solution.
void initialize()
Initializes the default state of this BundleObservationSolveSettings.
bool solveTwist() const
Accesses the flag for solving for twist.
void setCSMSolveType(csm::param::Type type)
Set the type of CSM parameters to solve for.
static QString csmSolveOptionToString(CSMSolveOption option)
Convert a CSM solve option enumeration value to a string.
int m_numberCamPosCoefSolved
The number of camera position coefficients in the solution.
BundleObservationSolveSettings & operator=(const BundleObservationSolveSettings &src)
Assigns the state of another BundleObservationSolveSettings to this one.
static csm::param::Set stringToCSMSolveSet(QString set)
Convert a string to its CSM parameter set enumeration value.
csm::param::Set csmParameterSet() const
Get the set of CSM parameters to solve for.
bool m_solvePositionOverHermiteSpline
The polynomial will be fit over an existing Hermite spline.
void setCSMSolveSet(csm::param::Set set)
Set the set of CSM parameters to solve for.
SpiceRotation::Source m_pointingInterpolationType
SpiceRotation interpolation type.
QSet< QString > m_observationNumbers
Associated observation numbers for these settings.
bool solvePolyOverPointing() const
Whether or not the solve polynomial will be fit over the existing pointing polynomial.
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.
int m_spkDegree
Degree of the polynomial fit to the original camera position.
int numberCameraPositionCoefficientsSolved() const
Accesses the number of camera position coefficients in the solution.
void setInstrumentId(QString instrumentId)
Sets the instrument id for this observation.
QString m_instrumentId
The spacecraft instrument id for this observation.
void save(QXmlStreamWriter &stream, const Project *project) const
Saves this BundleObservationSolveSettings to an xml stream.
BundleObservationSolveSettings()
Constructor with default parameter initializations.
int ckDegree() const
Accesses the degree of polynomial fit to original camera angles (ckDegree).
QString instrumentId() const
Accesses the instrument id for this observation.
csm::param::Type csmParameterType() const
Get the type of CSM parameters to solve for.
QList< double > aprioriPositionSigmas() const
Accesses the a priori position sigmas.
QList< double > m_anglesAprioriSigma
The image position a priori sigmas.The size of the list is equal to the number of coefficients in the...
InstrumentPointingSolveOption m_instrumentPointingSolveOption
Option for how to solve for instrument pointing.
int m_spkSolveDegree
Degree of the camera position polynomial being fit to in the bundle adjustment.
static QString instrumentPointingSolveOptionToString(InstrumentPointingSolveOption option)
Tranlsates an enumerated InstrumentPointingSolveOption value to its string representation.
QList< double > aprioriPointingSigmas() const
Accesses the a priori pointing sigmas.
static InstrumentPositionSolveOption stringToInstrumentPositionSolveOption(QString option)
Translates a QString InstrumentPositionSolveOption to its enumerated value.
SpiceRotation::Source pointingInterpolationType() const
Accesses the SpiceRotation interpolation type for the instrument pointing.
static QString csmSolveSetToString(csm::param::Set set)
Convert a CSM parameter set enumeration value to a string.
int ckSolveDegree() const
Accesses the degree of the camera angles polynomial being fit to in the bundle adjustment (ckSolveDeg...
bool m_solvePointingPolynomialOverExisting
The polynomial will be fit over the existing pointing polynomial.
static CSMSolveOption stringToCSMSolveOption(QString option)
Convert a string to a CSM solve option enumeration value.
csm::param::Set m_csmSolveSet
The CSM parameter set to solve for.
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.
bool solvePositionOverHermite() const
Whether or not the polynomial for solving will be fit over an existing Hermite spline.
InstrumentPositionSolveOption m_instrumentPositionSolveOption
Option for how to solve for instrument position.
QList< double > m_positionAprioriSigma
The instrument pointing a priori sigmas.
QStringList csmParameterList() const
Get the list of CSM parameters to solve for.
int m_ckSolveDegree
Degree of the camera angles polynomial being fit to in the bundle adjustment.
SpicePosition::Source positionInterpolationType() const
Accesses the SpicePosition interpolation type for the spacecraft position.
QSet< QString > observationNumbers() const
Returns a list of observation numbers associated with these solve settings.
static QString instrumentPositionSolveOptionToString(InstrumentPositionSolveOption option)
Translates an enumerated InstrumentPositionSolveOption to its string representation.
int numberCameraAngleCoefficientsSolved() const
Accesses the number of camera angle coefficients in the solution.
bool removeObservationNumber(QString observationNumber)
Removes an observation number from this solve settings.
int spkSolveDegree() const
Accesses the degree of thecamera position polynomial being fit to in the bundle adjustment (spkSolveD...
QUuid * m_id
A unique ID for this object (useful for others to reference this object when saving to disk).
InstrumentPointingSolveOption instrumentPointingSolveOption() const
Accesses the instrument pointing solve option.
void setCSMSolveParameterList(QStringList list)
Set an explicit list of CSM parameters to solve for.
QStringList m_csmSolveList
The names of the CSM parameters to solve for.
int m_ckDegree
Degree of the polynomial fit to the original camera angles.
InstrumentPointingSolveOption
Options for how to solve for instrument pointing.
@ AnglesVelocity
Solve for pointing angles and their angular velocities.
@ AnglesVelocityAcceleration
Solve for pointing angles, their velocities and their accelerations.
@ AllPointingCoefficients
Solve for all coefficients in the polynomials fit to the pointing angles.
@ AnglesOnly
Solve for pointing angles: right ascension, declination and, optionally, twist.
@ NoPointingFactors
Solve for none of the pointing factors.
int spkDegree() const
Accesses the degree of the polynomial fit to the original camera position (spkDegree).
static csm::param::Type stringToCSMSolveType(QString type)
Convert a string to its CSM parameter type enumeration value.
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.
Source
The rotation can come from one of 3 places for an Isis cube.
XML Handler that parses XMLs in a stack-oriented way.
Manage a stack of content handlers for reading XML files.
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...