Isis 3.0 Programmer Reference
Back | Home
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 
77  class TargetBody : public QObject {
78 
79  Q_OBJECT
80 
81  public:
82  TargetBody(Target *target, QObject *parent = 0);
83  //TargetBody(BundleTargetBodyQsp bundleTargetBody, QObject *parent = 0);
84 // TargetBody(Project *project, XmlStackedHandlerReader *xmlReader,
85 // QObject *parent = 0); // TODO: does xml stuff need project???
86  ~TargetBody();
87 
88  bool operator==(const TargetBody &src) const;
89 
92 
93  QString id() const;
94 // void deleteFromDisk();
95 
96  int frameType();
97 
98  std::vector<Angle> poleRaCoefs();
99  std::vector<Angle> poleDecCoefs();
100  std::vector<Angle> pmCoefs();
101 
102  std::vector<double> poleRaNutPrecCoefs();
103  std::vector<double> poleDecNutPrecCoefs();
104 
105  std::vector<double> pmNutPrecCoefs();
106 
107  std::vector<Angle> sysNutPrecConstants();
108  std::vector<Angle> sysNutPrecCoefs();
109 
110  SpiceInt naifBodyCode() const;
111  SpiceInt naifPlanetSystemCode() const;
112  QString naifPlanetSystemName() const;
113  Distance radiusA() const;
114  Distance radiusB() const;
115  Distance radiusC() const;
116  Distance meanRadius() const;
117  Distance sigmaRadiusA() const;
118  Distance sigmaRadiusB() const;
119  Distance sigmaRadiusC() const;
120  Distance sigmaMeanRadius() const;
121 
122 // void save(QXmlStreamWriter &stream, const Project *project, FileName newProjectRoot) const;
123 // TODO: does xml stuff need project and newRoot???
124 // void save(QXmlStreamWriter &stream, const Project *project) const;
125 // TODO: does xml stuff need project???
126 //
127 // QDataStream &write(QDataStream &stream) const;
128 // QDataStream &read(QDataStream &stream);
129 //
130 // void savehdf5(FileName outputfilename) const;
131 
132  private:
139 // class XmlHandler : public XmlStackedHandler {
140 // public:
141 // XmlHandler(TargetBody *TargetBody, Project *project);
142 // TODO: does xml stuff need project???
143 // ~XmlHandler();
144 //
145 // virtual bool startElement(const QString &namespaceURI, const QString &localName,
146 // const QString &qName, const QXmlAttributes &atts);
147 // virtual bool characters(const QString &ch);
148 // virtual bool endElement(const QString &namespaceURI, const QString &localName,
149 // const QString &qName);
150 //
151 // private:
152 // Q_DISABLE_COPY(XmlHandler);
153 //
154 // TargetBody *m_xmlHandlerTargetBody;
155 // Project *m_xmlHandlerProject; // TODO: does xml stuff need project???
156 // QString m_xmlHandlerCharacters;
157 // };
158 
159  private:
160  TargetBody(const TargetBody &other); // NOTE: copy constructor & assignment operators
161  TargetBody &operator=(const TargetBody &rhs); // are private so compiler will generate error
162  // if trying to use them (because parent is
163  // QObject which uses Q_DISABLE_COPY macro
164  //testing
165  TargetQsp m_isisTarget;
166 
171  QUuid *m_id;
172 
178  SpiceInt *m_bodyCode;
179 
183  SpiceInt *m_systemCode;
184 
188  QString m_systemName;
189 
193  std::vector<Distance> m_radii;
194 
198  std::vector<Distance> m_sigmaRadii;
199 
204 
206 
207  // The next three vectors will have length 3 (for a quadratic polynomial) if used.
208  std::vector<Angle> m_raPole;
209  std::vector<Angle> m_decPole;
210  std::vector<Angle> m_pm ;
211  //
212  // Currently multiples (terms with periods matching other terms but varying amplitudes)
213  // are handled as additional terms added to the end of the vector as Naif does (see
214  // comments in any of the standard Naif PCK.
215  std::vector<double> m_raNutPrec;
216  std::vector<double> m_decNutPrec;
217  std::vector<double> m_pmNutPrec;
218 
219  // The periods of bodies in the same system are modeled with a linear equation
220  std::vector<Angle> m_sysNutPrec0;
221  std::vector<Angle> m_sysNutPrec1;
222  };
223 
224  typedef QSharedPointer<TargetBody> TargetBodyQsp;
225 
226  //
227 
228  // operators to read/write TargetBody to/from binary data
229  QDataStream &operator<<(QDataStream &stream, const TargetBody &TargetBody);
230  QDataStream &operator>>(QDataStream &stream, TargetBody &TargetBody);
231 };
232 
234 
235 #endif // TargetBody_h
QString naifPlanetSystemName() const
This returns the body name of the target&#39;s planet system.
Definition: TargetBody.cpp:334
std::vector< double > m_pmNutPrec
Coefficients of prime meridian nut/prec terms.
Definition: TargetBody.h:217
std::vector< Angle > m_sysNutPrec0
Constants of planetary system nut/prec periods.
Definition: TargetBody.h:220
Distance meanRadius() const
Returns the mean radius.
Definition: TargetBody.cpp:404
TargetBodyDisplayProperties * m_displayProperties
The GUI information for how this Target will be displayed.
Definition: TargetBody.h:203
Container class for TargetBody.
Definition: TargetBody.h:77
SpiceInt naifPlanetSystemCode() const
This returns the NAIF body code of the target&#39;s planet system.
Definition: TargetBody.cpp:323
std::vector< Angle > sysNutPrecCoefs()
Returns Linear terms of planetary system nut/prec periods.
Definition: TargetBody.cpp:301
std::vector< Angle > sysNutPrecConstants()
Returns constants of planetary system nut/prec periods.
Definition: TargetBody.cpp:293
SpiceInt * m_systemCode
The NaifBodyCode system code.
Definition: TargetBody.h:183
int m_frametype
Fill this in when Debbie or Ken tell me what it is returning.
Definition: TargetBody.h:205
int frameType()
Returns the frame type.
Definition: TargetBody.cpp:230
~TargetBody()
The second constructor for this class.
Definition: TargetBody.cpp:143
std::vector< Angle > poleDecCoefs()
Returns coefficients of a quadratic polynomial fitting pole dec.
Definition: TargetBody.cpp:248
SpiceInt naifBodyCode() const
This returns the NAIF body code of the target.
Definition: TargetBody.cpp:312
This is the GUI communication mechanism for target body objects.
std::vector< Angle > m_raPole
Coefficients of a quadratic polynomial fitting pole ra.
Definition: TargetBody.h:208
Q_DECLARE_METATYPE(Isis::Cube *)
This allows Cube *&#39;s to be stored in a QVariant.
TargetBodyDisplayProperties * displayProperties()
Gets TargetBodyDisplayProperties.
Definition: TargetBody.cpp:197
Unless noted otherwise, the portions of Isis written by the USGS are public domain.
std::vector< double > poleDecNutPrecCoefs()
TargetBody::poleDecNutPrecCoefs.
Definition: TargetBody.cpp:275
std::vector< double > poleRaNutPrecCoefs()
Returns coefficients of pole right ascension nut/prec terms.
Definition: TargetBody.cpp:266
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:221
std::vector< Angle > m_pm
Coefficients of a quadratic polynomial fitting pole pm.
Definition: TargetBody.h:210
std::vector< Distance > m_sigmaRadii
target radii sigmas
Definition: TargetBody.h:198
Distance sigmaMeanRadius() const
Returns the mean radius sigma.
Definition: TargetBody.cpp:418
SpiceInt * m_bodyCode
TODO - RETHINK MEMBER VARIABLES AND METHODS The NaifBodyCode value, if it exists in the cube labels...
Definition: TargetBody.h:178
Distance sigmaRadiusB() const
Returns &quot;b&quot; radius sigma.
Definition: TargetBody.cpp:374
TargetBody(Target *target, QObject *parent=0)
The first constructor for this class.
Definition: TargetBody.cpp:27
Distance sigmaRadiusA() const
Returns &quot;a&quot; radius sigma.
Definition: TargetBody.cpp:354
QSharedPointer< TargetBody > TargetBodyQsp
Defines A smart pointer to a TargetBody obj.
Definition: TargetBody.h:224
Distance sigmaRadiusC() const
Returns the &quot;c&quot; radius sigma.
Definition: TargetBody.cpp:394
std::istream & operator>>(std::istream &is, CSVReader &csv)
Input read operator for input stream sources.
Definition: CSVReader.cpp:463
Distance radiusB() const
Returns &quot;b&quot; radius.
Definition: TargetBody.cpp:364
bool operator==(const TargetBody &src) const
Compares two Target Body objects to see if they are equal.
Definition: TargetBody.cpp:175
std::vector< double > pmNutPrecCoefs()
Returns coefficients of the prime meridian nut/prec terms.
Definition: TargetBody.cpp:284
This class is used to create and store valid Isis3 targets.
Definition: Target.h:63
QUuid * m_id
A unique ID for this TargetBody object (useful for others to reference this object when saving to dis...
Definition: TargetBody.h:171
QString id() const
Output format:
Definition: TargetBody.cpp:587
std::vector< Angle > poleRaCoefs()
TargetBody::poleRaCoefs.
Definition: TargetBody.cpp:239
std::vector< Distance > m_radii
target radii
Definition: TargetBody.h:193
std::vector< Angle > m_decPole
Coefficients of a quadratic polynomial fitting pole dec.
Definition: TargetBody.h:209
std::vector< double > m_decNutPrec
Coefficients of pole decliniation nut/prec terms.
Definition: TargetBody.h:216
QString m_systemName
The NaifBodyCode system name.
Definition: TargetBody.h:188
std::vector< double > m_raNutPrec
Coefficients of pole right ascension nut/prec terms.
Definition: TargetBody.h:215
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:257
Distance radiusC() const
Returns the &quot;c&quot; radius.
Definition: TargetBody.cpp:384
Distance radiusA() const
Returns &quot;a&quot; radius.
Definition: TargetBody.cpp:344

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:30:34