Isis 3.0 Programmer Reference
Back | Home
Sensor.h
Go to the documentation of this file.
1 #ifndef Sensor_h
2 #define Sensor_h
3 
25 #include "Spice.h"
26 
27 #include <QList>
28 #include <QPointF>
29 #include <QString>
30 
31 #include "Cube.h"
32 #include "Interpolator.h"
33 #include "Portal.h"
34 #include "ProjectionFactory.h"
35 
36 namespace Isis {
37  class Distance;
38  class EllipsoidShape;
39  class iTime;
40  class Latitude;
41  class Longitude;
42  class ShapeModel;
43  class SurfacePoint;
44  class Target;
45 
179  class Sensor : public Spice {
180  public:
181  Sensor(Cube &cube);
182 
183  virtual ~Sensor();
184 
185  void setTime(const iTime &time);
186  bool SetLookDirection(const double v[3]);
187  bool SetRightAscensionDeclination(const double ra, const double dec);
188  bool SetUniversalGround(const double latitude, const double longitude,
189  bool backCheck = true);
190  bool SetUniversalGround(const double latitude, const double longitude,
191  const double radius, bool backCheck = true);
192  bool SetGround(const SurfacePoint &surfacePt, bool backCheck = true);
193  bool HasSurfaceIntersection() const;
194  void Coordinate(double p[3]) const;
195 
196  double UniversalLatitude() const;
197  Latitude GetLatitude() const;
198  double UniversalLongitude() const;
199  Longitude GetLongitude() const;
201 
202  Distance LocalRadius() const;
204  Distance LocalRadius(double lat, double lon);
205 
206  double PhaseAngle() const;
207  double EmissionAngle() const;
208  double IncidenceAngle() const;
209 
210  void LookDirection(double v[3]) const;
211  std::vector<double> lookDirectionJ2000() const;
212  std::vector<double> lookDirectionBodyFixed() const;
213 
214  double RightAscension();
215  double Declination();
216 
217  // Return vector between spacecraft and surface point in body-fixed
218  void SpacecraftSurfaceVector(double scSurfaceVector[3]) const;
219  double SlantDistance() const;
220  double LocalSolarTime();
221  double SolarDistance() const;
222  double SpacecraftAltitude();
223 
224  // Return local radius from dem
225 // Distance DemRadius(const SurfacePoint &pt);
226 // Distance DemRadius(const Latitude &lat, const Longitude
227 // &lon); bool HasElevationModel() {
228 
235  virtual double resolution() {
236  return 1.0;
237  };
238  void IgnoreElevationModel(bool ignore);
239 
241 
242  virtual QString instrumentNameLong() const = 0;
243  virtual QString instrumentNameShort() const = 0;
244  virtual QString spacecraftNameLong() const = 0;
245  virtual QString spacecraftNameShort() const = 0;
246 
247  private:
248  // This version of DemRadius is for SetLookDirection ONLY. Do not call.
249  // DAC TODO Why is next declaration here? Don't move until I know
250 // double DemRadius(double lat, double lon);
251  void CommonInitialize(const std::string &demCube);
252 
253  SpiceDouble m_lookB[3];
254 
255  bool m_newLookB;
256  SpiceDouble m_ra;
257  SpiceDouble m_dec;
258  void computeRaDec();
259  bool SetGroundLocal(bool backCheck);
260  };
261 };
262 
263 #endif
This class defines a body-fixed surface point.
Definition: SurfacePoint.h:86
double RightAscension()
Returns the right ascension angle (sky longitude).
Definition: Sensor.cpp:553
void IgnoreElevationModel(bool ignore)
This allows you to ignore the cube elevation model and use the ellipse.
Definition: Sensor.cpp:75
Sensor(Cube &cube)
Constructs a Sensor object and loads SPICE kernels using information from the label object...
Definition: Sensor.cpp:61
Parse and return pieces of a time string.
Definition: iTime.h:74
virtual QList< QPointF > PixelIfovOffsets()
This method is implemented in Camera which defaults to the (pixel pitch * summing mode ) / 2...
Definition: Sensor.cpp:96
double SlantDistance() const
Return the distance between the spacecraft and surface point in kmv.
Definition: Sensor.cpp:625
Latitude GetLatitude() const
Returns a planetocentric latitude object at the surface intersection point in body fixed...
Definition: Sensor.cpp:236
Longitude GetLongitude() const
Returns a positive east, 0-360 domain longitude object at the surface intersection point in the body ...
Definition: Sensor.cpp:260
SpiceDouble m_dec
Decliation (sky latitude)
Definition: Sensor.h:257
std::vector< double > lookDirectionBodyFixed() const
Returns the look direction in the body fixed coordinate system.
Definition: Sensor.cpp:527
bool SetRightAscensionDeclination(const double ra, const double dec)
Given the ra/dec compute the look direction.
Definition: Sensor.cpp:596
double UniversalLatitude() const
Returns the planetocentric latitude, in degrees, at the surface intersection point in the body fixed ...
Definition: Sensor.cpp:225
bool SetGround(const SurfacePoint &surfacePt, bool backCheck=true)
This overloaded method has the opposite function as SetLookDirection.
Definition: Sensor.cpp:441
SpiceDouble m_lookB[3]
Look direction in body fixed.
Definition: Sensor.h:253
This class is designed to encapsulate the concept of a Latitude.
Definition: Latitude.h:59
Class for computing sensor ground coordinates.
Definition: Sensor.h:179
void computeRaDec()
Computes the ra/dec from the look direction.
Definition: Sensor.cpp:573
bool SetUniversalGround(const double latitude, const double longitude, bool backCheck=true)
This is the opposite routine for SetLookDirection.
Definition: Sensor.cpp:371
bool SetLookDirection(const double v[3])
Sets the look direction of the spacecraft.
Definition: Sensor.cpp:156
bool m_newLookB
flag to indicate we need to recompute ra/dec
Definition: Sensor.h:255
Distance measurement, usually in meters.
Definition: Distance.h:47
bool SetGroundLocal(bool backCheck)
Computes look vector.
Definition: Sensor.cpp:469
virtual double resolution()
Virtual method that returns the pixel resolution of the sensor in meters/pix.
Definition: Sensor.h:235
double UniversalLongitude() const
Returns the positive east, 0-360 domain longitude, in degrees, at the surface intersection point in t...
Definition: Sensor.cpp:248
This class is designed to encapsulate the concept of a Longitude.
Definition: Longitude.h:52
iTime time() const
Returns the ephemeris time in seconds which was used to obtain the spacecraft and sun positions...
Definition: Spice.cpp:804
virtual ~Sensor()
Destroys the Sensor.
Definition: Sensor.cpp:66
double EmissionAngle() const
Returns the emission angle in degrees.
Definition: Sensor.cpp:339
double PhaseAngle() const
Returns the phase angle in degrees.
Definition: Sensor.cpp:327
void setTime(const iTime &time)
By setting the time you essential set the position of the spacecraft and body as indicated in the cla...
Definition: Sensor.cpp:112
SurfacePoint GetSurfacePoint() const
Returns the surface point (most efficient accessor).
Definition: Sensor.cpp:270
bool HasSurfaceIntersection() const
Returns if the last call to either SetLookDirection or SetUniversalGround had a valid intersection wi...
Definition: Sensor.cpp:201
double SpacecraftAltitude()
Returns the distance from the spacecraft to the subspacecraft point in km.
Definition: Sensor.cpp:689
void Coordinate(double p[3]) const
Returns the x,y,z of the surface intersection in BodyFixed km.
Definition: Sensor.cpp:211
Distance LocalRadius() const
Returns the local radius at the intersection point.
Definition: Sensor.cpp:282
SpiceDouble m_ra
Right ascension (sky longitude)
Definition: Sensor.h:256
double SolarDistance() const
Returns the distance between the sun and surface point in AU.
Definition: Sensor.cpp:665
Obtain SPICE information for a spacecraft.
Definition: Spice.h:282
void SpacecraftSurfaceVector(double scSurfaceVector[3]) const
Sets the vector between the spacecraft and surface point in body-fixed.
Definition: Sensor.cpp:613
double LocalSolarTime()
Return the local solar time in hours.
Definition: Sensor.cpp:648
void LookDirection(double v[3]) const
Returns the look direction in the camera coordinate system.
Definition: Sensor.cpp:515
double IncidenceAngle() const
Returns the incidence angle in degrees.
Definition: Sensor.cpp:350
std::vector< double > lookDirectionJ2000() const
Returns the look direction in the camera coordinate system.
Definition: Sensor.cpp:541
double Declination()
Returns the declination angle (sky latitude).
Definition: Sensor.cpp:564
IO Handler for Isis Cubes.
Definition: Cube.h:158

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:28:51