Isis 3 Programmer Reference
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 
183  class Sensor : public Spice {
184  public:
185  Sensor(Cube &cube);
186 
187  virtual ~Sensor();
188 
189  void setTime(const iTime &time);
190  bool SetLookDirection(const double v[3]);
191  bool SetRightAscensionDeclination(const double ra, const double dec);
192  bool SetUniversalGround(const double latitude, const double longitude,
193  bool backCheck = true);
194  bool SetUniversalGround(const double latitude, const double longitude,
195  const double radius, bool backCheck = true);
196  bool SetGround(const SurfacePoint &surfacePt, bool backCheck = true);
197  bool HasSurfaceIntersection() const;
198  void Coordinate(double p[3]) const;
199 
200  double UniversalLatitude() const;
201  Latitude GetLatitude() const;
202  double UniversalLongitude() const;
203  Longitude GetLongitude() const;
205 
206  Distance LocalRadius() const;
208  Distance LocalRadius(double lat, double lon);
209 
210  double PhaseAngle() const;
211  double EmissionAngle() const;
212  double IncidenceAngle() const;
213 
214  void LookDirection(double v[3]) const;
215  std::vector<double> lookDirectionJ2000() const;
216  std::vector<double> lookDirectionBodyFixed() const;
217 
218  double RightAscension();
219  double Declination();
220 
221  // Return vector between spacecraft and surface point in body-fixed
222  void SpacecraftSurfaceVector(double scSurfaceVector[3]) const;
223  double SlantDistance() const;
224  double LocalSolarTime();
225  double SolarDistance() const;
226  double SpacecraftAltitude();
227 
228  // Return local radius from dem
229 // Distance DemRadius(const SurfacePoint &pt);
230 // Distance DemRadius(const Latitude &lat, const Longitude
231 // &lon); bool HasElevationModel() {
232 
239  virtual double resolution() {
240  return 1.0;
241  };
242  void IgnoreElevationModel(bool ignore);
243 
245 
246  virtual QString instrumentNameLong() const = 0;
247  virtual QString instrumentNameShort() const = 0;
248  virtual QString spacecraftNameLong() const = 0;
249  virtual QString spacecraftNameShort() const = 0;
250 
251  private:
252  // This version of DemRadius is for SetLookDirection ONLY. Do not call.
253  // DAC TODO Why is next declaration here? Don't move until I know
254 // double DemRadius(double lat, double lon);
255  void CommonInitialize(const std::string &demCube);
256 
257  SpiceDouble m_lookB[3];
258 
259  bool m_newLookB;
260  SpiceDouble m_ra;
261  SpiceDouble m_dec;
262  void computeRaDec();
263  bool SetGroundLocal(bool backCheck);
264  };
265 };
266 
267 #endif
This class defines a body-fixed surface point.
Definition: SurfacePoint.h:148
void Coordinate(double p[3]) const
Returns the x,y,z of the surface intersection in BodyFixed km.
Definition: Sensor.cpp:211
double RightAscension()
Returns the right ascension angle (sky longitude).
Definition: Sensor.cpp:576
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
double SolarDistance() const
Returns the distance between the sun and surface point in AU.
Definition: Sensor.cpp:688
Parse and return pieces of a time string.
Definition: iTime.h:78
virtual QList< QPointF > PixelIfovOffsets()
This method is implemented in Camera which defaults to the (pixel pitch * summing mode ) / 2...
Definition: Sensor.cpp:96
double UniversalLatitude() const
Returns the planetocentric latitude, in degrees, at the surface intersection point in the body fixed ...
Definition: Sensor.cpp:225
SpiceDouble m_dec
Decliation (sky latitude)
Definition: Sensor.h:261
bool SetRightAscensionDeclination(const double ra, const double dec)
Given the ra/dec compute the look direction.
Definition: Sensor.cpp:619
bool SetGround(const SurfacePoint &surfacePt, bool backCheck=true)
This overloaded method has the opposite function as SetLookDirection.
Definition: Sensor.cpp:458
SpiceDouble m_lookB[3]
Look direction in body fixed.
Definition: Sensor.h:257
This class is designed to encapsulate the concept of a Latitude.
Definition: Latitude.h:63
Class for computing sensor ground coordinates.
Definition: Sensor.h:183
void computeRaDec()
Computes the ra/dec from the look direction.
Definition: Sensor.cpp:596
bool SetUniversalGround(const double latitude, const double longitude, bool backCheck=true)
This is the opposite routine for SetLookDirection.
Definition: Sensor.cpp:374
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:259
double SlantDistance() const
Return the distance between the spacecraft and surface point in kmv.
Definition: Sensor.cpp:648
Distance measurement, usually in meters.
Definition: Distance.h:47
bool SetGroundLocal(bool backCheck)
Computes look vector.
Definition: Sensor.cpp:490
Distance LocalRadius() const
Returns the local radius at the intersection point.
Definition: Sensor.cpp:282
virtual double resolution()
Virtual method that returns the pixel resolution of the sensor in meters/pix.
Definition: Sensor.h:239
double EmissionAngle() const
Returns the emission angle in degrees.
Definition: Sensor.cpp:339
This class is designed to encapsulate the concept of a Longitude.
Definition: Longitude.h:52
virtual ~Sensor()
Destroys the Sensor.
Definition: Sensor.cpp:66
Longitude GetLongitude() const
Returns a positive east, 0-360 domain longitude object at the surface intersection point in the body ...
Definition: Sensor.cpp:260
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
double UniversalLongitude() const
Returns the positive east, 0-360 domain longitude, in degrees, at the surface intersection point in t...
Definition: Sensor.cpp:248
double PhaseAngle() const
Returns the phase angle in degrees.
Definition: Sensor.cpp:327
double SpacecraftAltitude()
Returns the distance from the spacecraft to the subspacecraft point in km.
Definition: Sensor.cpp:712
SpiceDouble m_ra
Right ascension (sky longitude)
Definition: Sensor.h:260
void LookDirection(double v[3]) const
Returns the look direction in the camera coordinate system.
Definition: Sensor.cpp:538
SurfacePoint GetSurfacePoint() const
Returns the surface point (most efficient accessor).
Definition: Sensor.cpp:270
Namespace for ISIS/Bullet specific routines.
Definition: Apollo.h:31
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:564
Obtain SPICE information for a spacecraft.
Definition: Spice.h:294
double LocalSolarTime()
Return the local solar time in hours.
Definition: Sensor.cpp:671
std::vector< double > lookDirectionBodyFixed() const
Returns the look direction in the body fixed coordinate system.
Definition: Sensor.cpp:550
void SpacecraftSurfaceVector(double scSurfaceVector[3]) const
Sets the vector between the spacecraft and surface point in body-fixed.
Definition: Sensor.cpp:636
Latitude GetLatitude() const
Returns a planetocentric latitude object at the surface intersection point in body fixed...
Definition: Sensor.cpp:236
bool HasSurfaceIntersection() const
Returns if the last call to either SetLookDirection or SetUniversalGround had a valid intersection wi...
Definition: Sensor.cpp:201
double Declination()
Returns the declination angle (sky latitude).
Definition: Sensor.cpp:587
IO Handler for Isis Cubes.
Definition: Cube.h:170
iTime time() const
Returns the ephemeris time in seconds which was used to obtain the spacecraft and sun positions...
Definition: Spice.cpp:809