Isis 3.0 Programmer Reference
Back | Home
Target.h
Go to the documentation of this file.
1 #ifndef Target_h
2 #define Target_h
3 
26 #include <QSharedPointer>
27 
28 #include <vector>
29 
30 #include <SpiceUsr.h>
31 #include <SpiceZfc.h>
32 #include <SpiceZmc.h>
33 
34 class QString;
35 
36 namespace Isis {
37  class Angle;
38  class Distance;
39  class Pvl;
40  class PvlGroup;
41  class ShapeModel;
42  class Spice;
43 
63  class Target {
64 
65  public:
66  // constructors
67  Target(Spice *spice, Pvl &label);
68  Target();
69 
71  ~Target();
72 
73  void init();
74  bool isSky() const;
75  SpiceInt naifBodyCode() const;
76  SpiceInt naifPlanetSystemCode() const;
77  QString name() const;
78  QString systemName() const;
79  std::vector<Distance> radii() const;
80  void restoreShape();
81  void setShapeEllipsoid();
82  void setRadii(std::vector<Distance> radii);
83  ShapeModel *shape() const;
84  Spice *spice() const;
85 
86  int frameType();
87 
88  std::vector<Angle> poleRaCoefs();
89  std::vector<Angle> poleDecCoefs();
90  std::vector<Angle> pmCoefs();
91 
92  static SpiceInt lookupNaifBodyCode(QString name);
93  // Static conversion methods
94  static PvlGroup radiiGroup(QString target);
95  static PvlGroup radiiGroup(Pvl &cubeLab, const PvlGroup &mapGroup);
96 
97  std::vector<double> poleRaNutPrecCoefs();
98  std::vector<double> poleDecNutPrecCoefs();
99 
100  std::vector<double> pmNutPrecCoefs();
101 
102  std::vector<Angle> sysNutPrecConstants();
103  std::vector<Angle> sysNutPrecCoefs();
104 
105  private:
106  SpiceInt lookupNaifBodyCode(Pvl &lab) const;
107  static PvlGroup radiiGroup(int bodyFrameCode);
108  SpiceInt *m_bodyCode;
112  SpiceInt *m_systemCode;
114  QString *m_name;
115  QString *m_systemName;
116  std::vector<Distance> m_radii;
119  bool m_sky;
120 
121  // TODO should this be an enum(ring, sky, or naifBody), created Naif body for sky, or ???
122  // TODO should the target body kernels go in here too bodyRotation and position??? I don't
123  // think so. They are SPICE kernels and belong in the Spice class (DAC). What do others
124  // think.
127  };
128 
129  typedef QSharedPointer<Target> TargetQsp;
130 }
131 
132 #endif
bool m_sky
flag indicating target is the sky
Definition: Target.h:119
std::vector< Distance > radii() const
Returns the radii of the body in km.
Definition: Target.cpp:499
static SpiceInt lookupNaifBodyCode(QString name)
This returns the NAIF body code of the target indicated in the labels.
Definition: Target.cpp:232
QString systemName() const
Return planet system name.
Definition: Target.cpp:489
SpiceInt naifBodyCode() const
This returns the NAIF body code of the target.
Definition: Target.cpp:464
~Target()
Destroys the Target.
Definition: Target.cpp:152
void init()
Initialize member variables.
Definition: Target.cpp:142
QString name() const
Return target name.
Definition: Target.cpp:483
void restoreShape()
Restores the shape to the original after setShapeEllipsoid has overridden it.
Definition: Target.cpp:552
Target()
Constructs an empty Target object.
Definition: Target.cpp:124
QString * m_systemName
name of the planetary system of the target
Definition: Target.h:115
Contains multiple PvlContainers.
Definition: PvlGroup.h:57
Spice * m_spice
parent Spice object, needed to get pixel resolution in ShapeModels
Definition: Target.h:125
static PvlGroup radiiGroup(QString target)
Creates a Pvl Group with keywords TargetName, EquitorialRadius, and PolarRadius.
Definition: Target.cpp:372
bool isSky() const
Return if our target is the sky.
Definition: Target.cpp:180
Spice * spice() const
Return the spice object.
Definition: Target.cpp:600
Container for cube-like labels.
Definition: Pvl.h:135
This class is used to create and store valid Isis3 targets.
Definition: Target.h:63
Define shapes and provide utilities for Isis3 targets.
Definition: ShapeModel.h:68
std::vector< Distance > m_radii
target radii
Definition: Target.h:116
QString * m_name
target name
Definition: Target.h:114
void setShapeEllipsoid()
Set the shape to the ellipsoid and save the original shape.
Definition: Target.cpp:570
SpiceInt naifPlanetSystemCode() const
This returns the NAIF planet system body code of the target.
Definition: Target.cpp:477
Obtain SPICE information for a spacecraft.
Definition: Spice.h:282
ShapeModel * m_originalShape
target original shape model
Definition: Target.h:117
void setRadii(std::vector< Distance > radii)
Sets the radii of the body.
Definition: Target.cpp:582
ShapeModel * shape() const
Return the shape.
Definition: Target.cpp:592
SpiceInt * m_systemCode
The NaifBodyCode of the targets planetary system If the target is sky, then what should this be...
Definition: Target.h:112
SpiceInt * m_bodyCode
The NaifBodyCode value, if it exists in the labels.
Definition: Target.h:108
ShapeModel * m_shape
target shape model
Definition: Target.h:118

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:33