Isis 3 Programmer Reference
Target.h
1 #ifndef Target_h
2 #define Target_h
3 
8 /* SPDX-License-Identifier: CC0-1.0 */
9 
10 #include <QSharedPointer>
11 
12 #include <vector>
13 
14 #include <SpiceUsr.h>
15 #include <SpiceZfc.h>
16 #include <SpiceZmc.h>
17 
18 class QString;
19 
20 namespace Isis {
21  class Angle;
22  class Distance;
23  class Pvl;
24  class PvlGroup;
25  class ShapeModel;
26  class Spice;
27 
63  class Target {
64 
65  public:
66  // constructors
67  Target(Spice *spice, Pvl &label);
68  Target(Pvl &label);
69  Target();
70 
72  ~Target();
73 
74  void init();
75  bool isSky() const;
76  SpiceInt naifBodyCode() const;
77  SpiceInt naifPlanetSystemCode() const;
78  QString name() const;
79  QString systemName() const;
80  std::vector<Distance> radii() const;
81  void restoreShape();
82  void setShapeEllipsoid();
83  void setRadii(std::vector<Distance> radii);
84  void setName(QString name);
85  void setSpice(Spice *spice);
86 
87  ShapeModel *shape() const;
88  Spice *spice() const;
89 
90  int frameType();
91 
92  std::vector<Angle> poleRaCoefs();
93  std::vector<Angle> poleDecCoefs();
94  std::vector<Angle> pmCoefs();
95 
96  static SpiceInt lookupNaifBodyCode(QString name);
97  // Static conversion methods
98  static PvlGroup radiiGroup(QString target);
99  static PvlGroup radiiGroup(Pvl &cubeLab, const PvlGroup &mapGroup);
100 
101  std::vector<double> poleRaNutPrecCoefs();
102  std::vector<double> poleDecNutPrecCoefs();
103 
104  std::vector<double> pmNutPrecCoefs();
105 
106  std::vector<Angle> sysNutPrecConstants();
107  std::vector<Angle> sysNutPrecCoefs();
108 
109  private:
110  SpiceInt lookupNaifBodyCode(Pvl &lab) const;
111  static PvlGroup radiiGroup(int bodyFrameCode);
112  SpiceInt *m_bodyCode;
116  SpiceInt *m_systemCode;
118  QString *m_name;
119  QString *m_systemName;
120  std::vector<Distance> m_radii;
123  bool m_sky;
124 
125  // TODO should this be an enum(ring, sky, or naifBody), created Naif body for sky, or ???
126  // TODO should the target body kernels go in here too bodyRotation and position??? I don't
127  // think so. They are SPICE kernels and belong in the Spice class (DAC). What do others
128  // think.
131  };
132 
134 }
135 
136 #endif
Isis::Target::radiiGroup
static PvlGroup radiiGroup(QString target)
Creates a Pvl Group with keywords TargetName, EquitorialRadius, and PolarRadius.
Definition: Target.cpp:403
Isis::Target::setShapeEllipsoid
void setShapeEllipsoid()
Set the shape to the ellipsoid and save the original shape.
Definition: Target.cpp:603
Isis::Target::shape
ShapeModel * shape() const
Return the shape.
Definition: Target.cpp:655
Isis::Target::m_systemCode
SpiceInt * m_systemCode
The NaifBodyCode of the targets planetary system If the target is sky, then what should this be?...
Definition: Target.h:116
Isis::Target::isSky
bool isSky() const
Return if our target is the sky.
Definition: Target.cpp:190
Isis::Target::setRadii
void setRadii(std::vector< Distance > radii)
Sets the radii of the body.
Definition: Target.cpp:615
Isis::Target::setSpice
void setSpice(Spice *spice)
Set the Spice pointer for the Target.
Definition: Target.cpp:647
Isis::Target::setName
void setName(QString name)
Set the name for the Target.
Definition: Target.cpp:632
Isis::Target::m_shape
ShapeModel * m_shape
target shape model
Definition: Target.h:122
Isis::Pvl
Container for cube-like labels.
Definition: Pvl.h:119
Isis::Target::naifBodyCode
SpiceInt naifBodyCode() const
This returns the NAIF body code of the target.
Definition: Target.cpp:497
Isis::Target::m_originalShape
ShapeModel * m_originalShape
target original shape model
Definition: Target.h:121
Isis::Target::m_spice
Spice * m_spice
parent Spice object, needed to get pixel resolution in ShapeModels
Definition: Target.h:129
QSharedPointer< Target >
Isis::Target::m_radii
std::vector< Distance > m_radii
target radii
Definition: Target.h:120
Isis::Target::radii
std::vector< Distance > radii() const
Returns the radii of the body in km.
Definition: Target.cpp:532
Isis::Target::~Target
~Target()
Destroys the Target.
Definition: Target.cpp:162
Isis::PvlGroup
Contains multiple PvlContainers.
Definition: PvlGroup.h:41
Isis::Target::m_sky
bool m_sky
flag indicating target is the sky
Definition: Target.h:123
Isis::Target::Target
Target()
Constructs an empty Target object.
Definition: Target.cpp:134
Isis::Target::restoreShape
void restoreShape()
Restores the shape to the original after setShapeEllipsoid has overridden it.
Definition: Target.cpp:585
Isis::Target::m_systemName
QString * m_systemName
name of the planetary system of the target
Definition: Target.h:119
Isis::Target::lookupNaifBodyCode
static SpiceInt lookupNaifBodyCode(QString name)
This returns the NAIF body code of the target indicated in the labels.
Definition: Target.cpp:244
Isis::Spice
Obtain SPICE information for a spacecraft.
Definition: Spice.h:283
Isis::Target::m_bodyCode
SpiceInt * m_bodyCode
The NaifBodyCode value, if it exists in the labels.
Definition: Target.h:112
Isis::Target::naifPlanetSystemCode
SpiceInt naifPlanetSystemCode() const
This returns the NAIF planet system body code of the target.
Definition: Target.cpp:510
Isis::ShapeModel
Define shapes and provide utilities for Isis targets.
Definition: ShapeModel.h:62
Isis::Target::spice
Spice * spice() const
Return the spice object.
Definition: Target.cpp:663
Isis::Target::systemName
QString systemName() const
Return planet system name.
Definition: Target.cpp:522
Isis::Target::init
void init()
Initialize member variables.
Definition: Target.cpp:152
Isis::Target::m_name
QString * m_name
target name
Definition: Target.h:118
Isis::Target
This class is used to create and store valid Isis targets.
Definition: Target.h:63
Isis
This is free and unencumbered software released into the public domain.
Definition: Apollo.h:16
Isis::Target::name
QString name() const
Return target name.
Definition: Target.cpp:516