USGS

Isis 3.0 Object Programmers' Reference

Home

Isis::RadarGroundMap Class Reference

Convert between undistorted focal plane coordinate (slant range) and ground coordinates. More...

#include <RadarGroundMap.h>

Inheritance diagram for Isis::RadarGroundMap:
Inheritance graph
Collaboration diagram for Isis::RadarGroundMap:
Collaboration graph

Public Types

enum  PartialType { WRT_Latitude, WRT_Longitude, WRT_Radius }
 

Public Member Functions

 RadarGroundMap (Camera *parent, Radar::LookDirection ldir, double waveLength)
 
virtual ~RadarGroundMap ()
 Destructor.
 
virtual bool SetFocalPlane (const double ux, const double uy, const double uz)
 Compute ground position from slant range.
 
virtual bool SetGround (const Latitude &lat, const Longitude &lon)
 Compute undistorted focal plane coordinate from ground position.
 
virtual bool SetGround (const SurfacePoint &surfacePoint)
 Compute undistorted focal plane coordinate from ground position that includes a local radius.
 
virtual bool GetXY (const SurfacePoint &spoint, double *cudx, double *cudy)
 Compute undistorted focal plane coordinate from ground position using current Spice from SetImage call.
 
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 from SetImage call.
 
virtual bool GetdXYdPoint (std::vector< double > d_lookB, double *dx, double *dy)
 Compute derivative of focal plane coordinate w/r to ground point from ground position using current Spice from SetImage call.
 
void SetRangeSigma (double rangeSigma)
 Set the range sigma.
 
double RangeSigma ()
 Return the range sigma.
 
void SetDopplerSigma (double dopplerSigma)
 Set the doppler sigma.
 
double YScale ()
 Return the doppler sigma.
 
double WaveLength ()
 Return the wavelength.
 
virtual bool GetXY (const double lat, const double lon, const double radius, double *cudx, double *cudy)
 Compute undistorted focal plane coordinate from ground position using current Spice from SetImage call.
 
virtual bool GetdXYdOrientation (const SpiceRotation::PartialType varType, int coefIndex, double *cudx, double *cudy)
 Compute derivative of focal plane coordinate w/r to orientation from ground position using current Spice from SetImage call.
 
std::vector< double > PointPartial (SurfacePoint spoint, PartialType wrt)
 Compute derivative with respect to indicated variable of conversion function from lat/lon/rad to rectangular coord.
 
double DQuotient (std::vector< double > &look, std::vector< double > &dlook, int index)
 Convenience method for quotient rule applied to look vector.
 
double FocalPlaneX () const
 Return undistorted focal plane x.
 
double FocalPlaneY () const
 Return undistorted focal plane y.
 

Protected Attributes

double p_focalPlaneX
 
double p_focalPlaneY
 

Private Member Functions

double ComputeXv (SpiceDouble X[3])
 
double GetRadius (const Latitude &lat, const Longitude &lon)
 
bool Iterate (SpiceDouble &R, const double &slantRangeSqr, const SpiceDouble c[], const SpiceDouble r[], SpiceDouble X[], SpiceDouble &lat, SpiceDouble &lon, const std::vector< double > &Xsc, const bool &useSlopeEqn, const double &slope)
 Iteration loop for computing ground position from slant range.
 

Private Attributes

Radar::LookDirection p_lookDirection
 
double p_tolerance
 
double p_slantRange
 units are km
 
double p_dopplerFreq
 units are hertz
 
double p_timeTolerance
 
double p_rangeSigma
 Scaling factor to convert meters to focal plane coord.
 
double p_dopplerSigma
 Scaling factor to convert hertz to focal plane coord.
 
double p_waveLength
 
std::vector< double > p_lookB
 
std::vector< double > p_sB
 
double p_groundSlantRange
 units are km
 
double p_groundDopplerFreq
 units are hertz
 
Camerap_camera
 

Detailed Description

Convert between undistorted focal plane coordinate (slant range) and ground coordinates.

This class is used to convert between undistorted focal plane coordinate (the slant range) and ground coordinates lat/lon. This class handles the case of Radar instruments.

See Also
Camera
Author
2008-06-16 Jeff Anderson
History:

2009-07-01 Janet Barrett - Fixed intrack, crosstrack, and radial coordinate calculations; changed boundary check to use radius instead of lat,lon; updated calculation of Doppler shift

2009-10-30 Debbie A. Cook - Fixed rotation of velocity vector in SetFocalPlane, SetGround, and ComputeXv

2009-11-10 Janet Barrett - Added iteration check to SetFocalPlane to take care of situation where DEM radius does not converge

2009-11-20 Janet Barrett - Added a check to the SetGround method to determine what side of the spacecraft the focal plane coordinate falls. This fixed the mirror image problem that occurred when projecting the image.

2009-12-14 Debbie A. Cook - Added ComputeXY method

2010-03-19 Debbe A. Cook - added class members p_wavelength, p_lookB, p_sB, p_slantRange, and p_dopplerFreq; and methods SlantRangeSigma, WaveLength, DopplerSigma, SetSlantRangeSigma, GetXY, GetXYdPosition, and GetXYdPoint. Removed method SetWeightFactors.

2010-08-05 Debbie A. Cook - changed to use Surface point class

2010-11-22 Debbie A. Cook - moved PointPartial call out of GetdXYdPoint to allow BundleAdjust to avoid multiple calls for every measure. The application must call PointPartial to get the body-fixed look vector derivative prior to calling this method.

2010-12-17 Debbie A. Cook - Corrected units to kilometers in GetXY

2012-01-03 Janet Barrett - Got rid of call to SetLookDirection in the SetFocalPlane method. The call to SetLookDirection was duplicating the functionality of the SetFocalPlane method.

2012-01-04 Janet Barrett - Added check for valid radius in the SetGround method.

2012-01-27 Janet Barrett - The iterative algorithm in the SetFocalPlane method was failing on some points when using the DEM shape model. To fix this problem, I decreased the tolerance from 1E-8 to 1E-6 and increased the number of iterations from 30 to 100.

2012-04-03 Janet Barrett - The iteration code was moved to its own method so that it can be run multiple times if necessary. The first iteration should suffice for those pixels that have shallow slopes. For those pixels that lie on steep slopes (up to 2x the incidence angle), then an additional iteration call is needed. In the future, we may need to add more calls to the iteration method if the slope is greater than 2x the incidence angle. The slope variable will need to be halved each time the iteration method is called until a solution is found. So, for example, if we needed to call the iteration method a third time, the slope variable would be set to .25.

2012-04-11 Janet Barrett - Removed call to SetLookDirection from the SetGround method.

2012-07-06 Debbie A. Cook, Updated Spice members to be more compliant with Isis coding standards. References #972.

2013-02-11 Debbie A. Cook, Fixed SetGround method by adding call to set the surface point in the ShapeModel so that photometric angles can be calculated. References #775

Definition at line 106 of file RadarGroundMap.h.

Constructor & Destructor Documentation

virtual Isis::RadarGroundMap::~RadarGroundMap ( )
inlinevirtual

Destructor.

Definition at line 111 of file RadarGroundMap.h.

Member Function Documentation

double Isis::CameraGroundMap::DQuotient ( std::vector< double > &  look,
std::vector< double > &  dlook,
int  index 
)
inherited

Convenience method for quotient rule applied to look vector.

This method will compute the derivative of the following function (coordinate x or y) / (coordinate z)

Parameters
looklook vector in camera frame
dlookderivative of look vector in camera frame
indexvector value to differentiate
Returns
derivative

Definition at line 385 of file CameraGroundMap.cpp.

double Isis::CameraGroundMap::FocalPlaneX ( ) const
inlineinherited

Return undistorted focal plane x.

Definition at line 113 of file CameraGroundMap.h.

Referenced by Isis::Camera::RawFocalPlanetoImage().

double Isis::CameraGroundMap::FocalPlaneY ( ) const
inlineinherited

Return undistorted focal plane y.

Definition at line 118 of file CameraGroundMap.h.

Referenced by Isis::Camera::RawFocalPlanetoImage().

bool Isis::CameraGroundMap::GetdXYdOrientation ( const SpiceRotation::PartialType  varType,
int  coefIndex,
double *  dx,
double *  dy 
)
virtualinherited

Compute derivative of focal plane coordinate w/r to orientation from ground position using current Spice from SetImage call.

This method will compute the derivative of the undistorted focal plane coordinate for a ground position with respect to the instrument orientation, using the current Spice settings (time and kernels) without resetting the current point values for lat/lon/radius/x/y.

Parameters
varTypeenumerated partial type (definitions in SpicePosition)
coefIndexcoefficient index of fit polynomial
*dxpointer to partial derivative of undistorted focal plane x
*dypointer to partial derivative of undistorted focal plane y
Returns
conversion was successful

Definition at line 280 of file CameraGroundMap.cpp.

References Isis::SpiceRotation::ReferenceVector(), and Isis::SpiceRotation::ToReferencePartial().

Referenced by Isis::BundleAdjust::AddPartials(), and Isis::BundleAdjust::ComputePartials_DC().

bool Isis::RadarGroundMap::GetdXYdPoint ( std::vector< double >  d_lookB,
double *  dx,
double *  dy 
)
virtual

Compute derivative of focal plane coordinate w/r to ground point from ground position using current Spice from SetImage call.

This method will compute the derivative of the undistorted focal plane coordinate for a ground position with respect to lat, lon, or radius, using the current Spice settings (time and kernels) without resetting the current point values for lat/lon/radius/x/y.

Parameters
varTypeenumerated partial type (definitions in SpicePosition)
coefIndexcoefficient index of fit polynomial
*dxpointer to partial derivative of undistorted focal plane x
*dypointer to partial derivative of undistorted focal plane y
Returns
conversion was successful

Reimplemented from Isis::CameraGroundMap.

Definition at line 498 of file RadarGroundMap.cpp.

References p_dopplerSigma, p_groundDopplerFreq, p_groundSlantRange, and p_rangeSigma.

bool Isis::RadarGroundMap::GetdXYdPosition ( const SpicePosition::PartialType  varType,
int  coefIndex,
double *  dx,
double *  dy 
)
virtual

Compute derivative w/r to position of focal plane coordinate from ground position using current Spice from SetImage call.

This method will compute the derivative of the undistorted focal plane coordinate for a ground position with respect to a spacecraft position coordinate, using the current Spice settings (time and kernels) without resetting the current point values for lat/lon/radius/x/y.

Parameters
varTypeenumerated partial type (definitions in SpicePosition)
coefIndexcoefficient index of fit polynomial
*dxpointer to partial derivative of undistorted focal plane x
*dypointer to partial derivative of undistorted focal plane y
Returns
conversion was successful

Reimplemented from Isis::CameraGroundMap.

Definition at line 463 of file RadarGroundMap.cpp.

References Isis::Spice::bodyRotation(), Isis::SpicePosition::CoordinatePartial(), Isis::Spice::instrumentPosition(), p_dopplerSigma, p_groundDopplerFreq, p_groundSlantRange, p_rangeSigma, Isis::SpiceRotation::ReferenceVector(), and Isis::SpicePosition::VelocityPartial().

bool Isis::CameraGroundMap::GetXY ( const double  lat,
const double  lon,
const double  radius,
double *  cudx,
double *  cudy 
)
virtualinherited

Compute undistorted focal plane coordinate from ground position using current Spice from SetImage call.

This method will compute the undistorted focal plane coordinate for a ground position, using the current Spice settings (time and kernels) without resetting the current point values for lat/lon/radius/p_pB/x/y. The class value for p_look is set by this method.

Parameters
latLatitude in degrees
lonLongitude in degrees
radius
Returns
conversion was successful

Definition at line 220 of file CameraGroundMap.cpp.

bool Isis::RadarGroundMap::GetXY ( const SurfacePoint spoint,
double *  cudx,
double *  cudy 
)
virtual

Compute undistorted focal plane coordinate from ground position using current Spice from SetImage call.

This method will compute the undistorted focal plane coordinate for a ground position, using the current Spice settings (time and kernels) without resetting the current point values for lat/lon/radius/x/y and related radar parameter p_slantRange.

Parameters
spoint
Returns
conversion was successful

Reimplemented from Isis::CameraGroundMap.

Definition at line 368 of file RadarGroundMap.cpp.

References Isis::Spice::bodyRotation(), Isis::SpicePosition::Coordinate(), Isis::Spice::instrumentPosition(), Isis::Displacement::kilometers(), p_dopplerSigma, p_groundDopplerFreq, p_groundSlantRange, p_rangeSigma, Isis::SpiceRotation::ReferenceVector(), and Isis::SpicePosition::Velocity().

bool Isis::RadarGroundMap::Iterate ( SpiceDouble &  R,
const double &  slantRangeSqr,
const SpiceDouble  c[],
const SpiceDouble  r[],
SpiceDouble  X[],
SpiceDouble &  lat,
SpiceDouble &  lon,
const std::vector< double > &  Xsc,
const bool &  useSlopeEqn,
const double &  slope 
)
private

Iteration loop for computing ground position from slant range.

Parameters
uxSlant range distance in meters scaled to focal plane
uyDoppler shift (always 0.0)
uzNot used
Returns
conversion was successful

Definition at line 159 of file RadarGroundMap.cpp.

References Isis::Distance::kilometers(), Isis::Sensor::LocalRadius(), and Isis::PI().

Referenced by SetFocalPlane().

std::vector< double > Isis::CameraGroundMap::PointPartial ( SurfacePoint  spoint,
PartialType  wrt 
)
inherited

Compute derivative with respect to indicated variable of conversion function from lat/lon/rad to rectangular coord.

Parameters
latplanetocentric latitude in degrees
lonplanetocentric longitude in degrees
radiuslocal radius in meters
wrttake derivative with respect to this value
Returns
partialDerivative

Definition at line 343 of file CameraGroundMap.cpp.

References Isis::SurfacePoint::GetLatitude(), Isis::SurfacePoint::GetLocalRadius(), Isis::SurfacePoint::GetLongitude(), Isis::Distance::kilometers(), and Isis::Angle::radians().

Referenced by Isis::BundleAdjust::AddPartials(), and Isis::BundleAdjust::ComputePartials_DC().

double Isis::RadarGroundMap::RangeSigma ( )
inline

Return the range sigma.

Definition at line 130 of file RadarGroundMap.h.

References p_rangeSigma.

void Isis::RadarGroundMap::SetDopplerSigma ( double  dopplerSigma)
inline

Set the doppler sigma.

Definition at line 135 of file RadarGroundMap.h.

References p_dopplerSigma.

Referenced by Isis::MiniRF::MiniRF().

bool Isis::RadarGroundMap::SetFocalPlane ( const double  ux,
const double  uy,
const double  uz 
)
virtual

Compute ground position from slant range.

Parameters
uxSlant range distance in meters scaled to focal plane
uyDoppler shift (always 0.0)
uzNot used
Returns
conversion was successful

Reimplemented from Isis::CameraGroundMap.

Definition at line 61 of file RadarGroundMap.cpp.

References Isis::Spice::bodyRotation(), Isis::SpicePosition::Coordinate(), Isis::Spice::instrumentPosition(), Isis::Spice::instrumentRotation(), Iterate(), Isis::SpiceRotation::J2000Vector(), Isis::Distance::kilometers(), p_rangeSigma, Isis::PI(), Isis::Spice::radii(), Isis::SpiceRotation::ReferenceVector(), and Isis::SpicePosition::Velocity().

bool Isis::RadarGroundMap::SetGround ( const Latitude lat,
const Longitude lon 
)
virtual

Compute undistorted focal plane coordinate from ground position.

Parameters
latplanetocentric latitude in degrees
lonplanetocentric longitude in degrees
Returns
conversion was successful

Reimplemented from Isis::CameraGroundMap.

Definition at line 216 of file RadarGroundMap.cpp.

References Isis::Sensor::LocalRadius().

bool Isis::RadarGroundMap::SetGround ( const SurfacePoint surfacePoint)
virtual

Compute undistorted focal plane coordinate from ground position that includes a local radius.

Parameters
latplanetocentric latitude in degrees
lonplanetocentric longitude in degrees
radiuslocal radius in meters
Returns
conversion was successful

Reimplemented from Isis::CameraGroundMap.

Definition at line 234 of file RadarGroundMap.cpp.

References Isis::Spice::bodyRotation(), Isis::SpicePosition::Coordinate(), Isis::Spice::instrumentPosition(), Isis::Spice::instrumentRotation(), Isis::SpiceRotation::J2000Vector(), p_rangeSigma, p_slantRange, Isis::SpiceRotation::ReferenceVector(), Isis::Camera::SetFocalLength(), Isis::ShapeModel::setSurfacePoint(), Isis::Target::shape(), Isis::Spice::target(), Isis::SurfacePoint::ToNaifArray(), and Isis::SpicePosition::Velocity().

void Isis::RadarGroundMap::SetRangeSigma ( double  rangeSigma)
inline

Set the range sigma.

Definition at line 125 of file RadarGroundMap.h.

References p_rangeSigma.

Referenced by Isis::MiniRF::MiniRF().

double Isis::RadarGroundMap::WaveLength ( )
inline

Return the wavelength.

Definition at line 145 of file RadarGroundMap.h.

double Isis::RadarGroundMap::YScale ( )
inline

Return the doppler sigma.

Definition at line 140 of file RadarGroundMap.h.

References p_dopplerSigma.

Member Data Documentation

double Isis::RadarGroundMap::p_dopplerFreq
private

units are hertz

Definition at line 161 of file RadarGroundMap.h.

double Isis::RadarGroundMap::p_dopplerSigma
private

Scaling factor to convert hertz to focal plane coord.

Definition at line 164 of file RadarGroundMap.h.

Referenced by GetdXYdPoint(), GetdXYdPosition(), GetXY(), SetDopplerSigma(), and YScale().

double Isis::RadarGroundMap::p_groundDopplerFreq
private

units are hertz

Definition at line 170 of file RadarGroundMap.h.

Referenced by GetdXYdPoint(), GetdXYdPosition(), and GetXY().

double Isis::RadarGroundMap::p_groundSlantRange
private

units are km

Definition at line 169 of file RadarGroundMap.h.

Referenced by GetdXYdPoint(), GetdXYdPosition(), and GetXY().

double Isis::RadarGroundMap::p_rangeSigma
private

Scaling factor to convert meters to focal plane coord.

Definition at line 163 of file RadarGroundMap.h.

Referenced by GetdXYdPoint(), GetdXYdPosition(), GetXY(), RangeSigma(), SetFocalPlane(), SetGround(), and SetRangeSigma().

double Isis::RadarGroundMap::p_slantRange
private

units are km

Definition at line 160 of file RadarGroundMap.h.

Referenced by SetGround().


The documentation for this class was generated from the following files: