Isis Developer Reference
Target.h
Go to the documentation of this file.
1#ifndef Target_h
2#define Target_h
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
18class QString;
19
20namespace 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;
121 ShapeModel *m_originalShape;
122 ShapeModel *m_shape;
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.
129 Spice *m_spice;
131 };
132
133 typedef QSharedPointer<Target> TargetQsp;
134}
135
136#endif
Contains multiple PvlContainers.
Definition PvlGroup.h:41
Container for cube-like labels.
Definition Pvl.h:119
Define shapes and provide utilities for Isis targets.
Definition ShapeModel.h:66
Obtain SPICE information for a spacecraft.
Definition Spice.h:283
This class is used to create and store valid Isis targets.
Definition Target.h:63
SpiceInt naifBodyCode() const
This returns the NAIF body code of the target.
Definition Target.cpp:522
~Target()
Destroys the Target.
Definition Target.cpp:187
void init()
Initialize member variables.
Definition Target.cpp:177
Target()
Constructs an empty Target object.
Definition Target.cpp:159
void setSpice(Spice *spice)
Set the Spice pointer for the Target.
Definition Target.cpp:672
void setRadii(std::vector< Distance > radii)
Sets the radii of the body.
Definition Target.cpp:640
Spice * spice() const
Return the spice object.
Definition Target.cpp:688
static PvlGroup radiiGroup(QString target)
Creates a Pvl Group with keywords TargetName, EquitorialRadius, and PolarRadius.
Definition Target.cpp:428
std::vector< Angle > sysNutPrecCoefs()
Definition Target.cpp:602
std::vector< double > poleDecNutPrecCoefs()
Definition Target.cpp:587
void setShapeEllipsoid()
Set the shape to the ellipsoid and save the original shape.
Definition Target.cpp:628
std::vector< Angle > pmCoefs()
Definition Target.cpp:577
std::vector< Distance > radii() const
Returns the radii of the body in km.
Definition Target.cpp:557
ShapeModel * shape() const
Return the shape.
Definition Target.cpp:680
int frameType()
Definition Target.cpp:562
static SpiceInt lookupNaifBodyCode(QString name)
This returns the NAIF body code of the target indicated in the labels.
Definition Target.cpp:269
std::vector< double > pmNutPrecCoefs()
Definition Target.cpp:592
std::vector< Angle > poleDecCoefs()
Definition Target.cpp:572
std::vector< Angle > sysNutPrecConstants()
Definition Target.cpp:597
SpiceInt naifPlanetSystemCode() const
This returns the NAIF planet system body code of the target.
Definition Target.cpp:535
bool isSky() const
Return if our target is the sky.
Definition Target.cpp:215
QString name() const
Return target name.
Definition Target.cpp:541
std::vector< Angle > poleRaCoefs()
Definition Target.cpp:567
void restoreShape()
Restores the shape to the original after setShapeEllipsoid has overridden it.
Definition Target.cpp:610
QString systemName() const
Return planet system name.
Definition Target.cpp:547
std::vector< double > poleRaNutPrecCoefs()
Definition Target.cpp:582
void setName(QString name)
Set the name for the Target.
Definition Target.cpp:657
This is free and unencumbered software released into the public domain.
Definition Apollo.h:16
QSharedPointer< Target > TargetQsp
Definition Target.h:133