Isis 3 Programmer Reference
Isis::SurfacePoint Class Reference

This class defines a body-fixed surface point. More...

#include <SurfacePoint.h>

Collaboration diagram for Isis::SurfacePoint:
Collaboration graph

Public Types

enum  CoordinateType { Latitudinal, Rectangular }
 Defines the coordinate typ, units, and coordinate index for some of the output methods. More...
 
enum  CoordUnits { Degrees, Kilometers, Meters, Radians }
 
enum  CoordIndex { One =0, Two =1, Three =2 }
 

Public Member Functions

 SurfacePoint ()
 Constructs an empty SurfacePoint object. More...
 
 SurfacePoint (const SurfacePoint &other)
 Constructs a new SurfacePoint object from an existing SurfacePoint. More...
 
 SurfacePoint (const Latitude &lat, const Longitude &lon, const Distance &radius)
 Constructs a SurfacePoint object with a spherical point only. More...
 
 SurfacePoint (const Latitude &lat, const Longitude &lon, const Distance &radius, const Angle &latSigma, const Angle &lonSigma, const Distance &radiusSigma)
 Constructs a SurfacePoint object with a spherical point and its sigmas. More...
 
 SurfacePoint (const Latitude &lat, const Longitude &lon, const Distance &radius, const boost::numeric::ublas::symmetric_matrix< double, boost::numeric::ublas::upper > &covar)
 
 SurfacePoint (const Displacement &x, const Displacement &y, const Displacement &z)
 Constructs a SurfacePoint object with a rectangular point only. More...
 
 SurfacePoint (const Displacement &x, const Displacement &y, const Displacement &z, const Distance &xSigma, const Distance &ySigma, const Distance &zSigma)
 Constructs a SurfacePoint object with a rectangular point and sigmas. More...
 
 SurfacePoint (const Displacement &x, const Displacement &y, const Displacement &z, const boost::numeric::ublas::symmetric_matrix< double, boost::numeric::ublas::upper > &covar)
 
 ~SurfacePoint ()
 Destroys a SurfacePoint object/. More...
 
void SetRectangular (const Displacement &x, const Displacement &y, const Displacement &z, const Distance &xSigma=Distance(), const Distance &ySigma=Distance(), const Distance &zSigma=Distance())
 Set surface point in rectangular body-fixed coordinates wtih optional sigmas. More...
 
void SetRectangular (const Displacement x, const Displacement y, const Displacement z, const boost::numeric::ublas::symmetric_matrix< double, boost::numeric::ublas::upper > &covar)
 
void SetRectangularCoordinates (const Displacement &x, const Displacement &y, const Displacement &z)
 Set surface point in rectangular coordinates. More...
 
void SetRectangularSigmas (const Distance &xSigma, const Distance &ySigma, const Distance &zSigma)
 Set surface point and sigmas in rectangular coordinates and convert to planetocentric. More...
 
void SetRectangularMatrix (const boost::numeric::ublas::symmetric_matrix< double, boost::numeric::ublas::upper > &covar, SurfacePoint::CoordUnits units=SurfacePoint::Meters)
 Set rectangular covariance matrix and store in units of km**2. More...
 
void SetSpherical (const Latitude &lat, const Longitude &lon, const Distance &radius, const Angle &latSigma=Angle(), const Angle &lonSigma=Angle(), const Distance &radiusSigma=Distance())
 Set surface point and covariance matrix in planetocentric coordinates and convert to rectangular (Latitude, Longitude in degrees, Radius in meters; matrix in radians and radians**2) More...
 
void SetSpherical (const Latitude &lat, const Longitude &lon, const Distance &radius, const boost::numeric::ublas::symmetric_matrix< double, boost::numeric::ublas::upper > &covar)
 
void SetSphericalCoordinates (const Latitude &lat, const Longitude &lon, const Distance &radius)
 Update spherical coordinates (lat/lon/radius) More...
 
void SetSphericalMatrix (const boost::numeric::ublas::symmetric_matrix< double, boost::numeric::ublas::upper > &covar, SurfacePoint::CoordUnits units=SurfacePoint::Meters)
 Set spherical covariance matrix. More...
 
void SetSphericalSigmas (const Angle &latSigma, const Angle &lonSigma, const Distance &radiusSigma)
 Set the spherical sigmas into the spherical variance/covariance matrix in diagonal units of radians^2, radians^2, km^2. More...
 
void SetSphericalSigmasDistance (const Distance &latSigma, const Distance &lonSigma, const Distance &radiusSigma)
 Set the spherical sigmas (in Distance units) into the spherical variance/covariance matrix. More...
 
void ResetLocalRadius (const Distance &radius)
 This method resets the local radius of a SurfacePoint. More...
 
bool Valid () const
 
void SetMatrix (CoordinateType type, const boost::numeric::ublas::symmetric_matrix< double, boost::numeric::ublas::upper > &covar)
 Set the covariance matrix. More...
 
std::vector< double > Partial (CoordinateType type, CoordIndex index)
 Compute partial derivative of conversion from body-fixed coordinates to the specified. More...
 
double GetCoord (CoordinateType type, CoordIndex index, CoordUnits units)
 This method returns a coordinate of a SurfacePoint. More...
 
double GetSigma (CoordinateType type, CoordIndex index, CoordUnits units)
 This method returns a sigma of a SurfacePoint coordinate. More...
 
Distance GetSigmaDistance (CoordinateType type, CoordIndex index)
 This method returns a sigma of a SurfacePoint coordinate as a Distance. More...
 
double GetWeight (CoordinateType type, CoordIndex index)
 This method returns the weight of a SurfacePoint coordinate Note: At this time a units argument is not included. More...
 
Displacement GetX () const
 
Displacement GetY () const
 
Displacement GetZ () const
 
Distance GetXSigma () const
 
Distance GetYSigma () const
 
Distance GetZSigma () const
 
double GetXWeight () const
 Return X weight for bundle adjustment Units are 1/(kilometers)^2. More...
 
double GetYWeight () const
 Return Y weight for bundle adjustment Units are 1/(kilometers)^2. More...
 
double GetZWeight () const
 Return Z weight for bundle adjustment Units are 1/(kilometers)^2. More...
 
boost::numeric::ublas::symmetric_matrix< double, boost::numeric::ublas::upper > GetRectangularMatrix (SurfacePoint::CoordUnits units=SurfacePoint::Meters) const
 
Latitude GetLatitude () const
 Return the body-fixed latitude for the surface point. More...
 
Longitude GetLongitude () const
 Return the body-fixed longitude for the surface point. More...
 
Distance GetLocalRadius () const
 Return the radius of the surface point. More...
 
Angle GetLatSigma () const
 
Distance GetLatSigmaDistance () const
 Return the latitude sigma as a Distance. More...
 
double GetLatWeight () const
 Return latitude weight for bundle adjustment Units are 1/(radians)^2. More...
 
Angle GetLonSigma () const
 
Distance GetLonSigmaDistance () const
 Return the longitude sigma in meters. More...
 
double GetLonWeight () const
 Return longitude weight for bundle adjustment Units are 1/(radians)^2. More...
 
Distance GetLocalRadiusSigma () const
 
double GetLocalRadiusWeight () const
 Return radius weight for bundle adjustment Units are 1/(kilometers)^2. More...
 
boost::numeric::ublas::symmetric_matrix< double, boost::numeric::ublas::upper > GetSphericalMatrix (SurfacePoint::CoordUnits units=SurfacePoint::Meters) const
 
double DisplacementToDouble (Displacement disp, CoordUnits units)
 This method returns a double version of a Displacement in the specified units. More...
 
double DistanceToDouble (Distance dist, CoordUnits units)
 This method returns a double version of a Distance in the specified units. More...
 
double MetersToLatitude (double latLength)
 This method returns an angular measure of a distance in the direction of and relative to the latitude of the SurfacePoint. More...
 
double MetersToLongitude (double lonLength)
 This method returns an angular measure in radians of a distance in the direction of and relative to the longitude of the SurfacePoint. More...
 
double LatitudeToMeters (double latitude) const
 This method returns a Displacement of an Angle relative to the current SurfacePoint latitude. More...
 
double LongitudeToMeters (double longitude) const
 This method returns a length in meters version of a delta longitude angle in radians relative to the current SurfacePoint longitude. More...
 
double LatToDouble (Latitude lat, CoordUnits units)
 This method returns a double version of a Latitude in the specified units. More...
 
double LonToDouble (Longitude lon, CoordUnits units)
 This method returns a double version of a Longitude in the specified units. More...
 
Distance GetDistanceToPoint (const SurfacePoint &other) const
 Computes and returns the distance between two surface points. More...
 
Distance GetDistanceToPoint (const SurfacePoint &other, const Distance &sphereRadius) const
 Computes and returns the distance between two surface points, assuming both points are on a sphere with the given radius. More...
 
std::vector< double > LatitudinalDerivative (CoordIndex index)
 Compute partial derivative of the conversion of the latitudinal coordinates to body-fixed rectangular coordinates with respect to the indicated coordinate. More...
 
std::vector< double > RectangularDerivative (CoordIndex index)
 Compute partial derivative of the body-fixed rectangular coordinates with respect to the indicated coordinate. More...
 
void ToNaifArray (double naifOutput[3]) const
 A naif array is a c-style array of size 3. More...
 
void FromNaifArray (const double naifValues[3])
 A naif array is a c-style array of size 3. More...
 
bool operator== (const SurfacePoint &other) const
 
SurfacePointoperator= (const SurfacePoint &other)
 

Static Public Member Functions

static CoordinateType stringToCoordinateType (QString type)
 
This method converts the given string value to a SurfacePoint::CoordinateType enumeration. More...
 
static QString coordinateTypeToString (CoordinateType type)
 Converts the given SurfacePoint::CoordinateType enumeration to a string. More...
 

Private Member Functions

void ComputeLocalRadius ()
 Compute the local radius of the surface point. More...
 
void InitCovariance ()
 Initialize the variance/covariance matrices. More...
 
void InitPoint ()
 Initialize a surface point. More...
 
void SetRectangularPoint (const Displacement &x, const Displacement &y, const Displacement &z)
 This is a private method to set a surface point in rectangular, body-fixed coordinates. More...
 
void SetSphericalPoint (const Latitude &lat, const Longitude &lon, const Distance &radius)
 This is a private method to set a surface point in spherical (lat/lon/radius), body-fixed coordinates. More...
 
void FreeAllocatedMemory ()
 

Private Attributes

Distance p_localRadius
 
Displacementp_x
 
Displacementp_y
 
Displacementp_z
 
boost::numeric::ublas::symmetric_matrix< double, boost::numeric::ublas::upper > * p_rectCovar
 3x3 upper triangular covariance matrix rectangular coordinates More...
 
boost::numeric::ublas::symmetric_matrix< double, boost::numeric::ublas::upper > * p_sphereCovar
 3x3 upper triangular covariance matrix ocentric coordinates More...
 

Detailed Description

This class defines a body-fixed surface point.

This class is a container for body-fixed surface points. It provides methods to set and present the coordinates of surface points in various usable units to support projection of image points to the ground and bundle adjustment.

Author
2010-07-30 Tracie Sucharski, Ken L. Edmunson, and Debbie A. Cook
History:

2010-08-25 Debbie A. Cook Added more error checking and testing

2010-09-10 Debbie A. Cook Made ocentric methods specific to units of sigmas (degrees or meters)

2010-10-04 Debbie A. Cook Remove using boost to avoid compile errors throughout Isis3 classes and added boost namespace name to all uses of matrix

2010-10-20 Debbie A. Cook and Steven Lambright Simplified the class by using new Displacement, Distance, Latitude, Longitude, and Angle objects.

2010-12-28 Steven Lambright and Sharmila Prasad Fixed a problem with retreiving longitudes outside of 0-360.

2011-02-11 Steven Lambright Added SphericalDistanceToPoint and optimized for speed inside the cameras and typical use cases where we only have an x,y,z but no other data. Fixed a problem where points were not properly considered valid at some boundary conditions.

2011-03-05 Ken Edmundson Added GetLatWeight, GetLonWeight, GetLocalRadiusWeight, and SetSphericalCoordinates methods for use in BundleAdjust.

2011-04-18 Steven Lambright GetLatSigmaDistance and GetLonSigmaDistance now return appropriate results when the point is invalid but has radii.

2011-08-08 Steven Lambright and Jai Rideout - SetSphericalSigmas() called with invalid parameters will clear the sigmas. Improved some safety checks.

2011-10-06 Steven Lambright - Get*SigmaDistance will no longer throw an exception if there is no stored sigma and there is no stored target radii.

2018-06-28 Debbie A. Cook - Removed target body radii and all related methods. Any reference to the major axis (equatorial radius) was replaced with the local radius. Technically I think we should be using the target body minor axis (polar) for the conversion of latitude degrees to/from distance and the local radius of the surface point for conversion of longitude degrees to/from distance. For large bodies the percent error will be small, so we will use the local radius for convenience. For small bodies, any bundle adjustment will likely use rectangular coordinates where degree conversions will not be necessary. Added new member p_localRadius to avoid recalculating when coordinates have not changed. Also corrected the longitude conversion equation in SetSphericalSigmasDistance and GetLonSigmaDistance. References #5457.

2018-08-15 Debbie A. Cook - Initialized the local radius whenever any SurfacePoint coordinate was changed, removed memory errors, and cleaned up documentation. Changed localRadius member from a pointer to value to reduce extraneous if blocks.
References #5457

2018-09-06 Debbie A. Cook - Originally added to BundleXYZ branch on 2017-06-25 - Added CoordinateType, CoordUnits, and CoordIndex to support new convenience methods GetCoord, GetSigma, and GetWeight. Also added methods GetXWeight, GetYWeight, GetZWeight, LatToDouble, LonToDouble, DistanceToDouble, DisplacementToDouble,
getCoordSigmaDistance, stringToCoordinateType, and coordinateTypeToString. Fixed comment in GetLocalRadiusWeight method to indicate kilometers instead of meters. References #4649 and #501.

2018-09-06 Debbie A. Cook - Originally added to BundleXYZ branch on 2017-07-25 - Corrected covar(2,2) units in SetSphericalSigmas, and all diagonal units in SetRectangularSigmas. Corrected spelling of equatorial in comments. Corrected conversion of longitude sigma from meters to radians in SetSphericalSigmasDistance and from radians to meters in GetLonSigmaDistance. Fixed SetRectangularMatrix to take input in km instead of m.

2018-09-06 Debbie A. Cook - Originally added to BundleXYZ branch on 2017-11-20 - Added an additional argument to SetRectangularMatrix and SetSphericalMatrix to specify the units of the matrix. This will allow the bundle adjust to set in km and existing software to continue setting in the default units (meters). The matrix will be stored in km in this object to avoid extra conversions during processing.

2018-09-06 Debbie A. Cook - Originally added to BundleXYZ branch on 2018-03-07 - Added an additional argument to GetRectangularMatrix and GetSphericalMatrix to specify the units of the matrix. This will allow existing callers to get in m (the default) and bundle adjust software to get in km and minimize conversions. The matrix is held in this object in km to avoid extra conversions during the bundle adjustment. The control net stores the distance values of the matrix in m**2.

2018-09-20 Debbie A. Cook - Added new methods LatitudeToMeters, MetersToLatitude, LongitudeToMeters, and MetersToLongitude for converting sigmas and corrections at the current SurfacePoint coordinates. References #4649 and #501.

2018-10-12 Debbie A. Cook - Initialized local radius in SetRectangularCoordinates

2019-05-29 Debbie A. Cook Changed test constant from DBL_EPSILON to 1.0e-50 to avoid false positives and negatives in MetersToLongitude, GetLatSigmaDistance, and GetLonSigmaDistance.

Definition at line 148 of file SurfacePoint.h.

Member Enumeration Documentation

◆ CoordinateType

Defines the coordinate typ, units, and coordinate index for some of the output methods.

Enumerator
Latitudinal 

Planetocentric latitudinal (lat/lon/rad) coordinates.

Rectangular 

Body-fixed rectangular x/y/z coordinates.

Definition at line 155 of file SurfacePoint.h.

Constructor & Destructor Documentation

◆ SurfacePoint() [1/6]

Isis::SurfacePoint::SurfacePoint ( )

Constructs an empty SurfacePoint object.

Definition at line 20 of file SurfacePoint.cpp.

◆ SurfacePoint() [2/6]

Isis::SurfacePoint::SurfacePoint ( const SurfacePoint other)

Constructs a new SurfacePoint object from an existing SurfacePoint.

Definition at line 29 of file SurfacePoint.cpp.

References p_rectCovar, and p_sphereCovar.

◆ SurfacePoint() [3/6]

Isis::SurfacePoint::SurfacePoint ( const Latitude lat,
const Longitude lon,
const Distance radius 
)

Constructs a SurfacePoint object with a spherical point only.

Parameters
latThe latitude of the surface point
lonThe longitude of the surface point
radiusThe radius of the surface point

Definition at line 76 of file SurfacePoint.cpp.

◆ SurfacePoint() [4/6]

Isis::SurfacePoint::SurfacePoint ( const Latitude lat,
const Longitude lon,
const Distance radius,
const Angle latSigma,
const Angle lonSigma,
const Distance radiusSigma 
)

Constructs a SurfacePoint object with a spherical point and its sigmas.

Parameters
latThe latitude of the surface point
lonThe longitude of the surface point
radiusThe radius of the surface point
          The sigmas indicate the accuracy of the point.  For instance,
          a latitude sigma of 5 degrees would indicate that the
          latitiude value could have an error or + or - 5 degrees.
sigmaLatThe sigma of the latitude
sigmaLonThe sigma of the longitude
sigmaRadiusThe sigma of the local radius

Definition at line 99 of file SurfacePoint.cpp.

◆ SurfacePoint() [5/6]

Isis::SurfacePoint::SurfacePoint ( const Displacement x,
const Displacement y,
const Displacement z 
)

Constructs a SurfacePoint object with a rectangular point only.

Parameters
xThe x coordinate of the surface point
yThe y coordinate of the surface point
zThe z coordinate of the surface point

Definition at line 128 of file SurfacePoint.cpp.

◆ SurfacePoint() [6/6]

Isis::SurfacePoint::SurfacePoint ( const Displacement x,
const Displacement y,
const Displacement z,
const Distance xSigma,
const Distance ySigma,
const Distance zSigma 
)

Constructs a SurfacePoint object with a rectangular point and sigmas.

Parameters
xThe x coordinate of the surface point
yThe y coordinate of the surface point
zThe z coordinate of the surface point
      The sigmas indicate the accuracy of the point.  For instance,
      a sigmaX=100 m, would indicate that the x coordinate was accurate
      to within 100 meters.
xSigmaThe x coordinate of the surface point
ySigmaThe y coordinate of the surface point
zSigmaThe z coordinate of the surface point

Definition at line 150 of file SurfacePoint.cpp.

◆ ~SurfacePoint()

Isis::SurfacePoint::~SurfacePoint ( )

Destroys a SurfacePoint object/.

Definition at line 180 of file SurfacePoint.cpp.

Member Function Documentation

◆ ComputeLocalRadius()

void Isis::SurfacePoint::ComputeLocalRadius ( )
private

Compute the local radius of the surface point.

Definition at line 1703 of file SurfacePoint.cpp.

References _FILEINFO_.

◆ coordinateTypeToString()

QString Isis::SurfacePoint::coordinateTypeToString ( SurfacePoint::CoordinateType  type)
static

Converts the given SurfacePoint::CoordinateType enumeration to a string.

This method is used to print the type of control point coordinates used in the bundle adjustment.

Parameters
typeThe Coordinate Type enumeration to be converted.
Returns
QString The name associated with the given CoordinateType.
Exceptions
Isis::Exception::Programmer"Unknown SurfacePoint CoordinateType enum."

Definition at line 1383 of file SurfacePoint.cpp.

References _FILEINFO_, and Isis::toString().

Referenced by Isis::BundleSolutionInfo::outputHeader().

◆ DisplacementToDouble()

double Isis::SurfacePoint::DisplacementToDouble ( Displacement  disp,
CoordUnits  units 
)

This method returns a double version of a Displacement in the specified units.

Parameters
dispThe displacement to convert to a double
unitsThe units in which to return the displacement (see CoordinateUnits in .h file)

Definition at line 1154 of file SurfacePoint.cpp.

References _FILEINFO_, Isis::Displacement::kilometers(), and Isis::Displacement::meters().

◆ DistanceToDouble()

double Isis::SurfacePoint::DistanceToDouble ( Distance  dist,
CoordUnits  units 
)

This method returns a double version of a Distance in the specified units.

Parameters
distThe distance to convert to a double
unitsThe units in which to return the distance (see CoordinateUnits in .h file)

Definition at line 1182 of file SurfacePoint.cpp.

References _FILEINFO_, Isis::Distance::kilometers(), and Isis::Distance::meters().

◆ FromNaifArray()

void Isis::SurfacePoint::FromNaifArray ( const double  naifValues[3])

A naif array is a c-style array of size 3.

The element types are double... keep in mind a SpiceDouble is a double. The values' units are kilometers because that is the unit naif works in. The first element is X, the second Y, and the third Z. This loads the naif array into the surface point.

Parameters
naifValuesThe naif array to use as rectangular coordinates

Definition at line 885 of file SurfacePoint.cpp.

Referenced by Isis::TriangularPlate::intercept(), Isis::EquatorialCylindricalShape::intersectSurface(), Isis::PlaneShape::intersectSurface(), Isis::DemShape::intersectSurface(), Isis::BulletShapeModel::makeSurfacePoint(), Isis::TriangularPlate::point(), and Isis::EmbreeShapeModel::updateIntersection().

◆ GetCoord()

double Isis::SurfacePoint::GetCoord ( CoordinateType  type,
CoordIndex  index,
CoordUnits  units 
)

This method returns a coordinate of a SurfacePoint.

Parameters
typeThe coordinate type to return (see CoordinateType in .h file)
indexThe coordinate index to return (1 <= index <= 3)
unitsThe units in which to return the coordinate value (see CoordinateUnits in .h file)

Definition at line 956 of file SurfacePoint.cpp.

References _FILEINFO_, and Isis::toString().

Referenced by Isis::BundleControlPoint::formatBundleOutputSummaryString().

◆ GetDistanceToPoint() [1/2]

Distance Isis::SurfacePoint::GetDistanceToPoint ( const SurfacePoint other) const

◆ GetDistanceToPoint() [2/2]

Distance Isis::SurfacePoint::GetDistanceToPoint ( const SurfacePoint other,
const Distance sphereRadius 
) const

Computes and returns the distance between two surface points, assuming both points are on a sphere with the given radius.

This uses the haversine formula to compute the distance. Using a spherical model gives errors typically <1%

Definition at line 1891 of file SurfacePoint.cpp.

References GetLatitude(), GetLongitude(), and Isis::Angle::radians().

◆ GetLatitude()

◆ GetLatSigmaDistance()

Distance Isis::SurfacePoint::GetLatSigmaDistance ( ) const

Return the latitude sigma as a Distance.

History:
2019-05-29 Debbie A. Cook Changed test constant from DBL_EPSILON to 1.0e-50 to fix possible false errors from reasonably small distances on fixed or tightly constrained points occurring during error propagation in jigsaw.

Definition at line 1741 of file SurfacePoint.cpp.

Referenced by Isis::QnetSetAprioriDialog::fillSigmaLineEdits(), Isis::ControlNetVersioner::toPvl(), Isis::QnetTool::updateSurfacePointInfo(), and Isis::ControlNetVersioner::writeFirstPoint().

◆ GetLatWeight()

double Isis::SurfacePoint::GetLatWeight ( ) const

Return latitude weight for bundle adjustment Units are 1/(radians)^2.

Definition at line 1826 of file SurfacePoint.cpp.

References _FILEINFO_.

◆ GetLocalRadius()

◆ GetLocalRadiusWeight()

double Isis::SurfacePoint::GetLocalRadiusWeight ( ) const

Return radius weight for bundle adjustment Units are 1/(kilometers)^2.

Definition at line 1858 of file SurfacePoint.cpp.

References _FILEINFO_.

◆ GetLongitude()

◆ GetLonSigmaDistance()

Distance Isis::SurfacePoint::GetLonSigmaDistance ( ) const

◆ GetLonWeight()

double Isis::SurfacePoint::GetLonWeight ( ) const

Return longitude weight for bundle adjustment Units are 1/(radians)^2.

Definition at line 1842 of file SurfacePoint.cpp.

References _FILEINFO_.

◆ GetSigma()

double Isis::SurfacePoint::GetSigma ( CoordinateType  type,
CoordIndex  index,
CoordUnits  units 
)

This method returns a sigma of a SurfacePoint coordinate.

Parameters
typeThe coordinate type to return (see CoordinateType in .h file)
indexThe coordinate index to return (1 <= index <= 3)
unitsThe units in which to return the coordinate value (see CoordinateUnits in .h file)

Definition at line 1023 of file SurfacePoint.cpp.

References _FILEINFO_, and Isis::toString().

◆ GetSigmaDistance()

Distance Isis::SurfacePoint::GetSigmaDistance ( CoordinateType  type,
CoordIndex  index 
)

This method returns a sigma of a SurfacePoint coordinate as a Distance.

Parameters
typeThe coordinate type to return (see CoordinateType in .h file)
indexThe coordinate index to return (1 <= index <= 3)

Definition at line 1088 of file SurfacePoint.cpp.

References _FILEINFO_, and Isis::toString().

Referenced by Isis::BundleControlPoint::formatAdjustedSigmaString(), and Isis::BundleControlPoint::setWeights().

◆ GetWeight()

double Isis::SurfacePoint::GetWeight ( CoordinateType  type,
CoordIndex  index 
)

This method returns the weight of a SurfacePoint coordinate Note: At this time a units argument is not included.

If BundleAdjust is modified to allow different distance or displacement units other than kilometers, the units argument can be added similar to the GetCoord and GetSigma methods. Angle weights are in 1/rad^2 and distance and displacements are in 1/km^2

Parameters
typeThe coordinate type to return (see CoordinateType in .h file)
indexThe coordinate index to return (1 <= index <= 3)

Definition at line 1485 of file SurfacePoint.cpp.

References _FILEINFO_, and Isis::toString().

Referenced by Isis::BundleControlPoint::setWeights().

◆ GetXWeight()

double Isis::SurfacePoint::GetXWeight ( ) const

Return X weight for bundle adjustment Units are 1/(kilometers)^2.

Definition at line 1547 of file SurfacePoint.cpp.

References _FILEINFO_.

◆ GetYWeight()

double Isis::SurfacePoint::GetYWeight ( ) const

Return Y weight for bundle adjustment Units are 1/(kilometers)^2.

Definition at line 1565 of file SurfacePoint.cpp.

References _FILEINFO_.

◆ GetZWeight()

double Isis::SurfacePoint::GetZWeight ( ) const

Return Z weight for bundle adjustment Units are 1/(kilometers)^2.

Definition at line 1583 of file SurfacePoint.cpp.

References _FILEINFO_.

◆ InitCovariance()

void Isis::SurfacePoint::InitCovariance ( )
private

Initialize the variance/covariance matrices.

Definition at line 189 of file SurfacePoint.cpp.

◆ InitPoint()

void Isis::SurfacePoint::InitPoint ( )
private

Initialize a surface point.

Definition at line 199 of file SurfacePoint.cpp.

◆ LatitudeToMeters()

double Isis::SurfacePoint::LatitudeToMeters ( double  relativeLat) const

This method returns a Displacement of an Angle relative to the current SurfacePoint latitude.

It should only be used to convert relative latitudes near the SurfacePoint latitude. Typical usage would be to convert latitude sigmas and point corrections for the SurfacePoint.

Parameters
latRadiansThe latitude in Angle units to convert to Displacement units
Returns
LatDisp The converted latitude in displacement units at the SurfacePoint latitude

Definition at line 1304 of file SurfacePoint.cpp.

References Isis::IsSpecial(), and Isis::Null.

Referenced by Isis::BundleControlPoint::formatBundleLatitudinalOutputDetailString().

◆ LatitudinalDerivative()

std::vector< double > Isis::SurfacePoint::LatitudinalDerivative ( CoordIndex  index)

Compute partial derivative of the conversion of the latitudinal coordinates to body-fixed rectangular coordinates with respect to the indicated coordinate.

Parameters
indexCoordinate index
Returns
std::vector<double> The derivative of the latitudinal to body-fixed vector

Definition at line 792 of file SurfacePoint.cpp.

References _FILEINFO_.

◆ LatToDouble()

double Isis::SurfacePoint::LatToDouble ( Latitude  lat,
CoordUnits  units 
)

This method returns a double version of a Latitude in the specified units.

Parameters
latThe latitude to convert to a double
unitsThe units in which to return the latitude (see CoordinateUnits in .h file)

Definition at line 1210 of file SurfacePoint.cpp.

References _FILEINFO_.

◆ LongitudeToMeters()

double Isis::SurfacePoint::LongitudeToMeters ( double  deltaLonRadians) const

This method returns a length in meters version of a delta longitude angle in radians relative to the current SurfacePoint longitude.

It should only be used to convert delta longitudes relative to the SurfacePoint longitude.
Typical usage would be to convert longitude sigmas and point corrections for the SurfacePoint.

Parameters
lonRadiansThe delta longitude in radians to convert to meters
Returns
relativeLonDist The delta longitude in meters from the SurfacePoint longitude

Definition at line 1330 of file SurfacePoint.cpp.

References Isis::IsSpecial(), and Isis::Null.

Referenced by Isis::BundleControlPoint::formatBundleLatitudinalOutputDetailString().

◆ LonToDouble()

double Isis::SurfacePoint::LonToDouble ( Longitude  lon,
CoordUnits  units 
)

This method returns a double version of a Longitude in the specified units.

Parameters
lonThe longitude to convert to a double
unitsThe units in which to return the longitude (see CoordinateUnits in .h file)

Definition at line 1409 of file SurfacePoint.cpp.

References _FILEINFO_.

◆ MetersToLatitude()

double Isis::SurfacePoint::MetersToLatitude ( double  latLength)

This method returns an angular measure of a distance in the direction of and relative to the latitude of the SurfacePoint.

It should only be used to convert lengths relative to the SurfacePoint and in the direction of latitude. Typical usage would be to convert latitude sigmas and point corrections for the SurfacePoint.

Parameters
latLengthThe latitude in meters to convert to radian units
Returns
LatDispAngle The converted linear measure in radian units

Definition at line 1242 of file SurfacePoint.cpp.

References Isis::IsSpecial(), and Isis::Null.

Referenced by Isis::BundleControlPoint::setSigmaWeightFromGlobals().

◆ MetersToLongitude()

double Isis::SurfacePoint::MetersToLongitude ( double  deltaLonMeters)

This method returns an angular measure in radians of a distance in the direction of and relative to the longitude of the SurfacePoint.

It should only be used to
convert lengths relative to the SurfacePoint and in the direction of longitude. Typical usage is to convert longitude sigmas and point corrections for the SurfacePoint.

Parameters
lonLengthThe delta longitude distance in meters to convert to radians
Returns
LonDistAngle The converted delta length in radians
History:
2019-05-29 Debbie A. Cook Changed test constant from DBL_EPSILON to 1.0e-50 to fix possible false errors from reasonably small distances on fixed or tightly constrained points occurring during error propagation in jigsaw.

Definition at line 1270 of file SurfacePoint.cpp.

References Isis::IsSpecial(), Isis::Null, and Isis::PI.

Referenced by Isis::BundleControlPoint::setSigmaWeightFromGlobals().

◆ Partial()

std::vector< double > Isis::SurfacePoint::Partial ( CoordinateType  type,
CoordIndex  index 
)

Compute partial derivative of conversion from body-fixed coordinates to the specified.

Compute partial derivative of the conversion of the body-fixed surface point coordinate to the specified coordinate type.

Parameters
covarvariance/covariance matrix
Returns
void

Definition at line 767 of file SurfacePoint.cpp.

References _FILEINFO_, and Isis::toString().

Referenced by Isis::BundleAdjust::computePartials().

◆ RectangularDerivative()

std::vector< double > Isis::SurfacePoint::RectangularDerivative ( CoordIndex  index)

Compute partial derivative of the body-fixed rectangular coordinates with respect to the indicated coordinate.

Parameters
indexCoordinate index
Returns
std::vector<double> The derivative of the body-fixed vector

Definition at line 834 of file SurfacePoint.cpp.

References _FILEINFO_.

◆ ResetLocalRadius()

void Isis::SurfacePoint::ResetLocalRadius ( const Distance radius)

This method resets the local radius of a SurfacePoint.

Parameters
radiusThe new local radius value to set

Definition at line 908 of file SurfacePoint.cpp.

References _FILEINFO_, Isis::Distance::isValid(), Isis::Distance::kilometers(), and Isis::Distance::setKilometers().

Referenced by Isis::BundleAdjust::solveCholesky().

◆ SetMatrix()

void Isis::SurfacePoint::SetMatrix ( CoordinateType  type,
const boost::numeric::ublas::symmetric_matrix< double, boost::numeric::ublas::upper > &  covar 
)

Set the covariance matrix.

Set covariance matrix in km.

Parameters
covarvariance/covariance matrix
Returns
void

Definition at line 743 of file SurfacePoint.cpp.

References _FILEINFO_, and Isis::toString().

Referenced by Isis::BundleAdjust::errorPropagation(), and Isis::BundleAdjust::formPointNormals().

◆ SetRectangular()

void Isis::SurfacePoint::SetRectangular ( const Displacement x,
const Displacement y,
const Displacement z,
const Distance xSigma = Distance(),
const Distance ySigma = Distance(),
const Distance zSigma = Distance() 
)

Set surface point in rectangular body-fixed coordinates wtih optional sigmas.

Parameters
xx value of body-fixed coordinate of surface point
yy value of body-fixed coordinate of surface point
zz value of body-fixed coordinate of surface point
xSigmax sigma of body-fixed coordinate of surface point
ySigmay sigma of body-fixed coordinate of surface point
zSigmaz sigma of body-fixed coordinate of surface point
Returns
void

Definition at line 277 of file SurfacePoint.cpp.

References Isis::Distance::isValid().

Referenced by Isis::ControlPoint::ComputeApriori(), and Isis::QnetSetAprioriDialog::fillAverageAprioriLineEdits().

◆ SetRectangularCoordinates()

void Isis::SurfacePoint::SetRectangularCoordinates ( const Displacement x,
const Displacement y,
const Displacement z 
)

Set surface point in rectangular coordinates.

Parameters
xx value of body-fixed coordinate of surface point
yy value of body-fixed coordinate of surface point
zz value of body-fixed coordinate of surface point
Returns
void

Definition at line 321 of file SurfacePoint.cpp.

Referenced by Isis::BundleControlPoint::updateAdjustedSurfacePointRectangularly().

◆ SetRectangularMatrix()

void Isis::SurfacePoint::SetRectangularMatrix ( const boost::numeric::ublas::symmetric_matrix< double, boost::numeric::ublas::upper > &  covar,
SurfacePoint::CoordUnits  units = SurfacePoint::Meters 
)

Set rectangular covariance matrix and store in units of km**2.

Parameters
covarRectangular variance/covariance matrix
unitsUnits of matrix are units**2
Returns
void

Definition at line 370 of file SurfacePoint.cpp.

References _FILEINFO_.

Referenced by Isis::ControlNetVersioner::createPoint().

◆ SetRectangularPoint()

void Isis::SurfacePoint::SetRectangularPoint ( const Displacement x,
const Displacement y,
const Displacement z 
)
private

This is a private method to set a surface point in rectangular, body-fixed coordinates.

This method isolates the procedure for setting a rectangular point in one place.

Parameters
xx value of body-fixed coordinate of surface point
yy value of body-fixed coordinate of surface point
zz value of body-fixed coordinate of surface point
Returns
void

Definition at line 219 of file SurfacePoint.cpp.

References _FILEINFO_, and Isis::Displacement::isValid().

◆ SetRectangularSigmas()

void Isis::SurfacePoint::SetRectangularSigmas ( const Distance xSigma,
const Distance ySigma,
const Distance zSigma 
)

Set surface point and sigmas in rectangular coordinates and convert to planetocentric.

Set the rectangular sigmas into the rectangular variance/covariance matrix with diagonal element units of km^2, km^2, and km^2.

Parameters
xSigmax sigma of body-fixed coordinate of surface point
ySigmay sigma of body-fixed coordinate of surface point
zSigmaz sigma of body-fixed coordinate of surface point
History:

2017-07-25 Debbie A. Cook Added documentation and corrected units for diagonal elements to be km^2 instead of m^2.

2017-11-22 Debbie A. Cook Updated call to SetRectangularMatrix

Definition at line 344 of file SurfacePoint.cpp.

References _FILEINFO_, Isis::Distance::isValid(), and Isis::Distance::meters().

◆ SetSpherical()

void Isis::SurfacePoint::SetSpherical ( const Latitude lat,
const Longitude lon,
const Distance radius,
const Angle latSigma = Angle(),
const Angle lonSigma = Angle(),
const Distance radiusSigma = Distance() 
)

Set surface point and covariance matrix in planetocentric coordinates and convert to rectangular (Latitude, Longitude in degrees, Radius in meters; matrix in radians and radians**2)

Set surface point in spherical body-fixed coordinates (lat/lon/radius) wtih optional sigmas.

Parameters
latBody-fixed latitude of surface point
lonBody-fixed longitude of surface point
radiusLocal radius of surface point
latSigmaLatitude sigma of of spherical coordinate of surface point
lonSigmaLongitude sigma of of spherical coordinate of surface point
radiusSigmaLocal radius sigma of of spherical coordinate of surface point

Definition at line 512 of file SurfacePoint.cpp.

References Isis::Angle::isValid(), and Isis::Distance::isValid().

Referenced by Isis::ControlNetFilter::PointDistanceFilter(), and Isis::ControlNetFilter::PointLatLonFilter().

◆ SetSphericalCoordinates()

void Isis::SurfacePoint::SetSphericalCoordinates ( const Latitude lat,
const Longitude lon,
const Distance radius 
)

Update spherical coordinates (lat/lon/radius)

Parameters
lat
lon
radius

Definition at line 547 of file SurfacePoint.cpp.

Referenced by Isis::BundleControlPoint::updateAdjustedSurfacePointLatitudinally().

◆ SetSphericalMatrix()

void Isis::SurfacePoint::SetSphericalMatrix ( const boost::numeric::ublas::symmetric_matrix< double, boost::numeric::ublas::upper > &  covar,
SurfacePoint::CoordUnits  units = SurfacePoint::Meters 
)

Set spherical covariance matrix.

Parameters
covarSpherical variance/covariance matrix (radians**2 for lat and lon)
Returns
void

Definition at line 631 of file SurfacePoint.cpp.

References _FILEINFO_.

◆ SetSphericalPoint()

void Isis::SurfacePoint::SetSphericalPoint ( const Latitude lat,
const Longitude lon,
const Distance radius 
)
private

This is a private method to set a surface point in spherical (lat/lon/radius), body-fixed coordinates.

This method isolates the procedure for setting a spherical point in one place.

Parameters
latBody-fixed latitude of surface point
lonBody-fixed longitude of surface point
radiusLocal radius of surface point
Returns
void

Definition at line 474 of file SurfacePoint.cpp.

References _FILEINFO_, Isis::Angle::isValid(), Isis::Distance::isValid(), Isis::Distance::kilometers(), and Isis::Angle::radians().

◆ SetSphericalSigmas()

void Isis::SurfacePoint::SetSphericalSigmas ( const Angle latSigma,
const Angle lonSigma,
const Distance radiusSigma 
)

Set the spherical sigmas into the spherical variance/covariance matrix in diagonal units of radians^2, radians^2, km^2.

Parameters
latSigmaLatitude sigma of body-fixed coordinate of surface point
lonSigmaLongitude sigma of body-fixed coordinate of surface point
radiusSigmaRadius sigma of body-fixed coordinate of surface point
History:

2017-07-25 Debbie A. Cook Added documentation and corrected units for covar(2,2) to be km^2 instead of m^2.

2017-11-22 Debbie A. Cook Set units for covar(2,2) back to m^2 which is not the default for the set method.

Definition at line 567 of file SurfacePoint.cpp.

References Isis::Angle::isValid(), Isis::Distance::isValid(), Isis::Distance::meters(), and Isis::Angle::radians().

◆ SetSphericalSigmasDistance()

void Isis::SurfacePoint::SetSphericalSigmasDistance ( const Distance latSigma,
const Distance lonSigma,
const Distance radiusSigma 
)

Set the spherical sigmas (in Distance units) into the spherical variance/covariance matrix.

Parameters
latSigmaLatitude sigma of body-fixed coordinate of surface point as a Distance
lonSigmaLongitude sigma of body-fixed coordinate of surface point as a Distance
radiusSigmaRadius sigma of body-fixed coordinate of surface point in meters
History:
2018-06-28 Debbie A. Cook Revised to use the local radius of the SurfacePoint to convert distance to angle instead of the major equatorial axis. Also corrected longitude conversion. See note in SurfacePoint.h. References #5457.

Definition at line 611 of file SurfacePoint.cpp.

References _FILEINFO_, and Isis::Distance::meters().

Referenced by Isis::QnetSetAprioriDialog::setApriori().

◆ stringToCoordinateType()

SurfacePoint::CoordinateType Isis::SurfacePoint::stringToCoordinateType ( QString  type)
static


This method converts the given string value to a SurfacePoint::CoordinateType enumeration.

Currently (March 31, 2017) accepted inputs are listed below.
This method is case insensitive.

Parameters
typeThe coordinate type name to be converted
Returns
CoordinateType The enumeration corresponding to the input name

Definition at line 1357 of file SurfacePoint.cpp.

References _FILEINFO_.

Referenced by Isis::BundleSettings::XmlHandler::startElement().

◆ ToNaifArray()

void Isis::SurfacePoint::ToNaifArray ( double  naifOutput[3]) const

A naif array is a c-style array of size 3.

The element types are double... keep in mind a SpiceDouble is a double. The values' units are kilometers because that is the unit naif works in. The first element is X, the second Y, and the third Z.

Parameters
naifOutputThe naif array to populate with the surface point's XYZ position.

Definition at line 864 of file SurfacePoint.cpp.

References _FILEINFO_.

Referenced by Isis::DemShape::calculateLocalNormal(), Isis::NaifDskShape::ellipsoidNormal(), Isis::EmbreeShapeModel::ellipsoidNormal(), Isis::BulletShapeModel::ellipsoidNormal(), Isis::TriangularPlate::hasPoint(), Isis::EmbreeShapeModel::intersectSurface(), Isis::EmbreeShapeModel::isVisibleFrom(), Isis::TriangularPlate::point(), Isis::EmbreeShapeModel::pointToRay(), Isis::BulletShapeModel::pointToVector(), and Isis::RadarGroundMap::SetGround().

Member Data Documentation

◆ p_rectCovar

boost::numeric::ublas::symmetric_matrix<double,boost::numeric::ublas::upper>* Isis::SurfacePoint::p_rectCovar
private

3x3 upper triangular covariance matrix rectangular coordinates

Definition at line 328 of file SurfacePoint.h.

Referenced by SurfacePoint().

◆ p_sphereCovar

boost::numeric::ublas::symmetric_matrix<double,boost::numeric::ublas::upper>* Isis::SurfacePoint::p_sphereCovar
private

3x3 upper triangular covariance matrix ocentric coordinates

Definition at line 331 of file SurfacePoint.h.

Referenced by SurfacePoint().


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