USGS

Isis 3.0 Developer's Reference (API)

Home

Sensor.h

Go to the documentation of this file.
00001 #ifndef Sensor_h
00002 #define Sensor_h
00003 
00025 #include "Spice.h"
00026 #include "Cube.h"
00027 #include "ProjectionFactory.h"
00028 #include "Portal.h"
00029 #include "Interpolator.h"
00030 
00031 namespace Isis {
00032   class Distance;
00033   class iTime;
00034   class Latitude;
00035   class Longitude;
00036   class SurfacePoint;
00037 
00172   class Sensor : public Spice {
00173     public:
00174       Sensor(Pvl &lab);
00175 
00176       virtual ~Sensor();
00177 
00178       void SetTime(const iTime &time);
00179       bool SetLookDirection(const double v[3]);
00180       bool SetRightAscensionDeclination(const double ra, const double dec);
00181       bool SetUniversalGround(const double latitude, const double longitude,
00182                               bool backCheck = true);
00183       bool SetUniversalGround(const double latitude, const double longitude,
00184                               const double radius, bool backCheck = true);
00185       bool SetGround(const SurfacePoint &surfacePt, bool backCheck = true);
00186 
00196       inline bool HasSurfaceIntersection() const {
00197         return p_hasIntersection;
00198       };
00199 
00200       void Coordinate(double p[3]) const;
00201 
00208       double UniversalLatitude() const;
00209 
00213       Latitude GetLatitude() const;
00214 
00221       double UniversalLongitude() const;
00222 
00226       Longitude GetLongitude() const;
00227 
00231       SurfacePoint GetSurfacePoint() const;
00232 
00238       Distance LocalRadius() const;
00239       Distance LocalRadius(Latitude lat, Longitude lon);
00240       Distance LocalRadius(double lat, double lon);
00241 
00242       double PhaseAngle() const;
00243       double EmissionAngle() const;
00244       double IncidenceAngle() const;
00245 
00246       void LookDirection(double v[3]) const;
00247 
00248       double RightAscension();
00249       double Declination();
00250 
00252       void SpacecraftSurfaceVector(double scSurfaceVector[3]) const;
00253       double SlantDistance() const;
00254       double LocalSolarTime();
00255       double SolarDistance() const;
00256       double SpacecraftAltitude();
00257 
00259       Distance DemRadius(const SurfacePoint &pt);
00260       Distance DemRadius(const Latitude &lat, const Longitude &lon);
00261 
00268       bool HasElevationModel() {
00269         return p_hasElevationModel;
00270       };
00271 
00278       virtual double Resolution() {
00279         return 1.0;
00280       };
00281 
00282       void IgnoreElevationModel(bool ignore);
00283 
00284     protected:
00285       bool p_hasIntersection; 
00289       Cube *p_demCube;         
00290       SurfacePoint *p_surfacePoint; 
00291 
00292     private:
00294       double DemRadius(double lat, double lon);
00295       double EmissionAngle(const std::vector<double> & sB) const;
00296       void CommonInitialize(const std::string &demCube);
00297 
00298       SpiceDouble p_lookB[3];  
00299 
00300       bool p_newLookB;      
00301       SpiceDouble p_ra;     
00302       SpiceDouble p_dec;    
00303       void computeRaDec();  
00304 
00305       bool p_hasElevationModel;     
00306       Projection *p_demProj;  
00307       Portal *p_portal;       
00308       Interpolator *p_interp; 
00309       bool SetGroundLocal(bool backCheck);   
00310 
00311       Distance *p_minRadius;  
00312       Distance *p_maxRadius;  
00313       double p_demScale;   
00314   };
00315 };
00316 
00317 #endif