Changeset 211 in pacpusframework for trunk


Ignore:
Timestamp:
Nov 6, 2013, 11:38:40 AM (11 years ago)
Author:
Marek Kurdej
Message:

Geodesie: minor fixes.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/Pacpus/PacpusTools/geodesie.h

    r210 r211  
    2525#include <vector>
    2626
    27 #include <QMatrix4x4>
    28 #include <QVector3D>
     27//#include <QMatrix4x4>
     28//#include <QVector3D>
    2929
    3030namespace Geodesy
    3131{
    3232
    33 /// 9x9 matrix ???
     33/// 3x3 matrix ???
    3434///
    3535/// @todo Documentation
     
    8383
    8484    /// @todo Documentation
    85     /// @param s filepath
    86     bool Load(const std::string& s);
     85    /// @param filepath Path to the input file with RAF98 data.
     86    bool Load(const std::string& filepath);
    8787
    8888    /// @todo Documentation
     
    102102inline double Deg2Rad(double deg)
    103103{
    104     using namespace ::boost::math::constants;
     104    using ::boost::math::constants::pi;
    105105    return deg * pi<double>() / 180.0;
    106106}
     
    108108inline double Rad2Deg(double rad)
    109109{
    110     using namespace ::boost::math::constants;
     110    using ::boost::math::constants::pi;
    111111    return rad * 180.0 / pi<double>();
    112112}
     
    175175PACPUSTOOLS_API double ConvMerApp(double longitude);
    176176
    177 /**
    178 Converts Cartesian (x, y) coordinates to polar coordinates (r, theta)
    179 */
     177/// Converts Cartesian (x, y) coordinates to polar coordinates (r, theta)
    180178template <typename _T1, typename _T2>
    181179void cartesianToPolar(const _T1 x, const _T1 y, _T2& r, _T2& theta)
     
    185183}
    186184
    187 /**
    188 Converts polar coordinates (r, theta) to Cartesian (x, y) coordinates
    189 */
     185/// Converts polar coordinates (r, theta) to Cartesian (x, y) coordinates
    190186template <typename _T1, typename _T2>
    191187void polarToCartesian(const _T1 r, const _T1 theta, _T2& x, _T2& y)
     
    195191}
    196192
    197 /**
    198 Converts Cartesian (x, y, z) coordinates to spherical coordinates (r, theta, phi)
    199 Angles expressed in radians.
    200 */
     193/// Converts Cartesian (x, y, z) coordinates to spherical coordinates (r, theta, phi)
     194/// Angles expressed in radians.
    201195template <typename _T1, typename _T2>
    202196void cartesianToSpherical(const _T1 x, const _T1 y, const _T1 z, _T2& r, _T2& theta, _T2& phi)
     
    207201}
    208202
    209 /**
    210 Converts spherical coordinates (r, theta, phi) to Cartesian (x, y, z) coordinates.
    211 Angles expressed in radians.
    212 */
     203/// Converts spherical coordinates (r, theta, phi) to Cartesian (x, y, z) coordinates.
     204/// Angles expressed in radians.
    213205template <typename _T1, typename _T2>
    214206void sphericalToCartesian(const _T1 r, const _T1 theta, const _T1 phi, _T2& x, _T2& y, _T2& z)
     
    219211}
    220212
    221 PACPUSTOOLS_API QMatrix4x4 yprenuToMatrix(QVector3D angle, QVector3D position);
     213//PACPUSTOOLS_API QMatrix4x4 yprenuToMatrix(QVector3D angle, QVector3D position);
    222214
    223215} // namespace Geodesy
  • trunk/src/PacpusTools/src/geodesie.cpp

    r210 r211  
    413413}
    414414
    415 QMatrix4x4 Geodesy::yprenuToMatrix(QVector3D angle, QVector3D position)
    416 {
    417     float c1 = cos(angle.x());
    418     float c2 = cos(angle.y());
    419     float c3 = cos(angle.z());
    420 
    421     float s1 = sin(angle.x());
    422     float s2 = sin(angle.y());
    423     float s3 = sin(angle.z());
    424 
    425     // Source : https://en.wikipedia.org/wiki/Euler_angles
    426     return QMatrix4x4(c1 * c2, c1 * s2 * s3 - c3 * s1, s1 * s3 + c1 * c3 * s2, position.x(),
    427                       c2 * s1, c1 * c3 + s1 * s2 * s3, c3 * s1 * s2 - c1 * s3, position.y(),
    428                       -s2, c2 * s3, c2 * c3, position.z(),
    429                       0, 0, 0, 1);
    430 }
     415//QMatrix4x4 Geodesy::yprenuToMatrix(QVector3D angle, QVector3D position)
     416//{
     417//    float c1 = cos(angle.x());
     418//    float c2 = cos(angle.y());
     419//    float c3 = cos(angle.z());
     420//
     421//    float s1 = sin(angle.x());
     422//    float s2 = sin(angle.y());
     423//    float s3 = sin(angle.z());
     424//
     425//    // Source : https://en.wikipedia.org/wiki/Euler_angles
     426//    return QMatrix4x4(c1 * c2, c1 * s2 * s3 - c3 * s1, s1 * s3 + c1 * c3 * s2, position.x(),
     427//                      c2 * s1, c1 * c3 + s1 * s2 * s3, c3 * s1 * s2 - c1 * s3, position.y(),
     428//                      -s2, c2 * s3, c2 * c3, position.z(),
     429//                      0, 0, 0, 1);
     430//}
Note: See TracChangeset for help on using the changeset viewer.