Isis 3.0
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;
117  ShapeModel *m_originalShape;
118  ShapeModel *m_shape;
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.
125  Spice *m_spice;
127  };
128 
129  typedef QSharedPointer<Target> TargetQsp;
130 }
131 
132 #endif
std::vector< double > pmNutPrecCoefs()
Definition: Target.cpp:534
std::vector< Angle > poleRaCoefs()
Definition: Target.cpp:509
std::vector< double > poleRaNutPrecCoefs()
Definition: Target.cpp:524
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
std::vector< double > poleDecNutPrecCoefs()
Definition: Target.cpp:529
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
Contains multiple PvlContainers.
Definition: PvlGroup.h:57
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
std::vector< Angle > sysNutPrecCoefs()
Definition: Target.cpp:544
Container for cube-like labels.
Definition: Pvl.h:135
std::vector< Angle > sysNutPrecConstants()
Definition: Target.cpp:539
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
int frameType()
Definition: Target.cpp:504
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
std::vector< Angle > pmCoefs()
Definition: Target.cpp:519
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
QSharedPointer< Target > TargetQsp
Definition: Target.h:129
std::vector< Angle > poleDecCoefs()
Definition: Target.cpp:514

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