- Timestamp:
- Jul 23, 2014, 6:01:08 PM (10 years ago)
- Location:
- branches
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/0.0.x/include/Pacpus/PacpusTools/geodesie.h
r116 r311 19 19 #include <vector> 20 20 21 #include "Pacpus\kernel\PacpusToolsConfig.h" 22 23 21 24 namespace Geodesie { 22 25 … … 35 38 /// @todo Documentation 36 39 /// @todo Rewrite! 37 struct Matrice40 struct PACPUSTOOLS_API Matrice 38 41 { 39 42 /// Copy ctor … … 66 69 }; 67 70 68 Matrice TransMat(const Matrice A);69 70 Matrice P rodMat(const Matrice A,const Matrice B);71 Matrice PACPUSTOOLS_API TransMat(const Matrice A); 72 73 Matrice PACPUSTOOLS_API ProdMat(const Matrice A,const Matrice B); 71 74 void Write(const Matrice A,std::ostream& out); 72 75 73 76 //////////////////////////////////////////////////////////////////////// 74 77 /// @todo Documentation 75 class Raf9878 class PACPUSTOOLS_API Raf98 76 79 { 77 80 public: … … 99 102 100 103 //////////////////////////////////////////////////////////////////////// 101 inline double Deg2Rad(double deg) {return deg*M_PI/180.0;}102 inline double Rad2Deg(double rad) {return rad*180.0/M_PI;}104 inline double PACPUSTOOLS_API Deg2Rad(double deg) {return deg*M_PI/180.0;} 105 inline double PACPUSTOOLS_API Rad2Deg(double rad) {return rad*180.0/M_PI;} 103 106 //////////////////////////////////////////////////////////////////////// 104 107 … … 123 126 124 127 //////////////////////////////////////////////////////////////////////// 125 void Geographique_2_Lambert93(const Raf98& raf98,double lambda,double phi,double he,Matrice in,double& E,double& N,double& h,Matrice& out);126 void Geographique_2_Lambert93(const Raf98& raf98,double lambda,double phi,double he,double& E,double& N,double& h);127 void Lambert93_2_Geographique(const Raf98& raf98,double E,double N,double h,double& lambda,double& phi,double& he);128 void Lambert93_2_Geographique(const Raf98& raf98,double E,double N,double h,Matrice in,double& lambda,double& phi,double& he,Matrice& out);128 void PACPUSTOOLS_API Geographique_2_Lambert93(const Raf98& raf98,double lambda,double phi,double he,Matrice in,double& E,double& N,double& h,Matrice& out); 129 void PACPUSTOOLS_API Geographique_2_Lambert93(const Raf98& raf98,double lambda,double phi,double he,double& E,double& N,double& h); 130 void PACPUSTOOLS_API Lambert93_2_Geographique(const Raf98& raf98,double E,double N,double h,double& lambda,double& phi,double& he); 131 void PACPUSTOOLS_API Lambert93_2_Geographique(const Raf98& raf98,double E,double N,double h,Matrice in,double& lambda,double& phi,double& he,Matrice& out); 129 132 /// Convert from geographique to ECEF. 130 133 /// @param[in] longitude Longitude in radian. 131 134 /// @param[in] latitude Latitude in radian. 132 135 /// @param[in] he Height in meter. 133 void Geographique_2_ECEF(double longitude, double latitude, double he, double& x, double& y, double& z);136 void PACPUSTOOLS_API Geographique_2_ECEF(double longitude, double latitude, double he, double& x, double& y, double& z); 134 137 /// Convert from ECEF two ENU. 135 138 /// @param[in] lon0 Longitude of the origin in radian. 136 139 /// @param[in] lat0 Latitude of the origin in radian. 137 140 /// @param[in] he0 Height of the origin in radian. 138 void ECEF_2_ENU(double x,double y,double z,double& e,double& n,double& u,double lon0,double lat0,double he0);141 void PACPUSTOOLS_API ECEF_2_ENU(double x,double y,double z,double& e,double& n,double& u,double lon0,double lat0,double he0); 139 142 //////////////////////////////////////////////////////////////////////// 140 143 141 144 ///ALGO0001 142 145 /// @todo Rename 143 double LatitueIsometrique(double latitude,double e);146 double PACPUSTOOLS_API LatitueIsometrique(double latitude,double e); 144 147 ///ALGO0002 145 148 /// @todo Rename 146 double LatitueIsometrique2Lat(double latitude_iso,double e,double epsilon);149 double PACPUSTOOLS_API LatitueIsometrique2Lat(double latitude_iso,double e,double epsilon); 147 150 148 151 ///ALGO0003 149 void Geo2ProjLambert(152 void PACPUSTOOLS_API Geo2ProjLambert( 150 153 double lambda,double phi, 151 154 double n, double c,double e, … … 153 156 double& X,double& Y); 154 157 ///ALGO0004 155 void P roj2GeoLambert(158 void PACPUSTOOLS_API Proj2GeoLambert( 156 159 double X,double Y, 157 160 double n, double c,double e, … … 160 163 double& lambda,double& phi); 161 164 162 double ConvMerApp(double longitude);165 double PACPUSTOOLS_API ConvMerApp(double longitude); 163 166 164 167 /// Converts Cartesian (x, y) coordinates to polar coordinates (r, theta) -
branches/0.1.x/include/Pacpus/PacpusTools/geodesie.h
r162 r311 6 6 /// @author Jean Laneurit <firstname.surname@utc.fr> 7 7 /// @date April, 2010 8 /// @version $Id: geodesie.h 75 2013-01-10 17:04:19Z kurdejma $8 /// @version $Id: geodesie.h 116 2013-06-25 11:44:25Z kurdejma $ 9 9 /// @copyright Copyright (c) UTC/CNRS Heudiasyc 2006 - 2013. All rights reserved. 10 10 /// @brief Brief description. … … 19 19 #include <vector> 20 20 21 #include <QMatrix4x4> 22 #include <QVector3D> 23 24 #include "PacpusToolsConfig.h" 21 #include "Pacpus\kernel\PacpusToolsConfig.h" 22 25 23 26 24 namespace Geodesie { … … 71 69 }; 72 70 73 PACPUSTOOLS_API Matrice TransMat(const Matrice A); 74 PACPUSTOOLS_API Matrice ProdMat(const Matrice A,const Matrice B); 75 PACPUSTOOLS_API void Write(const Matrice A,std::ostream& out); 71 Matrice PACPUSTOOLS_API TransMat(const Matrice A); 72 73 Matrice PACPUSTOOLS_API ProdMat(const Matrice A,const Matrice B); 74 void Write(const Matrice A,std::ostream& out); 76 75 77 76 //////////////////////////////////////////////////////////////////////// … … 93 92 /// @param latitude [degrees] 94 93 /// @param Hwgs84 Output: interpolated altitude using WGS84 geoid model [meters] 95 bool Interpol(double longitude /*deg*/, double latitude/*deg*/, double* Hwgs84) const;94 bool Interpol(double longitudeDegrees, double latitudeDegrees, double * heightMetersWgs84) const; 96 95 97 96 private: … … 103 102 104 103 //////////////////////////////////////////////////////////////////////// 105 inline double Deg2Rad(double deg) 106 { 107 return deg*M_PI/180.0; 108 } 109 110 inline double Rad2Deg(double rad) 111 { 112 return rad*180.0/M_PI; 113 } 114 104 inline double PACPUSTOOLS_API Deg2Rad(double deg) {return deg*M_PI/180.0;} 105 inline double PACPUSTOOLS_API Rad2Deg(double rad) {return rad*180.0/M_PI;} 115 106 //////////////////////////////////////////////////////////////////////// 116 107 … … 135 126 136 127 //////////////////////////////////////////////////////////////////////// 137 PACPUSTOOLS_API void Geographique_2_Lambert93(const Raf98& raf98,double lambda,double phi,double he,Matrice in,double& E,double& N,double& h,Matrice& out); 138 PACPUSTOOLS_API void Geographique_2_Lambert93(const Raf98& raf98,double lambda,double phi,double he,double& E,double& N,double& h); 139 PACPUSTOOLS_API void Lambert93_2_Geographique(const Raf98& raf98,double E,double N,double h,double& lambda,double& phi,double& he); 140 PACPUSTOOLS_API void Lambert93_2_Geographique(const Raf98& raf98,double E,double N,double h,Matrice in,double& lambda,double& phi,double& he,Matrice& out); 141 /** Convert from geographique to ECEF. 142 * @param[in] longitude Longitude in radian. 143 * @param[in] latitude Latitude in radian. 144 * @param[in] he Height in meter. 145 */ 146 PACPUSTOOLS_API void Geographique_2_ECEF(double longitude, double latitude, double he, double& x, double& y, double& z); 147 /** Convert from ECEF two ENU. 148 * @param[in] lon0 Longitude of the origin in radian. 149 * @param[in] lat0 Latitude of the origin in radian. 150 * @param[in] he0 Height of the origin in radian. 151 */ 152 PACPUSTOOLS_API void ECEF_2_ENU(double x,double y,double z,double& e,double& n,double& u,double lon0,double lat0,double he0); 128 void PACPUSTOOLS_API Geographique_2_Lambert93(const Raf98& raf98,double lambda,double phi,double he,Matrice in,double& E,double& N,double& h,Matrice& out); 129 void PACPUSTOOLS_API Geographique_2_Lambert93(const Raf98& raf98,double lambda,double phi,double he,double& E,double& N,double& h); 130 void PACPUSTOOLS_API Lambert93_2_Geographique(const Raf98& raf98,double E,double N,double h,double& lambda,double& phi,double& he); 131 void PACPUSTOOLS_API Lambert93_2_Geographique(const Raf98& raf98,double E,double N,double h,Matrice in,double& lambda,double& phi,double& he,Matrice& out); 132 /// Convert from geographique to ECEF. 133 /// @param[in] longitude Longitude in radian. 134 /// @param[in] latitude Latitude in radian. 135 /// @param[in] he Height in meter. 136 void PACPUSTOOLS_API Geographique_2_ECEF(double longitude, double latitude, double he, double& x, double& y, double& z); 137 /// Convert from ECEF two ENU. 138 /// @param[in] lon0 Longitude of the origin in radian. 139 /// @param[in] lat0 Latitude of the origin in radian. 140 /// @param[in] he0 Height of the origin in radian. 141 void PACPUSTOOLS_API ECEF_2_ENU(double x,double y,double z,double& e,double& n,double& u,double lon0,double lat0,double he0); 153 142 //////////////////////////////////////////////////////////////////////// 154 143 155 144 ///ALGO0001 156 145 /// @todo Rename 157 PACPUSTOOLS_API doubleLatitueIsometrique(double latitude,double e);146 double PACPUSTOOLS_API LatitueIsometrique(double latitude,double e); 158 147 ///ALGO0002 159 148 /// @todo Rename 160 PACPUSTOOLS_API doubleLatitueIsometrique2Lat(double latitude_iso,double e,double epsilon);149 double PACPUSTOOLS_API LatitueIsometrique2Lat(double latitude_iso,double e,double epsilon); 161 150 162 151 ///ALGO0003 163 PACPUSTOOLS_API voidGeo2ProjLambert(152 void PACPUSTOOLS_API Geo2ProjLambert( 164 153 double lambda,double phi, 165 154 double n, double c,double e, … … 167 156 double& X,double& Y); 168 157 ///ALGO0004 169 PACPUSTOOLS_API voidProj2GeoLambert(158 void PACPUSTOOLS_API Proj2GeoLambert( 170 159 double X,double Y, 171 160 double n, double c,double e, … … 174 163 double& lambda,double& phi); 175 164 176 PACPUSTOOLS_API double ConvMerApp(double longitude); 177 178 /** 179 Converts Cartesian (x, y) coordinates to polar coordinates (r, theta) 180 */ 165 double PACPUSTOOLS_API ConvMerApp(double longitude); 166 167 /// Converts Cartesian (x, y) coordinates to polar coordinates (r, theta) 181 168 template <typename _T1, typename _T2> 182 169 void cartesianToPolar(const _T1 x, const _T1 y, _T2 & r, _T2 & theta) { … … 185 172 } 186 173 187 /** 188 Converts polar coordinates (r, theta) to Cartesian (x, y) coordinates 189 */ 174 /// Converts polar coordinates (r, theta) to Cartesian (x, y) coordinates 190 175 template <typename _T1, typename _T2> 191 176 void polarToCartesian(const _T1 r, const _T1 theta, _T2 & x, _T2 & y) { … … 194 179 } 195 180 196 /** 197 Converts Cartesian (x, y, z) coordinates to spherical coordinates (r, theta, phi) 198 Angles expressed in radians. 199 */ 181 /// Converts Cartesian (x, y, z) coordinates to spherical coordinates (r, theta, phi) 182 /// Angles expressed in radians. 200 183 template <typename _T1, typename _T2> 201 184 void cartesianToSpherical(const _T1 x, const _T1 y, const _T1 z, _T2 & r, _T2 & theta, _T2 & phi) { … … 205 188 } 206 189 207 /** 208 Converts spherical coordinates (r, theta, phi) to Cartesian (x, y, z) coordinates. 209 Angles expressed in radians. 210 */ 190 /// Converts spherical coordinates (r, theta, phi) to Cartesian (x, y, z) coordinates. 191 /// Angles expressed in radians. 211 192 template <typename _T1, typename _T2> 212 193 void sphericalToCartesian(const _T1 r, const _T1 theta, const _T1 phi, _T2 & x, _T2 & y, _T2 & z) { … … 216 197 } 217 198 218 PACPUSTOOLS_API QMatrix4x4 yprenuToMatrix(QVector3D angle, QVector3D position);219 220 199 } // namespace Geodesie 221 200
Note:
See TracChangeset
for help on using the changeset viewer.