Isis 3 Programmer Reference
Sensor.h
1 #ifndef Sensor_h
2 #define Sensor_h
3 
8 /* SPDX-License-Identifier: CC0-1.0 */
9 #include "Spice.h"
10 
11 #include <QList>
12 #include <QPointF>
13 #include <QString>
14 
15 #include "Cube.h"
16 #include "Interpolator.h"
17 #include "Portal.h"
18 #include "ProjectionFactory.h"
19 
20 namespace Isis {
21  class Distance;
22  class EllipsoidShape;
23  class iTime;
24  class Latitude;
25  class Longitude;
26  class ShapeModel;
27  class SurfacePoint;
28  class Target;
29 
170  class Sensor : public Spice {
171  public:
172  Sensor(Cube &cube);
173 
174  virtual ~Sensor();
175 
176  void setTime(const iTime &time);
177  bool SetLookDirection(const double v[3]);
178  bool SetRightAscensionDeclination(const double ra, const double dec);
179  bool SetUniversalGround(const double latitude, const double longitude,
180  bool backCheck = true);
181  bool SetUniversalGround(const double latitude, const double longitude,
182  const double radius, bool backCheck = true);
183  bool SetGround(const SurfacePoint &surfacePt, bool backCheck = true);
184  bool HasSurfaceIntersection() const;
185  void Coordinate(double p[3]) const;
186 
187  virtual double UniversalLatitude() const;
188  Latitude GetLatitude() const;
189  virtual double UniversalLongitude() const;
190  Longitude GetLongitude() const;
192 
193  Distance LocalRadius() const;
195  Distance LocalRadius(double lat, double lon);
196 
197  virtual double PhaseAngle() const;
198  virtual double EmissionAngle() const;
199  virtual double IncidenceAngle() const;
200 
201  void LookDirection(double v[3]) const;
202  std::vector<double> lookDirectionJ2000() const;
203  std::vector<double> lookDirectionBodyFixed() const;
204 
205  virtual double RightAscension();
206  virtual double Declination();
207 
208  // Return vector between spacecraft and surface point in body-fixed
209  void SpacecraftSurfaceVector(double scSurfaceVector[3]) const;
210  virtual double SlantDistance() const;
211  double LocalSolarTime();
212  virtual double SolarDistance() const;
213  double SpacecraftAltitude();
214 
215  // Return local radius from dem
216 // Distance DemRadius(const SurfacePoint &pt);
217 // Distance DemRadius(const Latitude &lat, const Longitude
218 // &lon); bool HasElevationModel() {
219 
226  virtual double resolution() {
227  return 1.0;
228  };
229  void IgnoreElevationModel(bool ignore);
230 
232 
233  virtual QString instrumentNameLong() const = 0;
234  virtual QString instrumentNameShort() const = 0;
235  virtual QString spacecraftNameLong() const = 0;
236  virtual QString spacecraftNameShort() const = 0;
237 
238  protected:
239  SpiceDouble m_lookB[3];
240  bool m_newLookB;
241 
242  private:
243  // This version of DemRadius is for SetLookDirection ONLY. Do not call.
244  // DAC TODO Why is next declaration here? Don't move until I know
245 // double DemRadius(double lat, double lon);
246  void CommonInitialize(const std::string &demCube);
247 
248 
249  SpiceDouble m_ra;
250  SpiceDouble m_dec;
251  void computeRaDec();
252  bool SetGroundLocal(bool backCheck);
253  };
254 };
255 
256 #endif
Isis::Spice::time
iTime time() const
Returns the ephemeris time in seconds which was used to obtain the spacecraft and sun positions.
Definition: Spice.cpp:884
Isis::Sensor::SpacecraftSurfaceVector
void SpacecraftSurfaceVector(double scSurfaceVector[3]) const
Sets the vector between the spacecraft and surface point in body-fixed.
Definition: Sensor.cpp:625
Isis::Sensor::~Sensor
virtual ~Sensor()
Destroys the Sensor.
Definition: Sensor.cpp:51
Isis::Sensor::SpacecraftAltitude
double SpacecraftAltitude()
Returns the distance from the spacecraft to the subspacecraft point in km.
Definition: Sensor.cpp:701
Isis::Sensor::SetUniversalGround
bool SetUniversalGround(const double latitude, const double longitude, bool backCheck=true)
This is the opposite routine for SetLookDirection.
Definition: Sensor.cpp:359
QList< QPointF >
Isis::Latitude
This class is designed to encapsulate the concept of a Latitude.
Definition: Latitude.h:51
Isis::Sensor::HasSurfaceIntersection
bool HasSurfaceIntersection() const
Returns if the last call to either SetLookDirection or SetUniversalGround had a valid intersection wi...
Definition: Sensor.cpp:186
Isis::iTime
Parse and return pieces of a time string.
Definition: iTime.h:65
Isis::Sensor::lookDirectionJ2000
std::vector< double > lookDirectionJ2000() const
Returns the look direction in the camera coordinate system.
Definition: Sensor.cpp:549
Isis::Sensor::SetGroundLocal
bool SetGroundLocal(bool backCheck)
Computes look vector.
Definition: Sensor.cpp:475
Isis::Sensor::Declination
virtual double Declination()
Returns the declination angle (sky latitude).
Definition: Sensor.cpp:574
Isis::Sensor::GetLongitude
Longitude GetLongitude() const
Returns a positive east, 0-360 domain longitude object at the surface intersection point in the body ...
Definition: Sensor.cpp:245
Isis::Sensor::PixelIfovOffsets
virtual QList< QPointF > PixelIfovOffsets()
This method is implemented in Camera which defaults to the (pixel pitch * summing mode ) / 2.
Definition: Sensor.cpp:81
Isis::Sensor::LocalSolarTime
double LocalSolarTime()
Return the local solar time in hours.
Definition: Sensor.cpp:660
Isis::Sensor::GetSurfacePoint
SurfacePoint GetSurfacePoint() const
Returns the surface point (most efficient accessor).
Definition: Sensor.cpp:255
Isis::Sensor::RightAscension
virtual double RightAscension()
Returns the right ascension angle (sky longitude).
Definition: Sensor.cpp:561
Isis::Sensor::IgnoreElevationModel
void IgnoreElevationModel(bool ignore)
This allows you to ignore the cube elevation model and use the ellipse.
Definition: Sensor.cpp:60
Isis::Distance
Distance measurement, usually in meters.
Definition: Distance.h:34
Isis::Longitude
This class is designed to encapsulate the concept of a Longitude.
Definition: Longitude.h:40
Isis::Sensor::lookDirectionBodyFixed
std::vector< double > lookDirectionBodyFixed() const
Returns the look direction in the body fixed coordinate system.
Definition: Sensor.cpp:535
Isis::Sensor::setTime
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:97
Isis::Sensor::m_ra
SpiceDouble m_ra
Right ascension (sky longitude)
Definition: Sensor.h:249
Isis::Sensor::UniversalLongitude
virtual double UniversalLongitude() const
Returns the positive east, 0-360 domain longitude, in degrees, at the surface intersection point in t...
Definition: Sensor.cpp:233
Isis::Sensor::LookDirection
void LookDirection(double v[3]) const
Returns the look direction in the camera coordinate system.
Definition: Sensor.cpp:523
Isis::Sensor::Sensor
Sensor(Cube &cube)
Constructs a Sensor object and loads SPICE kernels using information from the label object.
Definition: Sensor.cpp:45
Isis::Cube
IO Handler for Isis Cubes.
Definition: Cube.h:167
Isis::Sensor::IncidenceAngle
virtual double IncidenceAngle() const
Returns the incidence angle in degrees.
Definition: Sensor.cpp:335
Isis::Spice
Obtain SPICE information for a spacecraft.
Definition: Spice.h:283
Isis::Sensor::GetLatitude
Latitude GetLatitude() const
Returns a planetocentric latitude object at the surface intersection point in body fixed.
Definition: Sensor.cpp:221
Isis::Sensor
Class for computing sensor ground coordinates.
Definition: Sensor.h:170
Isis::Sensor::SolarDistance
virtual double SolarDistance() const
Returns the distance between the sun and surface point in AU.
Definition: Sensor.cpp:677
Isis::Sensor::m_dec
SpiceDouble m_dec
Decliation (sky latitude)
Definition: Sensor.h:250
Isis::Sensor::m_newLookB
bool m_newLookB
flag to indicate we need to recompute ra/dec
Definition: Sensor.h:240
Isis::Sensor::SetLookDirection
bool SetLookDirection(const double v[3])
Sets the look direction of the spacecraft.
Definition: Sensor.cpp:141
Isis::Sensor::SetRightAscensionDeclination
bool SetRightAscensionDeclination(const double ra, const double dec)
Given the ra/dec compute the look direction.
Definition: Sensor.cpp:608
Isis::Sensor::PhaseAngle
virtual double PhaseAngle() const
Returns the phase angle in degrees.
Definition: Sensor.cpp:312
Isis::Sensor::Coordinate
void Coordinate(double p[3]) const
Returns the x,y,z of the surface intersection in BodyFixed km.
Definition: Sensor.cpp:196
Isis::Sensor::EmissionAngle
virtual double EmissionAngle() const
Returns the emission angle in degrees.
Definition: Sensor.cpp:324
Isis::Sensor::m_lookB
SpiceDouble m_lookB[3]
Look direction in body fixed.
Definition: Sensor.h:239
Isis::Sensor::computeRaDec
void computeRaDec()
Computes the ra/dec from the look direction.
Definition: Sensor.cpp:585
Isis::SurfacePoint
This class defines a body-fixed surface point.
Definition: SurfacePoint.h:132
Isis::Sensor::resolution
virtual double resolution()
Virtual method that returns the pixel resolution of the sensor in meters/pix.
Definition: Sensor.h:226
Isis
This is free and unencumbered software released into the public domain.
Definition: Apollo.h:16
Isis::Sensor::SlantDistance
virtual double SlantDistance() const
Return the distance between the spacecraft and surface point in kmv.
Definition: Sensor.cpp:637
Isis::Sensor::LocalRadius
Distance LocalRadius() const
Returns the local radius at the intersection point.
Definition: Sensor.cpp:267
Isis::Sensor::SetGround
bool SetGround(const SurfacePoint &surfacePt, bool backCheck=true)
This overloaded method has the opposite function as SetLookDirection.
Definition: Sensor.cpp:443
Isis::Sensor::UniversalLatitude
virtual double UniversalLatitude() const
Returns the planetocentric latitude, in degrees, at the surface intersection point in the body fixed ...
Definition: Sensor.cpp:210