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
28
29class QDataStream;
30class QUuid;
31class QXmlStreamWriter;
32
33namespace Isis {
34 //class Distance;
35 class FileName;
36 class Project; // TODO: does xml stuff need project???
37 class PvlObject;
38 class TargetBodyDisplayProperties;
39
63 class TargetBody : public QObject {
64
65 Q_OBJECT
66
67 public:
68 TargetBody(Target *target, QObject *parent = 0);
70
71 bool operator==(const TargetBody &src) const;
72
75
76 QString id() const;
77 QString targetName();
78// void deleteFromDisk();
79
80 int frameType();
81
82 std::vector<Angle> poleRaCoefs();
83 std::vector<Angle> poleDecCoefs();
84 std::vector<Angle> pmCoefs();
85
86 std::vector<double> poleRaNutPrecCoefs();
87 std::vector<double> poleDecNutPrecCoefs();
88
89 std::vector<double> pmNutPrecCoefs();
90
91 std::vector<Angle> sysNutPrecConstants();
92 std::vector<Angle> sysNutPrecCoefs();
93
94 SpiceInt naifBodyCode() const;
95 SpiceInt naifPlanetSystemCode() const;
96 QString naifPlanetSystemName() const;
97 Distance radiusA() const;
98 Distance radiusB() const;
99 Distance radiusC() const;
100 Distance meanRadius() const;
101 Distance sigmaRadiusA() const;
102 Distance sigmaRadiusB() const;
103 Distance sigmaRadiusC() const;
105
106// void save(QXmlStreamWriter &stream, const Project *project, FileName newProjectRoot) const;
107// TODO: does xml stuff need project and newRoot???
108// void save(QXmlStreamWriter &stream, const Project *project) const;
109// TODO: does xml stuff need project???
110//
111// QDataStream &write(QDataStream &stream) const;
112// QDataStream &read(QDataStream &stream);
113
114 private:
115 TargetBody(const TargetBody &other); // NOTE: copy constructor & assignment operators
116 TargetBody &operator=(const TargetBody &rhs); // are private so compiler will generate error
117 // if trying to use them (because parent is
118 // QObject which uses Q_DISABLE_COPY macro
119 //testing
120 TargetQsp m_isisTarget;
121
126 QUuid *m_id;
127
132
138 SpiceInt *m_bodyCode;
139
143 SpiceInt *m_systemCode;
144
149
153 std::vector<Distance> m_radii;
154
158 std::vector<Distance> m_sigmaRadii;
159
164
166
167 // The next three vectors will have length 3 (for a quadratic polynomial) if used.
168 std::vector<Angle> m_raPole;
169 std::vector<Angle> m_decPole;
170 std::vector<Angle> m_pm ;
171 //
172 // Currently multiples (terms with periods matching other terms but varying amplitudes)
173 // are handled as additional terms added to the end of the vector as Naif does (see
174 // comments in any of the standard Naif PCK.
175 std::vector<double> m_raNutPrec;
176 std::vector<double> m_decNutPrec;
177 std::vector<double> m_pmNutPrec;
178
179 // The periods of bodies in the same system are modeled with a linear equation
180 std::vector<Angle> m_sysNutPrec0;
181 std::vector<Angle> m_sysNutPrec1;
182 };
183
184 typedef QSharedPointer<TargetBody> TargetBodyQsp;
185
186 //
187
188 // operators to read/write TargetBody to/from binary data
189 QDataStream &operator<<(QDataStream &stream, const TargetBody &TargetBody);
190 QDataStream &operator>>(QDataStream &stream, TargetBody &TargetBody);
191};
192
193Q_DECLARE_METATYPE(Isis::TargetBodyQsp);
194
195#endif // TargetBody_h
Distance measurement, usually in meters.
Definition Distance.h:34
This is the GUI communication mechanism for target body objects.
Container class for TargetBody.
Definition TargetBody.h:63
std::vector< Angle > pmCoefs()
Returns coefficients of a quadratic polynomial fitting pole pm.
std::vector< Distance > m_sigmaRadii
target radii sigmas
Definition TargetBody.h:158
TargetBodyDisplayProperties * displayProperties()
Gets TargetBodyDisplayProperties.
Distance radiusB() const
Returns "b" radius.
std::vector< Distance > m_radii
target radii
Definition TargetBody.h:153
TargetBody(Target *target, QObject *parent=0)
The first constructor for this class.
std::vector< Angle > m_raPole
Coefficients of a quadratic polynomial fitting pole ra.
Definition TargetBody.h:168
SpiceInt naifBodyCode() const
This returns the NAIF body code of the target.
Distance sigmaRadiusC() const
Returns the "c" radius sigma.
TargetBodyDisplayProperties * m_displayProperties
The GUI information for how this Target will be displayed.
Definition TargetBody.h:163
std::vector< double > m_decNutPrec
Coefficients of pole decliniation nut/prec terms.
Definition TargetBody.h:176
std::vector< Angle > poleDecCoefs()
Returns coefficients of a quadratic polynomial fitting pole dec.
int m_frametype
Fill this in when Debbie or Ken tell me what it is returning.
Definition TargetBody.h:165
std::vector< double > poleDecNutPrecCoefs()
TargetBody::poleDecNutPrecCoefs.
std::vector< Angle > sysNutPrecCoefs()
Returns Linear terms of planetary system nut/prec periods.
std::vector< double > pmNutPrecCoefs()
Returns coefficients of the prime meridian nut/prec terms.
int frameType()
Returns the frame type.
QString id() const
Get a unique, identifying string associated with this TargetBody object.
Distance meanRadius() const
Returns the mean radius.
bool operator==(const TargetBody &src) const
Compares two Target Body objects to see if they are equal.
std::vector< Angle > m_decPole
Coefficients of a quadratic polynomial fitting pole dec.
Definition TargetBody.h:169
Distance sigmaRadiusB() const
Returns "b" radius sigma.
std::vector< Angle > m_sysNutPrec1
Linear terms of planetary system nut/prec periods.
Definition TargetBody.h:181
SpiceInt * m_bodyCode
TODO - RETHINK MEMBER VARIABLES AND METHODS The NaifBodyCode value, if it exists in the cube labels.
Definition TargetBody.h:138
std::vector< Angle > poleRaCoefs()
TargetBody::poleRaCoefs.
~TargetBody()
The second constructor for this class.
Distance sigmaMeanRadius() const
Returns the mean radius sigma.
QString naifPlanetSystemName() const
This returns the body name of the target's planet system.
std::vector< Angle > sysNutPrecConstants()
Returns constants of planetary system nut/prec periods.
Distance radiusC() const
Returns the "c" radius.
QUuid * m_id
A unique ID for this TargetBody object (useful for others to reference this object when saving to dis...
Definition TargetBody.h:126
Distance radiusA() const
Returns "a" radius.
std::vector< double > poleRaNutPrecCoefs()
Returns coefficients of pole right ascension nut/prec terms.
QString m_targetName
The TargetName as it appears in the original cube.
Definition TargetBody.h:131
std::vector< Angle > m_sysNutPrec0
Constants of planetary system nut/prec periods.
Definition TargetBody.h:180
QString m_systemName
The NaifBodyCode system name.
Definition TargetBody.h:148
SpiceInt * m_systemCode
The NaifBodyCode system code.
Definition TargetBody.h:143
Distance sigmaRadiusA() const
Returns "a" radius sigma.
std::vector< Angle > m_pm
Coefficients of a quadratic polynomial fitting pole pm.
Definition TargetBody.h:170
SpiceInt naifPlanetSystemCode() const
This returns the NAIF body code of the target's planet system.
std::vector< double > m_raNutPrec
Coefficients of pole right ascension nut/prec terms.
Definition TargetBody.h:175
std::vector< double > m_pmNutPrec
Coefficients of prime meridian nut/prec terms.
Definition TargetBody.h:177
QString targetName()
Returns the value stored at TargetName in the original pvl label.
This class is used to create and store valid Isis targets.
Definition Target.h:63
This is free and unencumbered software released into the public domain.
Definition Apollo.h:16
QSharedPointer< TargetBody > TargetBodyQsp
Defines A smart pointer to a TargetBody obj.
Definition TargetBody.h:184
std::istream & operator>>(std::istream &is, CSVReader &csv)
Input read operator for input stream sources.
QDebug operator<<(QDebug debug, const Hillshade &hillshade)
Print this class out to a QDebug object.