Isis Developer Reference
CameraGroundMap.h
Go to the documentation of this file.
1 #ifndef CameraGroundMap_h
2 #define CameraGroundMap_h
3 
8 /* SPDX-License-Identifier: CC0-1.0 */
9 
10 #include "Camera.h"
11 #include "CameraDistortionMap.h"
12 #include "SpicePosition.h"
13 #include "SurfacePoint.h"
14 
15 namespace Isis {
74  public:
75  CameraGroundMap(Camera *parent);
76 
78  virtual ~CameraGroundMap() {};
79 
80  virtual bool SetFocalPlane(const double ux, const double uy,
81  const double uz);
82 
87  enum PartialType {
94  };
95 
96  virtual bool SetGround(const Latitude &lat, const Longitude &lon);
97  virtual bool SetGround(const SurfacePoint &surfacePoint);
98  virtual bool GetXY(const SurfacePoint &spoint, double *cudx,
99  double *cudy, bool test=true);
100  virtual bool GetXY(const double lat, const double lon,
101  const double radius, double *cudx, double *cudy);
102  virtual bool GetdXYdPosition(const SpicePosition::PartialType varType,
103  int coefIndex,
104  double *cudx, double *cudy);
105  virtual bool GetdXYdOrientation(const SpiceRotation::PartialType varType,
106  int coefIndex,
107  double *cudx, double *cudy);
108  virtual bool GetdXYdTOrientation(const SpiceRotation::PartialType varType,
109  int coefIndex,
110  double *cudx, double *cudy);
111  virtual bool GetdXYdPoint(std::vector<double> d_pB,
112  double *dx, double *dy);
113  std::vector<double> PointPartial(SurfacePoint spoint, PartialType wrt);
114  std::vector<double> EllipsoidPartial(SurfacePoint spoint, PartialType raxis);
115  std::vector<double> MeanRadiusPartial(SurfacePoint spoint, Distance meanRadius);
116  double DQuotient(std::vector<double> &look, std::vector<double> &dlook,
117  int index);
118 
122  inline double FocalPlaneX() const {
123  return p_focalPlaneX;
124  };
125 
129  inline double FocalPlaneY() const {
130  return p_focalPlaneY;
131  };
132 
133  protected:
135  double p_focalPlaneX;
136  double p_focalPlaneY;
137 
138  private:
139  void LookCtoFocalPlaneXY();
140 
141  std::vector<double> m_pB;
143  std::vector<double> m_lookJ;
144  };
145 };
146 #endif
Isis::Distance::kilometers
double kilometers() const
Get the distance in kilometers.
Definition: Distance.cpp:106
Isis::CameraGroundMap::GetdXYdPoint
virtual bool GetdXYdPoint(std::vector< double > d_pB, double *dx, double *dy)
Compute derivative of focal plane coordinate w/r to ground point using current state.
Definition: CameraGroundMap.cpp:398
Isis::SpicePosition::PartialType
PartialType
Definition: SpicePosition.h:201
Isis::CameraGroundMap::FocalPlaneX
double FocalPlaneX() const
Definition: CameraGroundMap.h:122
Isis::CameraGroundMap::DQuotient
double DQuotient(std::vector< double > &look, std::vector< double > &dlook, int index)
Convenience method for quotient rule applied to look vector.
Definition: CameraGroundMap.cpp:550
Isis::SpicePosition
Obtain SPICE position information for a body.
Definition: SpicePosition.h:173
Isis::CameraGroundMap::EllipsoidPartial
std::vector< double > EllipsoidPartial(SurfacePoint spoint, PartialType raxis)
Compute derivative of focal plane coordinate w/r to one of the ellipsoidal radii (a,...
Definition: CameraGroundMap.cpp:436
Isis::SurfacePoint::GetX
Displacement GetX() const
Definition: SurfacePoint.cpp:1436
Isis::CameraGroundMap::p_focalPlaneY
double p_focalPlaneY
Camera's y focal plane coordinate.
Definition: CameraGroundMap.h:136
Isis::CameraGroundMap::WRT_Latitude
@ WRT_Latitude
Definition: CameraGroundMap.h:88
Isis::PI
const double PI
The mathematical constant PI.
Definition: Constants.h:40
Isis::CameraGroundMap::GetXY
virtual bool GetXY(const SurfacePoint &spoint, double *cudx, double *cudy, bool test=true)
Compute undistorted focal plane coordinate from ground position using current Spice from SetImage cal...
Definition: CameraGroundMap.cpp:152
Isis::Latitude
This class is designed to encapsulate the concept of a Latitude.
Definition: Latitude.h:51
Isis::CameraGroundMap::GetdXYdOrientation
virtual bool GetdXYdOrientation(const SpiceRotation::PartialType varType, int coefIndex, double *cudx, double *cudy)
Compute derivative of focal plane coordinate w/r to instrument using current state from SetImage call...
Definition: CameraGroundMap.cpp:318
Isis::CameraGroundMap::WRT_Longitude
@ WRT_Longitude
Definition: CameraGroundMap.h:89
Isis::SpicePosition::CoordinatePartial
std::vector< double > CoordinatePartial(SpicePosition::PartialType partialVar, int coeffIndex)
Set the coefficients of a polynomial fit to each of the three coordinates of the position vector for ...
Definition: SpicePosition.cpp:1167
Isis::Camera::SetGroundMap
void SetGroundMap(CameraGroundMap *map)
Sets the Ground Map.
Definition: Camera.cpp:2387
SpicePosition.h
Target.h
Isis::CameraGroundMap::~CameraGroundMap
virtual ~CameraGroundMap()
Destructor.
Definition: CameraGroundMap.h:78
Longitude.h
NaifStatus.h
Isis::SurfacePoint::GetZ
Displacement GetZ() const
Definition: SurfacePoint.cpp:1450
Isis::CameraGroundMap::WRT_MajorAxis
@ WRT_MajorAxis
Definition: CameraGroundMap.h:91
Isis::SurfacePoint::GetLatitude
Latitude GetLatitude() const
Return the body-fixed latitude for the surface point.
Definition: SurfacePoint.cpp:1665
Isis::CameraGroundMap::GetdXYdPosition
virtual bool GetdXYdPosition(const SpicePosition::PartialType varType, int coefIndex, double *cudx, double *cudy)
Compute derivative w/r to position of focal plane coordinate from ground position using current Spice...
Definition: CameraGroundMap.cpp:279
Isis::Camera
Definition: Camera.h:236
Isis::SpiceRotation::J2000Vector
std::vector< double > J2000Vector(const std::vector< double > &rVec)
Given a direction vector in the reference frame, return a J2000 direction.
Definition: SpiceRotation.cpp:1408
Isis::CameraGroundMap::p_focalPlaneX
double p_focalPlaneX
Camera's x focal plane coordinate.
Definition: CameraGroundMap.h:135
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::CameraGroundMap
Convert between undistorted focal plane and ground coordinates.
Definition: CameraGroundMap.h:73
Isis::CameraGroundMap::WRT_Radius
@ WRT_Radius
Definition: CameraGroundMap.h:90
Latitude.h
_FILEINFO_
#define _FILEINFO_
Macro for the filename and line number.
Definition: IException.h:24
CameraGroundMap.h
Isis::SpiceRotation::PartialType
PartialType
This enumeration indicates whether the partial derivative is taken with respect to Right Ascension,...
Definition: SpiceRotation.h:258
Isis::CameraGroundMap::PointPartial
std::vector< double > PointPartial(SurfacePoint spoint, PartialType wrt)
Compute derivative with respect to indicated variable of conversion function from lat/lon/rad to rect...
Definition: CameraGroundMap.cpp:508
SurfacePoint.h
Isis::SpiceRotation::ToReferencePartial
std::vector< double > ToReferencePartial(std::vector< double > &lookJ, PartialType partialVar, int coeffIndex)
Compute the derivative with respect to one of the coefficients in the angle polynomial fit equation o...
Definition: SpiceRotation.cpp:2232
CameraDistortionMap.h
Isis::Distance::isValid
bool isValid() const
Test if this distance has been initialized or not.
Definition: Distance.cpp:192
Isis::CameraGroundMap::CameraGroundMap
CameraGroundMap(Camera *parent)
Constructor.
Definition: CameraGroundMap.cpp:31
Isis::CameraGroundMap::p_camera
Camera * p_camera
Camera.
Definition: CameraGroundMap.h:131
Isis::CameraGroundMap::GetdXYdTOrientation
virtual bool GetdXYdTOrientation(const SpiceRotation::PartialType varType, int coefIndex, double *cudx, double *cudy)
Compute derivative of focal plane coordinate w/r to target body using current state.
Definition: CameraGroundMap.cpp:354
Isis::IException
Isis exception class.
Definition: IException.h:91
Isis::SurfacePoint::GetLongitude
Longitude GetLongitude() const
Return the body-fixed longitude for the surface point.
Definition: SurfacePoint.cpp:1685
Camera.h
Isis::Displacement::kilometers
double kilometers() const
Get the displacement in kilometers.
Definition: Displacement.cpp:94
IException.h
Isis::SurfacePoint::GetLocalRadius
Distance GetLocalRadius() const
Return the radius of the surface point.
Definition: SurfacePoint.cpp:1732
std
Namespace for the standard library.
Isis::SpiceRotation::toJ2000Partial
std::vector< double > toJ2000Partial(const std::vector< double > &lookT, PartialType partialVar, int coeffIndex)
Given a direction vector in the reference frame, compute the derivative with respect to one of the co...
Definition: SpiceRotation.cpp:1607
Isis::CameraGroundMap::WRT_PolarAxis
@ WRT_PolarAxis
Definition: CameraGroundMap.h:93
Isis::Angle::degrees
double degrees() const
Get the angle in units of Degrees.
Definition: Angle.h:232
Isis::CameraGroundMap::SetFocalPlane
virtual bool SetFocalPlane(const double ux, const double uy, const double uz)
Compute ground position from focal plane coordinate.
Definition: CameraGroundMap.cpp:50
Isis::SpiceRotation::ReferenceVector
std::vector< double > ReferenceVector(const std::vector< double > &jVec)
Given a direction vector in J2000, return a reference frame direction.
Definition: SpiceRotation.cpp:1700
Isis::CameraGroundMap::WRT_MinorAxis
@ WRT_MinorAxis
Definition: CameraGroundMap.h:92
Isis::CameraGroundMap::FocalPlaneY
double FocalPlaneY() const
Definition: CameraGroundMap.h:129
Isis::CameraGroundMap::MeanRadiusPartial
std::vector< double > MeanRadiusPartial(SurfacePoint spoint, Distance meanRadius)
Compute derivative of focal plane coordinate w/r to mean of the ellipsoidal radii (a,...
Definition: CameraGroundMap.cpp:486
Isis::SurfacePoint
This class defines a body-fixed surface point.
Definition: SurfacePoint.h:132
Isis::SurfacePoint::GetY
Displacement GetY() const
Definition: SurfacePoint.cpp:1443
Isis
This is free and unencumbered software released into the public domain.
Definition: Apollo.h:16
Isis::SpiceRotation
Obtain SPICE rotation information for a body.
Definition: SpiceRotation.h:209
Isis::CameraGroundMap::SetGround
virtual bool SetGround(const Latitude &lat, const Longitude &lon)
Compute undistorted focal plane coordinate from ground position.
Definition: CameraGroundMap.cpp:76
Isis::CameraGroundMap::PartialType
PartialType
Radius axes types to use when computing partials.
Definition: CameraGroundMap.h:87
Isis::Angle::radians
double radians() const
Convert an angle to a double.
Definition: Angle.h:226