Isis Developer Reference
Sensor.h
Go to the documentation of this file.
1#ifndef Sensor_h
2#define Sensor_h
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
20namespace 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;
191 virtual SurfacePoint GetSurfacePoint() 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 virtual std::vector<double> lookDirectionJ2000() const;
203 virtual 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
221 virtual double resolution() {
222 return 1.0;
223 };
224 void IgnoreElevationModel(bool ignore);
225
226 virtual QList<QPointF> PixelIfovOffsets();
227
228 virtual QString instrumentNameLong() const = 0;
229 virtual QString instrumentNameShort() const = 0;
230 virtual QString spacecraftNameLong() const = 0;
231 virtual QString spacecraftNameShort() const = 0;
232
233 protected:
234 SpiceDouble m_lookB[3];
236
237 private:
238 void CommonInitialize(const std::string &demCube);
239
240
241 SpiceDouble m_ra;
242 SpiceDouble m_dec;
243 void computeRaDec();
244 bool SetGroundLocal(bool backCheck);
245 };
246};
247
248#endif
IO Handler for Isis Cubes.
Definition Cube.h:168
Distance measurement, usually in meters.
Definition Distance.h:34
This class is designed to encapsulate the concept of a Latitude.
Definition Latitude.h:51
This class is designed to encapsulate the concept of a Longitude.
Definition Longitude.h:40
Class for computing sensor ground coordinates.
Definition Sensor.h:170
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:99
virtual SurfacePoint GetSurfacePoint() const
Returns the surface point (most efficient accessor).
Definition Sensor.cpp:257
virtual QString instrumentNameLong() const =0
bool SetUniversalGround(const double latitude, const double longitude, bool backCheck=true)
This is the opposite routine for SetLookDirection.
Definition Sensor.cpp:363
double LocalSolarTime()
Return the local solar time in hours.
Definition Sensor.cpp:665
SpiceDouble m_lookB[3]
Look direction in body fixed.
Definition Sensor.h:234
virtual double UniversalLatitude() const
Returns the planetocentric latitude, in degrees, at the surface intersection point in the body fixed ...
Definition Sensor.cpp:212
virtual double RightAscension()
Returns the right ascension angle (sky longitude).
Definition Sensor.cpp:565
Longitude GetLongitude() const
Returns a positive east, 0-360 domain longitude object at the surface intersection point in the body ...
Definition Sensor.cpp:247
virtual double SolarDistance() const
Returns the distance between the sun and surface point in AU.
Definition Sensor.cpp:682
bool HasSurfaceIntersection() const
Returns if the last call to either SetLookDirection or SetUniversalGround had a valid intersection wi...
Definition Sensor.cpp:188
virtual double SlantDistance() const
Return the distance between the spacecraft and surface point in kmv.
Definition Sensor.cpp:646
void SpacecraftSurfaceVector(double scSurfaceVector[3]) const
Sets the vector between the spacecraft and surface point in body-fixed.
Definition Sensor.cpp:634
bool m_newLookB
flag to indicate we need to recompute ra/dec
Definition Sensor.h:235
virtual QList< QPointF > PixelIfovOffsets()
This method is implemented in Camera which defaults to the (pixel pitch * summing mode ) / 2.
Definition Sensor.cpp:83
Latitude GetLatitude() const
Returns a planetocentric latitude object at the surface intersection point in body fixed.
Definition Sensor.cpp:223
virtual QString instrumentNameShort() const =0
double SpacecraftAltitude()
Returns the distance from the spacecraft to the subspacecraft point in km.
Definition Sensor.cpp:703
virtual ~Sensor()
Destroys the Sensor.
Definition Sensor.cpp:53
virtual std::vector< double > lookDirectionBodyFixed() const
Returns the look direction in the body fixed coordinate system.
Definition Sensor.cpp:539
virtual QString spacecraftNameLong() const =0
bool SetGround(const SurfacePoint &surfacePt, bool backCheck=true)
This overloaded method has the opposite function as SetLookDirection.
Definition Sensor.cpp:447
virtual std::vector< double > lookDirectionJ2000() const
Returns the look direction in the camera coordinate system.
Definition Sensor.cpp:553
void IgnoreElevationModel(bool ignore)
This allows you to ignore the cube elevation model and use the ellipse.
Definition Sensor.cpp:62
virtual double PhaseAngle() const
Returns the phase angle in degrees.
Definition Sensor.cpp:314
bool SetRightAscensionDeclination(const double ra, const double dec)
Given the ra/dec compute the look direction.
Definition Sensor.cpp:613
virtual double IncidenceAngle() const
Returns the incidence angle in degrees.
Definition Sensor.cpp:339
virtual double resolution()
Virtual method that returns the pixel resolution of the sensor in meters/pix.
Definition Sensor.h:221
virtual double UniversalLongitude() const
Returns the positive east, 0-360 domain longitude, in degrees, at the surface intersection point in t...
Definition Sensor.cpp:235
void Coordinate(double p[3]) const
Returns the x,y,z of the surface intersection in BodyFixed km.
Definition Sensor.cpp:198
Sensor(Cube &cube)
Constructs a Sensor object and loads SPICE kernels using information from the label object.
Definition Sensor.cpp:47
Distance LocalRadius() const
Returns the local radius at the intersection point.
Definition Sensor.cpp:269
virtual double Declination()
Returns the declination angle (sky latitude).
Definition Sensor.cpp:578
virtual double EmissionAngle() const
Returns the emission angle in degrees.
Definition Sensor.cpp:328
void LookDirection(double v[3]) const
Returns the look direction in the camera coordinate system.
Definition Sensor.cpp:527
bool SetLookDirection(const double v[3])
Sets the look direction of the spacecraft.
Definition Sensor.cpp:143
virtual QString spacecraftNameShort() const =0
Obtain SPICE information for a spacecraft.
Definition Spice.h:283
virtual iTime time() const
Returns the ephemeris time in seconds which was used to obtain the spacecraft and sun positions.
Definition Spice.cpp:891
This class defines a body-fixed surface point.
Definition SurfacePoint.h:132
Parse and return pieces of a time string.
Definition iTime.h:65
This is free and unencumbered software released into the public domain.
Definition Apollo.h:16