HelmertTransform Class Reference

#include <HelmertTransform.hpp>

List of all members.

Public Types

typedef std::map< ReferenceFrame,
Transform
TransformMap
 Top level map typedef, used in the LookupMap typedef.
typedef std::map< ReferenceFrame,
TransformMap
LookupMap
 Base Level map typedef, used in initial lookups.

Public Member Functions

void dump ()
 Dumps the contents of the lookup map to the standard output.
void defineTransform (const TransformParameters &tp, const ReferenceFrame &to, const ReferenceFrame &from) throw (InvalidParameter)
 Defines a new Transform using the given to/from combination and params.
TransformgetTransform (const ReferenceFrame &from, const ReferenceFrame &to) throw (InvalidParameter)
 Returns the Transform associated with the to/from ReferenceFrame pair.
Position transform (const ReferenceFrame &to, const Position &pos) throw (InvalidParameter)
 Transforms a Position object to the specified ReferenceFrame.
Xvt transform (const ReferenceFrame &to, const Xvt &pos) throw (InvalidParameter)
 Transforms a Xvt object to the specified ReferenceFrame.
Triple posTransform (const ReferenceFrame &from, const ReferenceFrame &to, const Triple &pos) throw (InvalidParameter)
 Transforms a triple in the "to" ReferenceFrame to the "from" ReferenceFrame.
Triple velTransform (const ReferenceFrame &from, const ReferenceFrame &to, const Triple &vel) throw (InvalidParameter)
 Transforms a triple in the "to" ReferenceFrame to the "from" ReferenceFrame.
Vector< double > posTransform (const ReferenceFrame &from, const ReferenceFrame &to, const Vector< double > &pos) throw (InvalidParameter)
 Transforms a Vector in the "to" ReferenceFrame to the "from" ReferenceFrame.
Vector< double > velTransform (const ReferenceFrame &from, const ReferenceFrame &to, const Vector< double > &vel) throw (InvalidParameter)
 Transforms a Vector in the "to" ReferenceFrame to the "from" ReferenceFrame.

Static Public Member Functions

HelmertTransforminstance ()
 Creates an instance of the HelmertTransform class and returns it.

Static Public Attributes

const double MAS = 7.71605e-10
 The constant defining the unit Milliarcsecond (mas).
const double PPB = 1e-9
 The constant defining the unit Parts Per Billion (ppb).

Protected Member Functions

Vector< double > helperTransform (const ReferenceFrame &from, const ReferenceFrame &to, const Vector< double > &vec, bool translate) throw (InvalidParameter)
 Resolves the appropriate transform and applies it to the vector.
void populateTransformMaps ()
 Sets up the pre-defined transforms.
Transform buildTransform (const TransformParameters &tp) throw ()
 Builds a Transform struct from the given TransformParameters.
 HelmertTransform () throw ()
 Default Constructor, initializes the maps.
 HelmertTransform (const HelmertTransform &ht) throw ()
 . Protected to disallow copies.
HelmertTransformoperator= (const HelmertTransform &ht) throw ()
 Protected to disallow copies.

Protected Attributes

LookupMap fromMap
 The map of maps containing the to/from ReferenceFrame pairs and their associated Transform struct.


Member Typedef Documentation

typedef std::map<ReferenceFrame, TransformMap> LookupMap
 

Base Level map typedef, used in initial lookups.

Map to the different available reference frames. The key is the reference frame, with the value being a map to its available transforms. To reduce redundancy, not all available frames are listed here. For instance, a frame will not be listed if it is already mapped in TransformMaps.

Definition at line 68 of file HelmertTransform.hpp.

typedef std::map<ReferenceFrame, Transform> TransformMap
 

Top level map typedef, used in the LookupMap typedef.

Map to the different transforms available for a specific reference frame. The key is the reference frame to translate to, with the value being the transform data.

Definition at line 57 of file HelmertTransform.hpp.


Constructor & Destructor Documentation

HelmertTransform  )  throw () [protected]
 

Default Constructor, initializes the maps.

This constructor calls the populateTransformMaps() method.

Definition at line 49 of file HelmertTransform.cpp.

References HelmertTransform::populateTransformMaps().

HelmertTransform const HelmertTransform ht  )  throw () [inline, protected]
 

. Protected to disallow copies.

Definition at line 332 of file HelmertTransform.hpp.


Member Function Documentation

HelmertTransform::Transform buildTransform const TransformParameters tp  )  throw () [protected]
 

Builds a Transform struct from the given TransformParameters.

This method creates a Transform struct from the given TransformParameters by applying the parameters to the matrix like this: [ ( scale + 1, -r3, r2 ), ( r3, scale + 1, -r1 ), ( -r2, r1, scale + 1 ) ]

Parameters:
tp The transform parameters to use to build the struct.
Returns:
The built transform struct.

Definition at line 347 of file HelmertTransform.cpp.

References gpstk::inverse(), HelmertTransform::Transform::inverseRotation, HelmertTransform::Transform::params, HelmertTransform::Transform::rotation, and HelmertTransform::Transform::translation.

void defineTransform const TransformParameters tp,
const ReferenceFrame to,
const ReferenceFrame from
throw (InvalidParameter)
 

Defines a new Transform using the given to/from combination and params.

If the transform to/from combination or its inverse from/to do not exist, this function defines a new Transform mapping. Otherwise, this function redefines the current mapping to use the provided transform parameters.

Exceptions:
InvalidParameter If either ReferenceFrame is unknown or no transform is defined for them.
Parameters:
tp The transform parameters for this new transformation.
to The ReferenceFrame this transform changes coodinates to.
from The ReferenceFrame this transform changes from.

Definition at line 73 of file HelmertTransform.cpp.

Referenced by HelmertTransform::populateTransformMaps().

void dump  ) 
 

Dumps the contents of the lookup map to the standard output.

Definition at line 380 of file HelmertTransform.cpp.

References Matrix::end(), and HelmertTransform::fromMap.

HelmertTransform::Transform & getTransform const ReferenceFrame from,
const ReferenceFrame to
throw (InvalidParameter)
 

Returns the Transform associated with the to/from ReferenceFrame pair.

If the to/from combination does not exist this funtion throws an InvalidParameter exception. This method only searchs for the forward definition that the user provided and will not return a backwards transform definition.

Exceptions:
InvalidParameter If either ReferenceFrame is unknown or no transform is defined for them.
Parameters:
from The ReferenceFrame that the desired transform originates in.
to The ReferenceFrame that the desired transform changes to.

Definition at line 117 of file HelmertTransform.cpp.

Vector< double > helperTransform const ReferenceFrame from,
const ReferenceFrame to,
const Vector< double > &  vec,
bool  translate
throw (InvalidParameter) [protected]
 

Resolves the appropriate transform and applies it to the vector.

This method is eventually called by all the transform methods. It first resolves which Translation to use, if it exists, then applies the translation conditionally, as well as the rotation (always).

Exceptions:
InvalidParameter If the transform does not exist.
Parameters:
from The ReferenceFrame the vector is in initially.
to The ReferenceFrame the vector is transformed to.
vec The Vector to transform.
translate If the method applies the translation vector.
Note:
This method changes the passed vector.
Returns:
A reference to the transformed Vector.

Definition at line 267 of file HelmertTransform.cpp.

HelmertTransform & instance  )  [static]
 

Creates an instance of the HelmertTransform class and returns it.

Returns:
A singleton reference to the HelemrtTransform class.

Definition at line 65 of file HelmertTransform.cpp.

HelmertTransform & operator= const HelmertTransform ht  )  throw () [protected]
 

Protected to disallow copies.

Definition at line 57 of file HelmertTransform.cpp.

void populateTransformMaps  )  [protected]
 

Sets up the pre-defined transforms.

This method is called the first time HelmertTransform::instance() is called. Currently, this method defines only the PZ90->WGS84 transform.

Definition at line 324 of file HelmertTransform.cpp.

References HelmertTransform::defineTransform(), HelmertTransform::TransformParameters::description, HelmertTransform::TransformParameters::r1, HelmertTransform::TransformParameters::r2, HelmertTransform::TransformParameters::r3, HelmertTransform::TransformParameters::scale, HelmertTransform::TransformParameters::t1, HelmertTransform::TransformParameters::t2, and HelmertTransform::TransformParameters::t3.

Referenced by HelmertTransform::HelmertTransform().

Vector< double > posTransform const ReferenceFrame from,
const ReferenceFrame to,
const Vector< double > &  pos
throw (InvalidParameter)
 

Transforms a Vector in the "to" ReferenceFrame to the "from" ReferenceFrame.

This method treats the vector as a position and applies the position transformation to the vector. This means that in addition to the rotation, the method also applies a translation to the Vector.

Definition at line 237 of file HelmertTransform.cpp.

Triple posTransform const ReferenceFrame from,
const ReferenceFrame to,
const Triple pos
throw (InvalidParameter)
 

Transforms a triple in the "to" ReferenceFrame to the "from" ReferenceFrame.

This method treats the triple as a position and applies a position transformation to the triple. This means that in addition to the rotation, the method applies a translation to the Triple.

Exceptions:
InvalidParameter If either ReferenceFrame is Unknown, or the transform doesn't exist.
Parameters:
from The ReferenceFrame the Triple is initially in.
to The ReferenceFrame to transform to.
pos The position triple to transform.
Returns:
A transformed Triple object.

Definition at line 195 of file HelmertTransform.cpp.

Xvt transform const ReferenceFrame to,
const Xvt pos
throw (InvalidParameter)
 

Transforms a Xvt object to the specified ReferenceFrame.

Definition at line 176 of file HelmertTransform.cpp.

References Xvt::frame, Xvt::v, and Xvt::x.

Position transform const ReferenceFrame to,
const Position pos
throw (InvalidParameter)
 

Transforms a Position object to the specified ReferenceFrame.

Definition at line 154 of file HelmertTransform.cpp.

References Position::getReferenceFrame(), Position::setECEF(), Position::setReferenceFrame(), and Position::transformTo().

Vector< double > velTransform const ReferenceFrame from,
const ReferenceFrame to,
const Vector< double > &  vel
throw (InvalidParameter)
 

Transforms a Vector in the "to" ReferenceFrame to the "from" ReferenceFrame.

This method treats the Vector as a velocity and applies the velocity transformation to the Vector. This means that the translation is not applied to the vector when the transform is made.

Definition at line 251 of file HelmertTransform.cpp.

Triple velTransform const ReferenceFrame from,
const ReferenceFrame to,
const Triple vel
throw (InvalidParameter)
 

Transforms a triple in the "to" ReferenceFrame to the "from" ReferenceFrame.

This method treats the triple as a velocity and applies the velocity transformation to the triple. This means that the translation is not applied to the triple when the transform is made.

Definition at line 216 of file HelmertTransform.cpp.


Member Data Documentation

LookupMap fromMap [protected]
 

The map of maps containing the to/from ReferenceFrame pairs and their associated Transform struct.

Definition at line 315 of file HelmertTransform.hpp.

Referenced by HelmertTransform::dump().

const double MAS = 7.71605e-10 [static]
 

The constant defining the unit Milliarcsecond (mas).

Used for the Rotation parameters in the TransformParameters struct.

Definition at line 44 of file HelmertTransform.cpp.

const double PPB = 1e-9 [static]
 

The constant defining the unit Parts Per Billion (ppb).

Used for the scale parameter in the TransformParameters struct.

Definition at line 45 of file HelmertTransform.cpp.


The documentation for this class was generated from the following files:
Generated on Wed May 22 03:31:55 2013 for GPS ToolKit Software Library by  doxygen 1.3.9.1