Isis 3 Programmer Reference
TargetBody.h
Go to the documentation of this file.
1 #ifndef TargetBody_h
2 #define TargetBody_h
3 
27 #include <vector>
28 
29 #include <QList>
30 #include <QObject>
31 #include <QSharedPointer>
32 #include <QString>
33 
34 #include <SpiceUsr.h>
35 #include <SpiceZfc.h>
36 #include <SpiceZmc.h>
37 
38 #include "Angle.h"
39 //#include "BundleTargetBody.h"
40 #include "Distance.h"
41 #include "Target.h"
42 #include "XmlStackedHandler.h"
43 
44 
45 class QDataStream;
46 class QUuid;
47 class QXmlStreamWriter;
48 
49 namespace Isis {
50  //class Distance;
51  class FileName;
52  class Project; // TODO: does xml stuff need project???
53  class PvlObject;
54  class TargetBodyDisplayProperties;
55  class XmlStackedHandlerReader;
56 
80  class TargetBody : public QObject {
81 
82  Q_OBJECT
83 
84  public:
85  TargetBody(Target *target, QObject *parent = 0);
86  //TargetBody(BundleTargetBodyQsp bundleTargetBody, QObject *parent = 0);
87 // TargetBody(Project *project, XmlStackedHandlerReader *xmlReader,
88 // QObject *parent = 0); // TODO: does xml stuff need project???
89  ~TargetBody();
90 
91  bool operator==(const TargetBody &src) const;
92 
95 
96  QString id() const;
97  QString targetName();
98 // void deleteFromDisk();
99 
100  int frameType();
101 
102  std::vector<Angle> poleRaCoefs();
103  std::vector<Angle> poleDecCoefs();
104  std::vector<Angle> pmCoefs();
105 
106  std::vector<double> poleRaNutPrecCoefs();
107  std::vector<double> poleDecNutPrecCoefs();
108 
109  std::vector<double> pmNutPrecCoefs();
110 
111  std::vector<Angle> sysNutPrecConstants();
112  std::vector<Angle> sysNutPrecCoefs();
113 
114  SpiceInt naifBodyCode() const;
115  SpiceInt naifPlanetSystemCode() const;
116  QString naifPlanetSystemName() const;
117  Distance radiusA() const;
118  Distance radiusB() const;
119  Distance radiusC() const;
120  Distance meanRadius() const;
121  Distance sigmaRadiusA() const;
122  Distance sigmaRadiusB() const;
123  Distance sigmaRadiusC() const;
124  Distance sigmaMeanRadius() const;
125 
126 // void save(QXmlStreamWriter &stream, const Project *project, FileName newProjectRoot) const;
127 // TODO: does xml stuff need project and newRoot???
128 // void save(QXmlStreamWriter &stream, const Project *project) const;
129 // TODO: does xml stuff need project???
130 //
131 // QDataStream &write(QDataStream &stream) const;
132 // QDataStream &read(QDataStream &stream);
133 
134  private:
141 // class XmlHandler : public XmlStackedHandler {
142 // public:
143 // XmlHandler(TargetBody *TargetBody, Project *project);
144 // TODO: does xml stuff need project???
145 // ~XmlHandler();
146 //
147 // virtual bool startElement(const QString &namespaceURI, const QString &localName,
148 // const QString &qName, const QXmlAttributes &atts);
149 // virtual bool characters(const QString &ch);
150 // virtual bool endElement(const QString &namespaceURI, const QString &localName,
151 // const QString &qName);
152 //
153 // private:
154 // Q_DISABLE_COPY(XmlHandler);
155 //
156 // TargetBody *m_xmlHandlerTargetBody;
157 // Project *m_xmlHandlerProject; // TODO: does xml stuff need project???
158 // QString m_xmlHandlerCharacters;
159 // };
160 
161  private:
162  TargetBody(const TargetBody &other); // NOTE: copy constructor & assignment operators
163  TargetBody &operator=(const TargetBody &rhs); // are private so compiler will generate error
164  // if trying to use them (because parent is
165  // QObject which uses Q_DISABLE_COPY macro
166  //testing
167  TargetQsp m_isisTarget;
168 
173  QUuid *m_id;
174 
178  QString m_targetName;
179 
185  SpiceInt *m_bodyCode;
186 
190  SpiceInt *m_systemCode;
191 
195  QString m_systemName;
196 
200  std::vector<Distance> m_radii;
201 
205  std::vector<Distance> m_sigmaRadii;
206 
211 
213 
214  // The next three vectors will have length 3 (for a quadratic polynomial) if used.
215  std::vector<Angle> m_raPole;
216  std::vector<Angle> m_decPole;
217  std::vector<Angle> m_pm ;
218  //
219  // Currently multiples (terms with periods matching other terms but varying amplitudes)
220  // are handled as additional terms added to the end of the vector as Naif does (see
221  // comments in any of the standard Naif PCK.
222  std::vector<double> m_raNutPrec;
223  std::vector<double> m_decNutPrec;
224  std::vector<double> m_pmNutPrec;
225 
226  // The periods of bodies in the same system are modeled with a linear equation
227  std::vector<Angle> m_sysNutPrec0;
228  std::vector<Angle> m_sysNutPrec1;
229  };
230 
232 
233  //
234 
235  // operators to read/write TargetBody to/from binary data
236  QDataStream &operator<<(QDataStream &stream, const TargetBody &TargetBody);
237  QDataStream &operator>>(QDataStream &stream, TargetBody &TargetBody);
238 };
239 
241 
242 #endif // TargetBody_h
std::vector< double > m_pmNutPrec
Coefficients of prime meridian nut/prec terms.
Definition: TargetBody.h:224
std::vector< Angle > m_sysNutPrec0
Constants of planetary system nut/prec periods.
Definition: TargetBody.h:227
TargetBodyDisplayProperties * m_displayProperties
The GUI information for how this Target will be displayed.
Definition: TargetBody.h:210
Container class for TargetBody.
Definition: TargetBody.h:80
std::vector< Angle > sysNutPrecCoefs()
Returns Linear terms of planetary system nut/prec periods.
Definition: TargetBody.cpp:294
std::vector< Angle > sysNutPrecConstants()
Returns constants of planetary system nut/prec periods.
Definition: TargetBody.cpp:286
SpiceInt * m_systemCode
The NaifBodyCode system code.
Definition: TargetBody.h:190
int m_frametype
Fill this in when Debbie or Ken tell me what it is returning.
Definition: TargetBody.h:212
int frameType()
Returns the frame type.
Definition: TargetBody.cpp:223
bool operator==(const TargetBody &src) const
Compares two Target Body objects to see if they are equal.
Definition: TargetBody.cpp:173
~TargetBody()
The second constructor for this class.
Definition: TargetBody.cpp:141
std::vector< Angle > poleDecCoefs()
Returns coefficients of a quadratic polynomial fitting pole dec.
Definition: TargetBody.cpp:241
SpiceInt naifBodyCode() const
This returns the NAIF body code of the target.
Definition: TargetBody.cpp:305
This is the GUI communication mechanism for target body objects.
QString naifPlanetSystemName() const
This returns the body name of the target&#39;s planet system.
Definition: TargetBody.cpp:327
std::vector< Angle > m_raPole
Coefficients of a quadratic polynomial fitting pole ra.
Definition: TargetBody.h:215
SpiceInt naifPlanetSystemCode() const
This returns the NAIF body code of the target&#39;s planet system.
Definition: TargetBody.cpp:316
Q_DECLARE_METATYPE(Isis::Cube *)
This allows Cube *&#39;s to be stored in a QVariant.
TargetBodyDisplayProperties * displayProperties()
Gets TargetBodyDisplayProperties.
Definition: TargetBody.cpp:195
Unless noted otherwise, the portions of Isis written by the USGS are public domain.
std::vector< double > poleDecNutPrecCoefs()
TargetBody::poleDecNutPrecCoefs.
Definition: TargetBody.cpp:268
std::vector< double > poleRaNutPrecCoefs()
Returns coefficients of pole right ascension nut/prec terms.
Definition: TargetBody.cpp:259
Distance measurement, usually in meters.
Definition: Distance.h:47
std::vector< Angle > m_sysNutPrec1
Linear terms of planetary system nut/prec periods.
Definition: TargetBody.h:228
std::vector< Angle > m_pm
Coefficients of a quadratic polynomial fitting pole pm.
Definition: TargetBody.h:217
std::vector< Distance > m_sigmaRadii
target radii sigmas
Definition: TargetBody.h:205
Distance sigmaMeanRadius() const
Returns the mean radius sigma.
Definition: TargetBody.cpp:411
SpiceInt * m_bodyCode
TODO - RETHINK MEMBER VARIABLES AND METHODS The NaifBodyCode value, if it exists in the cube labels...
Definition: TargetBody.h:185
Distance sigmaRadiusC() const
Returns the "c" radius sigma.
Definition: TargetBody.cpp:387
Distance meanRadius() const
Returns the mean radius.
Definition: TargetBody.cpp:397
TargetBody(Target *target, QObject *parent=0)
The first constructor for this class.
Definition: TargetBody.cpp:23
QString id() const
Output format:
Definition: TargetBody.cpp:580
QSharedPointer< TargetBody > TargetBodyQsp
Defines A smart pointer to a TargetBody obj.
Definition: TargetBody.h:231
std::istream & operator>>(std::istream &is, CSVReader &csv)
Input read operator for input stream sources.
Definition: CSVReader.cpp:463
Distance sigmaRadiusB() const
Returns "b" radius sigma.
Definition: TargetBody.cpp:367
std::vector< double > pmNutPrecCoefs()
Returns coefficients of the prime meridian nut/prec terms.
Definition: TargetBody.cpp:277
QString m_targetName
The TargetName as it appears in the original cube.
Definition: TargetBody.h:178
This class is used to create and store valid Isis3 targets.
Definition: Target.h:76
QUuid * m_id
A unique ID for this TargetBody object (useful for others to reference this object when saving to dis...
Definition: TargetBody.h:173
std::vector< Angle > poleRaCoefs()
TargetBody::poleRaCoefs.
Definition: TargetBody.cpp:232
Distance sigmaRadiusA() const
Returns "a" radius sigma.
Definition: TargetBody.cpp:347
Distance radiusA() const
Returns "a" radius.
Definition: TargetBody.cpp:337
std::vector< Distance > m_radii
target radii
Definition: TargetBody.h:200
std::vector< Angle > m_decPole
Coefficients of a quadratic polynomial fitting pole dec.
Definition: TargetBody.h:216
Namespace for ISIS/Bullet specific routines.
Definition: Apollo.h:31
Distance radiusB() const
Returns "b" radius.
Definition: TargetBody.cpp:357
QString targetName()
Returns the value stored at TargetName in the original pvl label.
Definition: TargetBody.cpp:214
std::vector< double > m_decNutPrec
Coefficients of pole decliniation nut/prec terms.
Definition: TargetBody.h:223
QString m_systemName
The NaifBodyCode system name.
Definition: TargetBody.h:195
std::vector< double > m_raNutPrec
Coefficients of pole right ascension nut/prec terms.
Definition: TargetBody.h:222
QDebug operator<<(QDebug debug, const Hillshade &hillshade)
Print this class out to a QDebug object.
Definition: Hillshade.cpp:308
std::vector< Angle > pmCoefs()
Returns coefficients of a quadratic polynomial fitting pole pm.
Definition: TargetBody.cpp:250
Distance radiusC() const
Returns the "c" radius.
Definition: TargetBody.cpp:377