Isis 3 Programmer Reference
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 
76  class Target {
77 
78  public:
79  // constructors
80  Target(Spice *spice, Pvl &label);
81  Target();
82 
84  ~Target();
85 
86  void init();
87  bool isSky() const;
88  SpiceInt naifBodyCode() const;
89  SpiceInt naifPlanetSystemCode() const;
90  QString name() const;
91  QString systemName() const;
92  std::vector<Distance> radii() const;
93  void restoreShape();
94  void setShapeEllipsoid();
95  void setRadii(std::vector<Distance> radii);
96  ShapeModel *shape() const;
97  Spice *spice() const;
98 
99  int frameType();
100 
101  std::vector<Angle> poleRaCoefs();
102  std::vector<Angle> poleDecCoefs();
103  std::vector<Angle> pmCoefs();
104 
105  static SpiceInt lookupNaifBodyCode(QString name);
106  // Static conversion methods
107  static PvlGroup radiiGroup(QString target);
108  static PvlGroup radiiGroup(Pvl &cubeLab, const PvlGroup &mapGroup);
109 
110  std::vector<double> poleRaNutPrecCoefs();
111  std::vector<double> poleDecNutPrecCoefs();
112 
113  std::vector<double> pmNutPrecCoefs();
114 
115  std::vector<Angle> sysNutPrecConstants();
116  std::vector<Angle> sysNutPrecCoefs();
117 
118  private:
119  SpiceInt lookupNaifBodyCode(Pvl &lab) const;
120  static PvlGroup radiiGroup(int bodyFrameCode);
121  SpiceInt *m_bodyCode;
125  SpiceInt *m_systemCode;
127  QString *m_name;
128  QString *m_systemName;
129  std::vector<Distance> m_radii;
132  bool m_sky;
133 
134  // TODO should this be an enum(ring, sky, or naifBody), created Naif body for sky, or ???
135  // TODO should the target body kernels go in here too bodyRotation and position??? I don't
136  // think so. They are SPICE kernels and belong in the Spice class (DAC). What do others
137  // think.
140  };
141 
143 }
144 
145 #endif
bool m_sky
flag indicating target is the sky
Definition: Target.h:132
static SpiceInt lookupNaifBodyCode(QString name)
This returns the NAIF body code of the target indicated in the labels.
Definition: Target.cpp:234
~Target()
Destroys the Target.
Definition: Target.cpp:152
Spice * spice() const
Return the spice object
Definition: Target.cpp:623
void init()
Initialize member variables.
Definition: Target.cpp:142
bool isSky() const
Return if our target is the sky.
Definition: Target.cpp:180
QString systemName() const
Return planet system name.
Definition: Target.cpp:512
void restoreShape()
Restores the shape to the original after setShapeEllipsoid has overridden it.
Definition: Target.cpp:575
Target()
Constructs an empty Target object.
Definition: Target.cpp:124
QString * m_systemName
name of the planetary system of the target
Definition: Target.h:128
SpiceInt naifPlanetSystemCode() const
This returns the NAIF planet system body code of the target.
Definition: Target.cpp:500
Contains multiple PvlContainers.
Definition: PvlGroup.h:57
SpiceInt naifBodyCode() const
This returns the NAIF body code of the target.
Definition: Target.cpp:487
Spice * m_spice
parent Spice object, needed to get pixel resolution in ShapeModels
Definition: Target.h:138
static PvlGroup radiiGroup(QString target)
Creates a Pvl Group with keywords TargetName, EquitorialRadius, and PolarRadius.
Definition: Target.cpp:393
QString name() const
Return target name.
Definition: Target.cpp:506
ShapeModel * shape() const
Return the shape.
Definition: Target.cpp:615
Container for cube-like labels.
Definition: Pvl.h:135
This class is used to create and store valid Isis3 targets.
Definition: Target.h:76
Define shapes and provide utilities for Isis3 targets.
Definition: ShapeModel.h:78
std::vector< Distance > m_radii
target radii
Definition: Target.h:129
QString * m_name
target name
Definition: Target.h:127
void setShapeEllipsoid()
Set the shape to the ellipsoid and save the original shape.
Definition: Target.cpp:593
Namespace for ISIS/Bullet specific routines.
Definition: Apollo.h:31
Obtain SPICE information for a spacecraft.
Definition: Spice.h:294
ShapeModel * m_originalShape
target original shape model
Definition: Target.h:130
void setRadii(std::vector< Distance > radii)
Sets the radii of the body.
Definition: Target.cpp:605
SpiceInt * m_systemCode
The NaifBodyCode of the targets planetary system If the target is sky, then what should this be...
Definition: Target.h:125
SpiceInt * m_bodyCode
The NaifBodyCode value, if it exists in the labels.
Definition: Target.h:121
std::vector< Distance > radii() const
Returns the radii of the body in km.
Definition: Target.cpp:522
ShapeModel * m_shape
target shape model
Definition: Target.h:131