Isis 3.0 Programmer Reference
Back | Home
BundleObservationSolveSettings.h
Go to the documentation of this file.
1 #ifndef BundleObservationSolveSettings_h
2 #define BundleObservationSolveSettings_h
3 
26 #include <QList>
27 #include <QSet>
28 #include <QString>
29 
30 #include "SpicePosition.h"
31 #include "SpiceRotation.h"
32 #include "XmlStackedHandler.h"
33 
34 class QDataStream;
35 class QUuid;
36 class QXmlStreamWriter;
37 
38 namespace Isis {
39  class FileName;
40  class Project; // TODO: does xml stuff need project???
41  class PvlObject;
42  class XmlStackedHandlerReader;
85 
86  public:
89  XmlStackedHandlerReader *xmlReader); // TODO: does xml stuff need project???
91  Project *project,
92  XmlStackedHandlerReader *xmlReader); // TODO: does xml stuff need project???
96  void initialize();
97 
98  PvlObject pvlObject(QString name = "") const; // Default name is instrument ID.
99 
100  void setInstrumentId(QString instrumentId);
101  QString instrumentId() const;
102  void addObservationNumber(QString observationNumber);
104 
105 
106 
117  };
118 
122  bool solveTwist,
123  int ckDegree = 2,
124  int ckSolveDegree = 2,
125  bool solvePolynomialOverExisting = false,
126  double anglesAprioriSigma = -1.0,
127  double angularVelocityAprioriSigma = -1.0,
128  double angularAccelerationAprioriSigma = -1.0);
130  bool solveTwist() const;
131  int ckDegree() const;
132  int ckSolveDegree() const;
134  bool solvePolyOverPointing() const;
137 
138 
139 
149  };
150 
154  int spkDegree = 2,
155  int spkSolveDegree = 2,
156  bool positionOverHermite = false,
157  double positionAprioriSigma = -1.0,
158  double velocityAprioriSigma = -1.0,
159  double accelerationAprioriSigma = -1.0);
161  int spkDegree() const;
162  int spkSolveDegree() const;
164  bool solvePositionOverHermite() const;
167 
168  // TODO: does xml stuff need project???
169  void save(QXmlStreamWriter &stream, const Project *project) const;
170  QDataStream &write(QDataStream &stream) const;
171  QDataStream &read(QDataStream &stream);
172 
173  private:
181  class XmlHandler : public XmlStackedHandler {
182  public:
183  // TODO: does xml stuff need project???
185  ~XmlHandler();
186 
187  virtual bool startElement(const QString &namespaceURI, const QString &localName,
188  const QString &qName, const QXmlAttributes &atts);
189  virtual bool characters(const QString &ch);
190  virtual bool endElement(const QString &namespaceURI, const QString &localName,
191  const QString &qName);
192 
193  private:
194  Q_DISABLE_COPY(XmlHandler);
195 
196  BundleObservationSolveSettings *m_xmlHandlerObservationSettings;
197  Project *m_xmlHandlerProject; // TODO: does xml stuff need project???
198  QString m_xmlHandlerCharacters;
199  QStringList m_xmlHandlerAprioriSigmas;
200  };
201 
206  QUuid *m_id;
207  QString m_instrumentId;
209 
210  // pointing related parameters
236  // position related parameters
262  };
265  typedef QSharedPointer<BundleObservationSolveSettings> BundleObservationSolveSettingsQsp;
266 
267  // Operators to read/write BundleResults to/from binary data.
268  QDataStream &operator<<(QDataStream &stream, const BundleObservationSolveSettings &settings);
269  QDataStream &operator>>(QDataStream &stream, BundleObservationSolveSettings &settings);
270 };
271 
272 #endif // BundleObservationSolveSettings_h
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)
Sets the instrument pointing settings.
static InstrumentPointingSolveOption stringToInstrumentPointingSolveOption(QString option)
Translates a QString InstrumentPointingSolveOption to its enumerated value.
The main project for cnetsuite.
Definition: Project.h:105
QList< double > aprioriPointingSigmas() const
Accesses the a priori pointing sigmas.
int spkSolveDegree() const
Accesses the degree of thecamera position polynomial being fit to in the bundle adjustment (spkSolveD...
int m_ckSolveDegree
Degree of the camera angles polynomial being fit to in the bundle adjustment.
File name manipulation and expansion.
Definition: FileName.h:111
void save(QXmlStreamWriter &stream, const Project *project) const
Saves this BundleObservationSolveSettings to an xml stream.
QSharedPointer< BundleObservationSolveSettings > BundleObservationSolveSettingsQsp
Definition for BundleObservationSolveSettingsQsp, a QSharedPointer to a &lt; BundleObservationSolveSet...
QDataStream & read(QDataStream &stream)
Reads in the state of a BundleObservationSolveSettings from a stream.
int numberCameraAngleCoefficientsSolved() const
Accesses the number of camera angle coefficients in the solution.
bool m_solvePositionOverHermiteSpline
The polynomial will be fit over an existing Hermite spline.
InstrumentPositionSolveOption instrumentPositionSolveOption() const
Accesses the instrument position solve option.
bool solvePositionOverHermite() const
Whether or not the polynomial for solving will be fit over an existing Hermite spline.
XmlHandler(BundleObservationSolveSettings *settings, Project *project)
Constructs an XmlHandler for serialization.
void initialize()
Initializes the default state of this BundleObservationSolveSettings.
int numberCameraPositionCoefficientsSolved() const
Accesses the number of camera position coefficients in the solution.
Solve for pointing angles, their velocities and their accelerations.
QString m_instrumentId
The spacecraft instrument id for this observation.
bool solveTwist() const
Accesses the flag for solving for twist.
int m_spkSolveDegree
Degree of the camera position polynomial being fit to in the bundle adjustment.
int m_numberCamAngleCoefSolved
The number of camera angle coefficients in solution.
BundleObservationSolveSettings()
Constructor with default parameter initializations.
QList< double > m_positionAprioriSigma
The instrument pointing a priori sigmas.
Solve for all coefficients in the polynomials fit to the instrument positions.
SpicePosition::Source m_positionInterpolationType
SpicePosition interpolation types.
void addObservationNumber(QString observationNumber)
Associates an observation number with these solve settings.
virtual bool startElement(const QString &namespaceURI, const QString &localName, const QString &qName, const QXmlAttributes &atts)
bool m_solvePointingPolynomialOverExisting
The polynomial will be fit over the existing pointing polynomial.
std::istream & operator>>(std::istream &is, CSVReader &csv)
Input read operator for input stream sources.
Definition: CSVReader.cpp:463
PvlObject pvlObject(QString name="") const
Serializes this BundleObservationSolveSettings into a PvlObject.
static QString instrumentPointingSolveOptionToString(InstrumentPointingSolveOption option)
Tranlsates an enumerated InstrumentPointingSolveOption value to its string representation.
SpiceRotation::Source pointingInterpolationType() const
Accesses the SpiceRotation interpolation type for the instrument pointing.
XML Handler that parses XMLs in a stack-oriented way.
int ckSolveDegree() const
Accesses the degree of the camera angles polynomial being fit to in the bundle adjustment (ckSolveDeg...
QDataStream & write(QDataStream &stream) const
Writes this BundleObservationSolveSettings to a stream.
InstrumentPointingSolveOption instrumentPointingSolveOption() const
Accesses the instrument pointing solve option.
Source
The rotation can come from one of 3 places for an Isis cube.
void setInstrumentId(QString instrumentId)
Sets the instrument id for this observation.
QList< double > aprioriPositionSigmas() const
Accesses the a priori position sigmas.
InstrumentPositionSolveOption m_instrumentPositionSolveOption
Option for how to solve for instrument position.
This class is used to modify and manage solve settings for 1 to many BundleObservations.
Solve for instrument positions, velocities, and accelerations.
QSet< QString > observationNumbers() const
Returns a list of observation numbers associated with these solve settings.
QList< double > m_anglesAprioriSigma
The image position a priori sigmas.The size of the list is equal to the number of coefficients in the...
Solve for pointing angles and their angular velocities.
int m_spkDegree
Degree of the polynomial fit to the original camera position.
virtual bool endElement(const QString &namespaceURI, const QString &localName, const QString &qName)
bool m_solveTwist
Solve for &quot;twist&quot; angle.
QString instrumentId() const
Accesses the instrument id for this observation.
InstrumentPointingSolveOption m_instrumentPointingSolveOption
Option for how to solve for instrument pointing.
int m_numberCamPosCoefSolved
The number of camera position coefficients in the solution.
InstrumentPositionSolveOption
Options for how to solve for instrument position.
static InstrumentPositionSolveOption stringToInstrumentPositionSolveOption(QString option)
Translates a QString InstrumentPositionSolveOption to its enumerated value.
Solve for all coefficients in the polynomials fit to the pointing angles.
InstrumentPointingSolveOption
Options for how to solve for instrument pointing.
SpiceRotation::Source m_pointingInterpolationType
SpiceRotation interpolation type.
QSet< QString > m_observationNumbers
Associated observation numbers for these settings.
SpicePosition::Source positionInterpolationType() const
Accesses the SpicePosition interpolation type for the spacecraft position.
QDebug operator<<(QDebug debug, const Hillshade &hillshade)
Print this class out to a QDebug object.
Definition: Hillshade.cpp:308
static QString instrumentPositionSolveOptionToString(InstrumentPositionSolveOption option)
Translates an enumerated InstrumentPositionSolveOption to its string representation.
int m_ckDegree
Degree of the polynomial fit to the original camera angles.
Contains Pvl Groups and Pvl Objects.
Definition: PvlObject.h:74
bool solvePolyOverPointing() const
Whether or not the solve polynomial will be fit over the existing pointing polynomial.
his enables stack-based XML parsing of XML files.
Solve for pointing angles: right ascension, declination and, optionally, twist.
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)
Sets the instrument pointing settings.
QUuid * m_id
A unique ID for this object (useful for others to reference this object when saving to disk)...
int spkDegree() const
Accesses the degree of the polynomial fit to the original camera position (spkDegree).
int ckDegree() const
Accesses the degree of polynomial fit to original camera angles (ckDegree).
Source
This enum indicates the status of the object.
BundleObservationSolveSettings & operator=(const BundleObservationSolveSettings &src)
Assigns the state of another BundleObservationSolveSettings to this one.

U.S. Department of the Interior | U.S. Geological Survey
ISIS | Privacy & Disclaimers | Astrogeology Research Program
To contact us, please post comments and questions on the ISIS Support Center
File Modified: 07/12/2023 23:15:09