32 #include "CubeManager.h" 48 #define MAX(x,y) (((x) > (y)) ? (x) : (y)) 98 QString message =
"Pixel Ifov offsets not implemented for this camera.";
164 vector<double> lookC(v, v + 3);
174 memcpy(
m_lookB, &lookB[0],
sizeof(
double) * 3);
189 return target()->
shape()->intersectSurface(sB, lookB);
328 std::vector<double> sunB(
m_uB,
m_uB+3);
351 std::vector<double> sunB(
m_uB,
m_uB+3);
375 const double longitude,
390 shape->intersectSurface(lat, lon,
417 const double longitude,
468 shape->intersectSurface(surfacePt,
504 const vector<double> &sB =
551 vector<double> lookB(3);
598 vector<double> lookB(3);
605 recrad_c((SpiceDouble *)&lookJ[0], &range, &
m_ra, &
m_dec);
620 vector<double> lookJ(3);
621 radrec_c(1.0, ra *
PI / 180.0, dec *
PI / 180.0, (SpiceDouble *)&lookJ[0]);
637 scSurfaceVector[0] =
m_lookB[0];
638 scSurfaceVector[1] =
m_lookB[1];
639 scSurfaceVector[2] =
m_lookB[2];
649 SpiceDouble psB[3], upsB[3];
660 vsub_c(pB, (SpiceDouble *) &sB[0], psB);
661 unorm_c(psB, upsB, &dist);
677 if (lst < 0.0) lst += 24.0;
678 if (lst > 24.0) lst -= 24.0;
700 double dist = sqrt(xChange*xChange + yChange*yChange + zChange*zChange);
701 dist /= 149597870.691;
720 double rlat = lat *
PI / 180.0;
721 double rlon = lon *
PI / 180.0;
731 double xChange = spB[0] - ssB[0];
732 double yChange = spB[1] - ssB[1];
733 double zChange = spB[2] - ssB[2];
736 double dist = sqrt(xChange*xChange + yChange*yChange + zChange*zChange);
This class defines a body-fixed surface point.
SpicePosition * instrumentPosition() const
Accessor method for the instrument position.
void Coordinate(double p[3]) const
Returns the x,y,z of the surface intersection in BodyFixed km.
double RightAscension()
Returns the right ascension angle (sky longitude).
void IgnoreElevationModel(bool ignore)
This allows you to ignore the cube elevation model and use the ellipse.
double SolarDistance() const
Returns the distance between the sun and surface point in AU.
Parse and return pieces of a time string.
const double PI
The mathematical constant PI.
virtual QList< QPointF > PixelIfovOffsets()
This method is implemented in Camera which defaults to the (pixel pitch * summing mode ) / 2...
double UniversalLatitude() const
Returns the planetocentric latitude, in degrees, at the surface intersection point in the body fixed ...
SpiceDouble m_dec
Decliation (sky latitude)
bool hasIntersection()
Returns intersection status.
SpiceRotation * bodyRotation() const
Accessor method for the body rotation.
bool SetRightAscensionDeclination(const double ra, const double dec)
Given the ra/dec compute the look direction.
bool SetGround(const SurfacePoint &surfacePt, bool backCheck=true)
This overloaded method has the opposite function as SetLookDirection.
Namespace for the standard library.
SpiceDouble m_lookB[3]
Look direction in body fixed.
This class is designed to encapsulate the concept of a Latitude.
void computeRaDec()
Computes the ra/dec from the look direction.
bool SetUniversalGround(const double latitude, const double longitude, bool backCheck=true)
This is the opposite routine for SetLookDirection.
SurfacePoint * surfaceIntersection() const
Returns the surface intersection for this ShapeModel.
bool SetLookDirection(const double v[3])
Sets the look direction of the spacecraft.
bool m_newLookB
flag to indicate we need to recompute ra/dec
double SlantDistance() const
Return the distance between the spacecraft and surface point in kmv.
virtual double emissionAngle(const std::vector< double > &sB)
Computes and returns emission angle, in degrees, given the observer position.
Unless noted otherwise, the portions of Isis written by the USGS are public domain.
This error is for when a programmer made an API call that was illegal.
double kilometers() const
Get the distance in kilometers.
Distance measurement, usually in meters.
Latitude GetLatitude() const
Return the body-fixed latitude for the surface point.
double degrees() const
Get the angle in units of Degrees.
bool SetGroundLocal(bool backCheck)
Computes look vector.
Distance LocalRadius() const
Returns the local radius at the intersection point.
void setHasIntersection(bool b)
Sets the flag to indicate whether this ShapeModel has an intersection.
double EmissionAngle() const
Returns the emission angle in degrees.
This class is designed to encapsulate the concept of a Longitude.
virtual double phaseAngle(const std::vector< double > &sB, const std::vector< double > &uB)
Computes and returns phase angle, in degrees, given the positions of the observer and illuminator...
void restoreShape()
Restores the shape to the original after setShapeEllipsoid has overridden it.
virtual ~Sensor()
Destroys the Sensor.
Degrees are generally considered more human readable, 0-360 is one circle, however most math does not...
std::vector< double > ReferenceVector(const std::vector< double > &jVec)
Given a direction vector in J2000, return a reference frame direction.
Target * target() const
Returns a pointer to the target object.
void subSolarPoint(double &lat, double &lon)
Returns the sub-solar latitude/longitude in universal coordinates (0-360 positive east...
#define _FILEINFO_
Macro for the filename and line number.
SpicePosition * sunPosition() const
Accessor method for the sun position.
virtual double incidenceAngle(const std::vector< double > &uB)
Computes and returns incidence angle, in degrees, given the illuminator position. ...
ShapeModel * shape() const
Return the shape.
Longitude GetLongitude() const
Returns a positive east, 0-360 domain longitude object at the surface intersection point in the body ...
void setTime(const iTime &time)
By setting the time you essential set the position of the spacecraft and body as indicated in the cla...
double UniversalLongitude() const
Returns the positive east, 0-360 domain longitude, in degrees, at the surface intersection point in t...
virtual void clearSurfacePoint()
Clears or resets the current surface point.
double PhaseAngle() const
Returns the phase angle in degrees.
double SpacecraftAltitude()
Returns the distance from the spacecraft to the subspacecraft point in km.
Define shapes and provide utilities for Isis3 targets.
Unless noted otherwise, the portions of Isis written by the USGS are public domain.
SpiceDouble m_ra
Right ascension (sky longitude)
Longitude GetLongitude() const
Return the body-fixed longitude for the surface point.
virtual bool isVisibleFrom(const std::vector< double > observerPos, const std::vector< double > lookDirection)
Default occulsion implementation.
std::vector< double > J2000Vector(const std::vector< double > &rVec)
Given a direction vector in the reference frame, return a J2000 direction.
void LookDirection(double v[3]) const
Returns the look direction in the camera coordinate system.
void setShapeEllipsoid()
Set the shape to the ellipsoid and save the original shape.
SurfacePoint GetSurfacePoint() const
Returns the surface point (most efficient accessor).
Namespace for ISIS/Bullet specific routines.
SpiceRotation * instrumentRotation() const
Accessor method for the instrument rotation.
double IncidenceAngle() const
Returns the incidence angle in degrees.
std::vector< double > lookDirectionJ2000() const
Returns the look direction in the camera coordinate system.
Obtain SPICE information for a spacecraft.
The distance is being specified in meters.
double kilometers() const
Get the displacement in kilometers.
double LocalSolarTime()
Return the local solar time in hours.
std::vector< double > lookDirectionBodyFixed() const
Returns the look direction in the body fixed coordinate system.
SpiceDouble m_uB[3]
This contains the sun position (u) in the bodyfixed reference frame (B).
void SpacecraftSurfaceVector(double scSurfaceVector[3]) const
Sets the vector between the spacecraft and surface point in body-fixed.
Distance GetLocalRadius() const
Return the radius of the surface point.
Latitude GetLatitude() const
Returns a planetocentric latitude object at the surface intersection point in body fixed...
void setTime(const iTime &time)
Sets the ephemeris time and reads the spacecraft and sun position from the kernels at that instant in...
bool HasSurfaceIntersection() const
Returns if the last call to either SetLookDirection or SetUniversalGround had a valid intersection wi...
Unless noted otherwise, the portions of Isis written by the USGS are public domain.
double Declination()
Returns the declination angle (sky latitude).
IO Handler for Isis Cubes.
iTime time() const
Returns the ephemeris time in seconds which was used to obtain the spacecraft and sun positions...
void subSpacecraftPoint(double &lat, double &lon)
Returns the sub-spacecraft latitude/longitude in universal coordinates (0-360 positive east...