Isis 3 Programmer Reference
TargetBody.h
1 #ifndef TargetBody_h
2 #define TargetBody_h
3 
10 /* SPDX-License-Identifier: CC0-1.0 */
11 
12 #include <vector>
13 
14 #include <QList>
15 #include <QObject>
16 #include <QSharedPointer>
17 #include <QString>
18 
19 #include <SpiceUsr.h>
20 #include <SpiceZfc.h>
21 #include <SpiceZmc.h>
22 
23 #include "Angle.h"
24 //#include "BundleTargetBody.h"
25 #include "Distance.h"
26 #include "Target.h"
27 #include "XmlStackedHandler.h"
28 
29 
30 class QDataStream;
31 class QUuid;
32 class QXmlStreamWriter;
33 
34 namespace Isis {
35  //class Distance;
36  class FileName;
37  class Project; // TODO: does xml stuff need project???
38  class PvlObject;
39  class TargetBodyDisplayProperties;
40  class XmlStackedHandlerReader;
41 
65  class TargetBody : public QObject {
66 
67  Q_OBJECT
68 
69  public:
70  TargetBody(Target *target, QObject *parent = 0);
71  //TargetBody(BundleTargetBodyQsp bundleTargetBody, QObject *parent = 0);
72 // TargetBody(Project *project, XmlStackedHandlerReader *xmlReader,
73 // QObject *parent = 0); // TODO: does xml stuff need project???
74  ~TargetBody();
75 
76  bool operator==(const TargetBody &src) const;
77 
80 
81  QString id() const;
82  QString targetName();
83 // void deleteFromDisk();
84 
85  int frameType();
86 
87  std::vector<Angle> poleRaCoefs();
88  std::vector<Angle> poleDecCoefs();
89  std::vector<Angle> pmCoefs();
90 
91  std::vector<double> poleRaNutPrecCoefs();
92  std::vector<double> poleDecNutPrecCoefs();
93 
94  std::vector<double> pmNutPrecCoefs();
95 
96  std::vector<Angle> sysNutPrecConstants();
97  std::vector<Angle> sysNutPrecCoefs();
98 
99  SpiceInt naifBodyCode() const;
100  SpiceInt naifPlanetSystemCode() const;
101  QString naifPlanetSystemName() const;
102  Distance radiusA() const;
103  Distance radiusB() const;
104  Distance radiusC() const;
105  Distance meanRadius() const;
106  Distance sigmaRadiusA() const;
107  Distance sigmaRadiusB() const;
108  Distance sigmaRadiusC() const;
109  Distance sigmaMeanRadius() const;
110 
111 // void save(QXmlStreamWriter &stream, const Project *project, FileName newProjectRoot) const;
112 // TODO: does xml stuff need project and newRoot???
113 // void save(QXmlStreamWriter &stream, const Project *project) const;
114 // TODO: does xml stuff need project???
115 //
116 // QDataStream &write(QDataStream &stream) const;
117 // QDataStream &read(QDataStream &stream);
118 
119  private:
126 // class XmlHandler : public XmlStackedHandler {
127 // public:
128 // XmlHandler(TargetBody *TargetBody, Project *project);
129 // TODO: does xml stuff need project???
130 // ~XmlHandler();
131 //
132 // virtual bool startElement(const QString &namespaceURI, const QString &localName,
133 // const QString &qName, const QXmlAttributes &atts);
134 // virtual bool characters(const QString &ch);
135 // virtual bool endElement(const QString &namespaceURI, const QString &localName,
136 // const QString &qName);
137 //
138 // private:
139 // Q_DISABLE_COPY(XmlHandler);
140 //
141 // TargetBody *m_xmlHandlerTargetBody;
142 // Project *m_xmlHandlerProject; // TODO: does xml stuff need project???
143 // QString m_xmlHandlerCharacters;
144 // };
145 
146  private:
147  TargetBody(const TargetBody &other); // NOTE: copy constructor & assignment operators
148  TargetBody &operator=(const TargetBody &rhs); // are private so compiler will generate error
149  // if trying to use them (because parent is
150  // QObject which uses Q_DISABLE_COPY macro
151  //testing
152  TargetQsp m_isisTarget;
153 
158  QUuid *m_id;
159 
163  QString m_targetName;
164 
170  SpiceInt *m_bodyCode;
171 
175  SpiceInt *m_systemCode;
176 
180  QString m_systemName;
181 
185  std::vector<Distance> m_radii;
186 
190  std::vector<Distance> m_sigmaRadii;
191 
196 
198 
199  // The next three vectors will have length 3 (for a quadratic polynomial) if used.
200  std::vector<Angle> m_raPole;
201  std::vector<Angle> m_decPole;
202  std::vector<Angle> m_pm ;
203  //
204  // Currently multiples (terms with periods matching other terms but varying amplitudes)
205  // are handled as additional terms added to the end of the vector as Naif does (see
206  // comments in any of the standard Naif PCK.
207  std::vector<double> m_raNutPrec;
208  std::vector<double> m_decNutPrec;
209  std::vector<double> m_pmNutPrec;
210 
211  // The periods of bodies in the same system are modeled with a linear equation
212  std::vector<Angle> m_sysNutPrec0;
213  std::vector<Angle> m_sysNutPrec1;
214  };
215 
217 
218  //
219 
220  // operators to read/write TargetBody to/from binary data
221  QDataStream &operator<<(QDataStream &stream, const TargetBody &TargetBody);
222  QDataStream &operator>>(QDataStream &stream, TargetBody &TargetBody);
223 };
224 
226 
227 #endif // TargetBody_h
Isis::TargetBody
Container class for TargetBody.
Definition: TargetBody.h:65
Isis::TargetBody::m_systemName
QString m_systemName
The NaifBodyCode system name.
Definition: TargetBody.h:180
Isis::TargetBody::poleDecNutPrecCoefs
std::vector< double > poleDecNutPrecCoefs()
TargetBody::poleDecNutPrecCoefs.
Definition: TargetBody.cpp:268
Isis::operator<<
QDebug operator<<(QDebug debug, const Hillshade &hillshade)
Print this class out to a QDebug object.
Definition: Hillshade.cpp:314
Isis::TargetBodyDisplayProperties
This is the GUI communication mechanism for target body objects.
Definition: TargetBodyDisplayProperties.h:63
Isis::TargetBody::m_sysNutPrec1
std::vector< Angle > m_sysNutPrec1
Linear terms of planetary system nut/prec periods.
Definition: TargetBody.h:213
Isis::TargetBody::m_pm
std::vector< Angle > m_pm
Coefficients of a quadratic polynomial fitting pole pm.
Definition: TargetBody.h:202
Isis::TargetBody::frameType
int frameType()
Returns the frame type.
Definition: TargetBody.cpp:223
Isis::TargetBody::naifBodyCode
SpiceInt naifBodyCode() const
This returns the NAIF body code of the target.
Definition: TargetBody.cpp:305
Isis::TargetBody::~TargetBody
~TargetBody()
The second constructor for this class.
Definition: TargetBody.cpp:141
Isis::TargetBody::m_id
QUuid * m_id
A unique ID for this TargetBody object (useful for others to reference this object when saving to dis...
Definition: TargetBody.h:158
Isis::TargetBody::m_pmNutPrec
std::vector< double > m_pmNutPrec
Coefficients of prime meridian nut/prec terms.
Definition: TargetBody.h:209
Isis::TargetBody::m_displayProperties
TargetBodyDisplayProperties * m_displayProperties
The GUI information for how this Target will be displayed.
Definition: TargetBody.h:195
Isis::TargetBodyQsp
QSharedPointer< TargetBody > TargetBodyQsp
Defines A smart pointer to a TargetBody obj.
Definition: TargetBody.h:216
Isis::TargetBody::m_frametype
int m_frametype
Fill this in when Debbie or Ken tell me what it is returning.
Definition: TargetBody.h:197
Isis::TargetBody::poleRaNutPrecCoefs
std::vector< double > poleRaNutPrecCoefs()
Returns coefficients of pole right ascension nut/prec terms.
Definition: TargetBody.cpp:259
QSharedPointer< Target >
Isis::TargetBody::naifPlanetSystemName
QString naifPlanetSystemName() const
This returns the body name of the target's planet system.
Definition: TargetBody.cpp:327
Isis::TargetBody::sysNutPrecConstants
std::vector< Angle > sysNutPrecConstants()
Returns constants of planetary system nut/prec periods.
Definition: TargetBody.cpp:286
Isis::Distance
Distance measurement, usually in meters.
Definition: Distance.h:34
Isis::TargetBody::pmNutPrecCoefs
std::vector< double > pmNutPrecCoefs()
Returns coefficients of the prime meridian nut/prec terms.
Definition: TargetBody.cpp:277
Isis::TargetBody::poleDecCoefs
std::vector< Angle > poleDecCoefs()
Returns coefficients of a quadratic polynomial fitting pole dec.
Definition: TargetBody.cpp:241
Isis::TargetBody::m_raNutPrec
std::vector< double > m_raNutPrec
Coefficients of pole right ascension nut/prec terms.
Definition: TargetBody.h:207
Isis::TargetBody::sigmaRadiusC
Distance sigmaRadiusC() const
Returns the "c" radius sigma.
Definition: TargetBody.cpp:387
Isis::TargetBody::naifPlanetSystemCode
SpiceInt naifPlanetSystemCode() const
This returns the NAIF body code of the target's planet system.
Definition: TargetBody.cpp:316
Isis::TargetBody::meanRadius
Distance meanRadius() const
Returns the mean radius.
Definition: TargetBody.cpp:397
Isis::TargetBody::m_raPole
std::vector< Angle > m_raPole
Coefficients of a quadratic polynomial fitting pole ra.
Definition: TargetBody.h:200
Isis::TargetBody::m_radii
std::vector< Distance > m_radii
target radii
Definition: TargetBody.h:185
Isis::TargetBody::sigmaRadiusB
Distance sigmaRadiusB() const
Returns "b" radius sigma.
Definition: TargetBody.cpp:367
Isis::TargetBody::m_sigmaRadii
std::vector< Distance > m_sigmaRadii
target radii sigmas
Definition: TargetBody.h:190
Isis::TargetBody::targetName
QString targetName()
Returns the value stored at TargetName in the original pvl label.
Definition: TargetBody.cpp:214
Isis::TargetBody::operator==
bool operator==(const TargetBody &src) const
Compares two Target Body objects to see if they are equal.
Definition: TargetBody.cpp:173
Isis::TargetBody::pmCoefs
std::vector< Angle > pmCoefs()
Returns coefficients of a quadratic polynomial fitting pole pm.
Definition: TargetBody.cpp:250
Isis::TargetBody::sysNutPrecCoefs
std::vector< Angle > sysNutPrecCoefs()
Returns Linear terms of planetary system nut/prec periods.
Definition: TargetBody.cpp:294
Isis::TargetBody::m_targetName
QString m_targetName
The TargetName as it appears in the original cube.
Definition: TargetBody.h:163
Isis::TargetBody::m_decNutPrec
std::vector< double > m_decNutPrec
Coefficients of pole decliniation nut/prec terms.
Definition: TargetBody.h:208
Isis::TargetBody::TargetBody
TargetBody(Target *target, QObject *parent=0)
The first constructor for this class.
Definition: TargetBody.cpp:23
Isis::TargetBody::id
QString id() const
Output format:
Definition: TargetBody.cpp:580
Isis::TargetBody::poleRaCoefs
std::vector< Angle > poleRaCoefs()
TargetBody::poleRaCoefs.
Definition: TargetBody.cpp:232
Isis::TargetBody::radiusA
Distance radiusA() const
Returns "a" radius.
Definition: TargetBody.cpp:337
Isis::TargetBody::displayProperties
TargetBodyDisplayProperties * displayProperties()
Gets TargetBodyDisplayProperties.
Definition: TargetBody.cpp:195
Isis::TargetBody::m_decPole
std::vector< Angle > m_decPole
Coefficients of a quadratic polynomial fitting pole dec.
Definition: TargetBody.h:201
Isis::TargetBody::radiusB
Distance radiusB() const
Returns "b" radius.
Definition: TargetBody.cpp:357
Isis::TargetBody::m_sysNutPrec0
std::vector< Angle > m_sysNutPrec0
Constants of planetary system nut/prec periods.
Definition: TargetBody.h:212
Isis::TargetBody::m_bodyCode
SpiceInt * m_bodyCode
TODO - RETHINK MEMBER VARIABLES AND METHODS The NaifBodyCode value, if it exists in the cube labels.
Definition: TargetBody.h:170
QObject
Isis::operator>>
std::istream & operator>>(std::istream &is, CSVReader &csv)
Input read operator for input stream sources.
Definition: CSVReader.cpp:447
Isis::Target
This class is used to create and store valid Isis targets.
Definition: Target.h:63
Isis::TargetBody::sigmaRadiusA
Distance sigmaRadiusA() const
Returns "a" radius sigma.
Definition: TargetBody.cpp:347
Isis::TargetBody::TargetBody
TargetBody(const TargetBody &other)
Isis::TargetBody::radiusC
Distance radiusC() const
Returns the "c" radius.
Definition: TargetBody.cpp:377
Isis::TargetBody::m_systemCode
SpiceInt * m_systemCode
The NaifBodyCode system code.
Definition: TargetBody.h:175
Isis::TargetBody::sigmaMeanRadius
Distance sigmaMeanRadius() const
Returns the mean radius sigma.
Definition: TargetBody.cpp:411
Isis
This is free and unencumbered software released into the public domain.
Definition: Apollo.h:16
Q_DECLARE_METATYPE
Q_DECLARE_METATYPE(Isis::PlotWindow *)
We have plot windows as QVariant data types, so here it's enabled.