Public Member Functions | Public Attributes | Protected Attributes | List of all members
gnsstk::HelmertTransformer Class Reference

Detailed Description

Provide a class for transforming positions between datums using the Helmert 7-parameter transform.

Definition at line 52 of file HelmertTransformer.hpp.

#include <HelmertTransformer.hpp>

Inheritance diagram for gnsstk::HelmertTransformer:
Inheritance graph
[legend]

Public Member Functions

 HelmertTransformer ()
 Initialize everything to invalid values. More...
 
 HelmertTransformer (const RefFrame &from, const RefFrame &to, double irx, double iry, double irz, double itx, double ity, double itz, double sc, const std::string &desc, const CommonTime &refEpoch)
 
bool transform (const Position &fromPos, Position &toPos) const noexcept override
 
bool transform (const Triple &fromPos, const RefFrame &srcFrame, Triple &toPos) const noexcept override
 
bool transform (const Vector< double > &fromPos, const RefFrame &srcFrame, Vector< double > &toPos) const noexcept override
 
bool transform (const Xvt &fromPos, Xvt &toPos) const noexcept override
 
bool transform (double fx, double fy, double fz, const RefFrame &srcFrame, double &tx, double &ty, double &tz) const noexcept override
 
- Public Member Functions inherited from gnsstk::Transformer
const CommonTimegetEpoch () const noexcept
 
const RefFramegetFromFrame () const noexcept
 Return the RefFrame this Transformer will convert from. More...
 
const RefFramegetToFrame () const noexcept
 Return the RefFrame this Transformer will convert to. More...
 
 Transformer ()
 

Public Attributes

std::string description
 

Protected Attributes

Matrix< double > rotation
 
double scale
 Scale factor. Dimensionless. 0 = no scale. More...
 
Vector< double > translation
 
- Protected Attributes inherited from gnsstk::Transformer
CommonTime epoch
 When this Transformer was first applicable. More...
 
RefFrame fromFrame
 The reference frame we can transform from. More...
 
RefFrame toFrame
 The reference frame we can transform to. More...
 

Constructor & Destructor Documentation

◆ HelmertTransformer() [1/2]

gnsstk::HelmertTransformer::HelmertTransformer ( )

Initialize everything to invalid values.

Definition at line 44 of file HelmertTransformer.cpp.

◆ HelmertTransformer() [2/2]

gnsstk::HelmertTransformer::HelmertTransformer ( const RefFrame from,
const RefFrame to,
double  irx,
double  iry,
double  irz,
double  itx,
double  ity,
double  itz,
double  sc,
const std::string &  desc,
const CommonTime refEpoch 
)

Explicit constructor, from the 7 parameters. All the inputs are unchanged.

This constructor and class are for data to be used with the transformation of the either of the two following forms (view via doxygen).

Warning
If the transformation parameters use the transposed version of the rotation matrix (i.e. the signs on the rotation angles are reversed from what is shown below), make sure to flip the sign on the irx,iry,irz parameters to the constructor.

\[ \left[ {\begin{array}{c} X_{tgt} \\ Y_{tgt} \\ Z_{tgt} \\ \end{array} } \right] = \left[ {\begin{array}{c} T_x \\ T_y \\ T_z \\ \end{array} } \right] + (1 + S_c) \left[ {\begin{array}{ccc} 1 & R_z & -R_y \\ -R_z & 1 & R_x \\ R_y & -R_x & 1 \\ \end{array} } \right] \left[ {\begin{array}{c} X_{src} \\ Y_{src} \\ Z_{src} \\ \end{array} } \right] \]

\[ \left[ {\begin{array}{c} X_{tgt} \\ Y_{tgt} \\ Z_{tgt} \\ \end{array} } \right] = \left[ {\begin{array}{c} X_{src} \\ Y_{src} \\ Z_{src} \\ \end{array} } \right] + \left[ {\begin{array}{c} T_x \\ T_y \\ T_z \\ \end{array} } \right] + \left[ {\begin{array}{ccc} S_c & R_z & -R_y \\ -R_z & S_c & R_x \\ R_y & -R_x & S_c \\ \end{array} } \right] \left[ {\begin{array}{c} X_{src} \\ Y_{src} \\ Z_{src} \\ \end{array} } \right] \]

Parameters
[in]fromTransform takes "from" -> "to"
[in]toTransform takes "from" -> "to"
[in]irxX axis rotation angle in degrees
[in]iryY axis rotation angle in degrees
[in]irzZ axis rotation angle in degrees
[in]itxX axis translation in meters
[in]ityY axis translation in meters
[in]itzZ axis translation in meters
[in]scscale factor (dimensionless)
[in]descdescription of the transform, should include
[in]refEpochtime when transform became applicable (default=BOT) reference frames and an indication of the source (e.g. literature citation).
Exceptions
InvalidRequestif the transform is invalid.
Note
small angle approximation is used.
by construction, transpose(rotation) == inverse(rotation) (given small angle approximation).

Definition at line 54 of file HelmertTransformer.cpp.

Member Function Documentation

◆ transform() [1/5]

bool gnsstk::HelmertTransformer::transform ( const Position fromPos,
Position toPos 
) const
overridevirtualnoexcept

Implements gnsstk::Transformer.

Definition at line 111 of file HelmertTransformer.cpp.

◆ transform() [2/5]

bool gnsstk::HelmertTransformer::transform ( const Triple fromPos,
const RefFrame srcFrame,
Triple toPos 
) const
overridevirtualnoexcept

Implements gnsstk::Transformer.

Definition at line 205 of file HelmertTransformer.cpp.

◆ transform() [3/5]

bool gnsstk::HelmertTransformer::transform ( const Vector< double > &  fromPos,
const RefFrame srcFrame,
Vector< double > &  toPos 
) const
overridevirtualnoexcept

Implements gnsstk::Transformer.

Definition at line 173 of file HelmertTransformer.cpp.

◆ transform() [4/5]

bool gnsstk::HelmertTransformer::transform ( const Xvt fromPos,
Xvt toPos 
) const
overridevirtualnoexcept

Implements gnsstk::Transformer.

Definition at line 153 of file HelmertTransformer.cpp.

◆ transform() [5/5]

bool gnsstk::HelmertTransformer::transform ( double  fx,
double  fy,
double  fz,
const RefFrame srcFrame,
double &  tx,
double &  ty,
double &  tz 
) const
overridevirtualnoexcept

Implements gnsstk::Transformer.

Definition at line 236 of file HelmertTransformer.cpp.

Member Data Documentation

◆ description

std::string gnsstk::HelmertTransformer::description

An arbitrary string describing the transform. It should include the source.

Definition at line 159 of file HelmertTransformer.hpp.

◆ rotation

Matrix<double> gnsstk::HelmertTransformer::rotation
protected

The matrix that applies a rotation to move from fromFrame to toFrame.

Definition at line 164 of file HelmertTransformer.hpp.

◆ scale

double gnsstk::HelmertTransformer::scale
protected

Scale factor. Dimensionless. 0 = no scale.

Definition at line 169 of file HelmertTransformer.hpp.

◆ translation

Vector<double> gnsstk::HelmertTransformer::translation
protected

The matrix that applies a translation to move from fromFrame to toFrame.

Definition at line 167 of file HelmertTransformer.hpp.


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


gnsstk
Author(s):
autogenerated on Wed Oct 25 2023 02:40:45