| Constants.hpp | | Constants.hpp | |
| | | | |
| skipping to change at line 24 | | skipping to change at line 24 | |
| | | | |
| /** | | /** | |
| * A compile-time assert. Use C++11 static_assert, if available. | | * A compile-time assert. Use C++11 static_assert, if available. | |
| **********************************************************************/ | | **********************************************************************/ | |
| #if !defined(STATIC_ASSERT) | | #if !defined(STATIC_ASSERT) | |
| # if __cplusplus >= 201103 | | # if __cplusplus >= 201103 | |
| # define STATIC_ASSERT static_assert | | # define STATIC_ASSERT static_assert | |
| # elif defined(__GXX_EXPERIMENTAL_CXX0X__) | | # elif defined(__GXX_EXPERIMENTAL_CXX0X__) | |
| # define STATIC_ASSERT static_assert | | # define STATIC_ASSERT static_assert | |
| # elif defined(_MSC_VER) && _MSC_VER >= 1600 | | # elif defined(_MSC_VER) && _MSC_VER >= 1600 | |
|
| | | // For reference, here is a table of Visual Studio and _MSC_VER | |
| | | // correspondences: | |
| | | // | |
| | | // _MSC_VER Visual Studio | |
| | | // 1300 vc7 | |
| | | // 1311 vc7.1 (2003) | |
| | | // 1400 vc8 (2005) | |
| | | // 1500 vc9 (2008) | |
| | | // 1600 vc10 (2010) | |
| | | // 1700 vc11 (2012) | |
| | | // 1800 vc12 (2013) | |
| # define STATIC_ASSERT static_assert | | # define STATIC_ASSERT static_assert | |
| # else | | # else | |
| # define STATIC_ASSERT(cond,reason) \ | | # define STATIC_ASSERT(cond,reason) \ | |
| { enum{ STATIC_ASSERT_ENUM = 1/int(cond) }; } | | { enum{ STATIC_ASSERT_ENUM = 1/int(cond) }; } | |
| # endif | | # endif | |
| #endif | | #endif | |
| | | | |
| #if defined(_MSC_VER) && defined(GEOGRAPHICLIB_SHARED_LIB) && \ | | #if defined(_MSC_VER) && defined(GEOGRAPHICLIB_SHARED_LIB) && \ | |
| GEOGRAPHICLIB_SHARED_LIB | | GEOGRAPHICLIB_SHARED_LIB | |
| # if GEOGRAPHICLIB_SHARED_LIB > 1 | | # if GEOGRAPHICLIB_SHARED_LIB > 1 | |
| | | | |
End of changes. 1 change blocks. |
| 0 lines changed or deleted | | 11 lines changed or added | |
|
| Geodesic.hpp | | Geodesic.hpp | |
| | | | |
| skipping to change at line 165 | | skipping to change at line 165 | |
| * DOI: <a href="http://dx.doi.org/10.1007/s00190-012-0578-z"> | | * DOI: <a href="http://dx.doi.org/10.1007/s00190-012-0578-z"> | |
| * 10.1007/s00190-012-0578-z</a>; | | * 10.1007/s00190-012-0578-z</a>; | |
| * addenda: <a href="http://geographiclib.sf.net/geod-addenda.html"> | | * addenda: <a href="http://geographiclib.sf.net/geod-addenda.html"> | |
| * geod-addenda.html</a>. | | * geod-addenda.html</a>. | |
| * . | | * . | |
| * For more information on geodesics see \ref geodesic. | | * For more information on geodesics see \ref geodesic. | |
| * | | * | |
| * Example of use: | | * Example of use: | |
| * \include example-Geodesic.cpp | | * \include example-Geodesic.cpp | |
| * | | * | |
|
| * <a href="Geod.1.html">Geod</a> is a command-line utility providing acc | | * <a href="GeodSolve.1.html">GeodSolve</a> is a command-line utility | |
| ess | | * providing access to the functionality of Geodesic and GeodesicLine. | |
| * to the functionality of Geodesic and GeodesicLine. | | | |
| **********************************************************************/ | | **********************************************************************/ | |
| | | | |
| class GEOGRAPHICLIB_EXPORT Geodesic { | | class GEOGRAPHICLIB_EXPORT Geodesic { | |
| private: | | private: | |
| typedef Math::real real; | | typedef Math::real real; | |
| friend class GeodesicLine; | | friend class GeodesicLine; | |
| static const int nA1_ = GEOGRAPHICLIB_GEODESIC_ORDER; | | static const int nA1_ = GEOGRAPHICLIB_GEODESIC_ORDER; | |
| static const int nC1_ = GEOGRAPHICLIB_GEODESIC_ORDER; | | static const int nC1_ = GEOGRAPHICLIB_GEODESIC_ORDER; | |
| static const int nC1p_ = GEOGRAPHICLIB_GEODESIC_ORDER; | | static const int nC1p_ = GEOGRAPHICLIB_GEODESIC_ORDER; | |
| static const int nA2_ = GEOGRAPHICLIB_GEODESIC_ORDER; | | static const int nA2_ = GEOGRAPHICLIB_GEODESIC_ORDER; | |
| | | | |
End of changes. 1 change blocks. |
| 3 lines changed or deleted | | 2 lines changed or added | |
|
| GeodesicExact.hpp | | GeodesicExact.hpp | |
| | | | |
| skipping to change at line 28 | | skipping to change at line 28 | |
| * The order of the expansions used by GeodesicExact. | | * The order of the expansions used by GeodesicExact. | |
| **********************************************************************/ | | **********************************************************************/ | |
| # define GEOGRAPHICLIB_GEODESICEXACT_ORDER 30 | | # define GEOGRAPHICLIB_GEODESICEXACT_ORDER 30 | |
| #endif | | #endif | |
| | | | |
| namespace GeographicLib { | | namespace GeographicLib { | |
| | | | |
| class GeodesicLineExact; | | class GeodesicLineExact; | |
| | | | |
| /** | | /** | |
|
| * \brief Exact %Geodesic calculations | | * \brief Exact geodesic calculations | |
| * | | * | |
| * The equations for geodesics on an ellipsoid can be expressed in terms
of | | * The equations for geodesics on an ellipsoid can be expressed in terms
of | |
| * incomplete elliptic integrals. The Geodesic class expands these integ
rals | | * incomplete elliptic integrals. The Geodesic class expands these integ
rals | |
| * in a series in the flattening \e f and this provides an accurate solut
ion | | * in a series in the flattening \e f and this provides an accurate solut
ion | |
| * for \e f ∈ [-0.01, 0.01]. The GeodesicExact class computes the | | * for \e f ∈ [-0.01, 0.01]. The GeodesicExact class computes the | |
| * ellitpic integrals directly and so provides a solution which is valid
for | | * ellitpic integrals directly and so provides a solution which is valid
for | |
| * all \e f. However, in practice, its use should be limited to about \e | | * all \e f. However, in practice, its use should be limited to about \e | |
| * b/\e a ∈ [0.01, 100] or \e f ∈ [-99, 0.99]. | | * b/\e a ∈ [0.01, 100] or \e f ∈ [-99, 0.99]. | |
| * | | * | |
| * For the WGS84 ellipsoid, these classes are 2--3 times \e slower than t
he | | * For the WGS84 ellipsoid, these classes are 2--3 times \e slower than t
he | |
| | | | |
| skipping to change at line 70 | | skipping to change at line 70 | |
| * 32 2352 | | * 32 2352 | |
| * 64 6008 | | * 64 6008 | |
| * 128 19024 | | * 128 19024 | |
| * </pre> | | * </pre> | |
| * | | * | |
| * The computation of the area in these classes is via a 30th order serie
s. | | * The computation of the area in these classes is via a 30th order serie
s. | |
| * This gives accurate results for \e b/\e a ∈ [1/2, 2]; the accurac
y is | | * This gives accurate results for \e b/\e a ∈ [1/2, 2]; the accurac
y is | |
| * about 8 decimal digits for \e b/\e a ∈ [1/4, 4]. | | * about 8 decimal digits for \e b/\e a ∈ [1/4, 4]. | |
| * | | * | |
| * See \ref geodellip for the formulation. See the documentation on the | | * See \ref geodellip for the formulation. See the documentation on the | |
|
| * Geodesic class for additional information on the geodesics problems. | | * Geodesic class for additional information on the geodesic problems. | |
| * | | * | |
| * Example of use: | | * Example of use: | |
| * \include example-GeodesicExact.cpp | | * \include example-GeodesicExact.cpp | |
| * | | * | |
|
| * <a href="Geod.1.html">Geod</a> is a command-line utility providing acc | | * <a href="GeodSolve.1.html">GeodSolve</a> is a command-line utility | |
| ess | | * providing access to the functionality of GeodesicExact and | |
| * to the functionality of GeodesicExact and GeodesicLineExact (via the - | | * GeodesicLineExact (via the -E option). | |
| E | | | |
| * option). | | | |
| **********************************************************************/ | | **********************************************************************/ | |
| | | | |
| class GEOGRAPHICLIB_EXPORT GeodesicExact { | | class GEOGRAPHICLIB_EXPORT GeodesicExact { | |
| private: | | private: | |
| typedef Math::real real; | | typedef Math::real real; | |
| friend class GeodesicLineExact; | | friend class GeodesicLineExact; | |
| static const int nC4_ = GEOGRAPHICLIB_GEODESICEXACT_ORDER; | | static const int nC4_ = GEOGRAPHICLIB_GEODESICEXACT_ORDER; | |
| static const int nC4x_ = (nC4_ * (nC4_ + 1)) / 2; | | static const int nC4x_ = (nC4_ * (nC4_ + 1)) / 2; | |
| static const unsigned maxit1_ = 20; | | static const unsigned maxit1_ = 20; | |
| static const unsigned maxit2_ = maxit1_ + | | static const unsigned maxit2_ = maxit1_ + | |
| | | | |
End of changes. 3 change blocks. |
| 7 lines changed or deleted | | 5 lines changed or added | |
|
| GeodesicLine.hpp | | GeodesicLine.hpp | |
| | | | |
| skipping to change at line 55 | | skipping to change at line 55 | |
| * DOI: <a href="http://dx.doi.org/10.1007/s00190-012-0578-z"> | | * DOI: <a href="http://dx.doi.org/10.1007/s00190-012-0578-z"> | |
| * 10.1007/s00190-012-0578-z</a>; | | * 10.1007/s00190-012-0578-z</a>; | |
| * addenda: <a href="http://geographiclib.sf.net/geod-addenda.html"> | | * addenda: <a href="http://geographiclib.sf.net/geod-addenda.html"> | |
| * geod-addenda.html</a>. | | * geod-addenda.html</a>. | |
| * . | | * . | |
| * For more information on geodesics see \ref geodesic. | | * For more information on geodesics see \ref geodesic. | |
| * | | * | |
| * Example of use: | | * Example of use: | |
| * \include example-GeodesicLine.cpp | | * \include example-GeodesicLine.cpp | |
| * | | * | |
|
| * <a href="Geod.1.html">Geod</a> is a command-line utility providing acc | | * <a href="GeodSolve.1.html">GeodSolve</a> is a command-line utility | |
| ess | | * providing access to the functionality of Geodesic and GeodesicLine. | |
| * to the functionality of Geodesic and GeodesicLine. | | | |
| **********************************************************************/ | | **********************************************************************/ | |
| | | | |
| class GEOGRAPHICLIB_EXPORT GeodesicLine { | | class GEOGRAPHICLIB_EXPORT GeodesicLine { | |
| private: | | private: | |
| typedef Math::real real; | | typedef Math::real real; | |
| friend class Geodesic; | | friend class Geodesic; | |
| static const int nC1_ = Geodesic::nC1_; | | static const int nC1_ = Geodesic::nC1_; | |
| static const int nC1p_ = Geodesic::nC1p_; | | static const int nC1p_ = Geodesic::nC1p_; | |
| static const int nC2_ = Geodesic::nC2_; | | static const int nC2_ = Geodesic::nC2_; | |
| static const int nC3_ = Geodesic::nC3_; | | static const int nC3_ = Geodesic::nC3_; | |
| | | | |
End of changes. 1 change blocks. |
| 3 lines changed or deleted | | 2 lines changed or added | |
|
| GeodesicLineExact.hpp | | GeodesicLineExact.hpp | |
| | | | |
| skipping to change at line 30 | | skipping to change at line 30 | |
| * \brief An exact geodesic line | | * \brief An exact geodesic line | |
| * | | * | |
| * GeodesicLineExact facilitates the determination of a series of points
on a | | * GeodesicLineExact facilitates the determination of a series of points
on a | |
| * single geodesic. This is a companion to the GeodesicExact class. For | | * single geodesic. This is a companion to the GeodesicExact class. For | |
| * additional information on this class see the documentation on the | | * additional information on this class see the documentation on the | |
| * GeodesicLine class. | | * GeodesicLine class. | |
| * | | * | |
| * Example of use: | | * Example of use: | |
| * \include example-GeodesicLineExact.cpp | | * \include example-GeodesicLineExact.cpp | |
| * | | * | |
|
| * <a href="Geod.1.html">Geod</a> is a command-line utility providing acc | | * <a href="GeodSolve.1.html">GeodSolve</a> is a command-line utility | |
| ess | | * providing access to the functionality of GeodesicExact and | |
| * to the functionality of GeodesicExact and GeodesicLineExact (via the - | | * GeodesicLineExact (via the -E option). | |
| E | | | |
| * option). | | | |
| **********************************************************************/ | | **********************************************************************/ | |
| | | | |
| class GEOGRAPHICLIB_EXPORT GeodesicLineExact { | | class GEOGRAPHICLIB_EXPORT GeodesicLineExact { | |
| private: | | private: | |
| typedef Math::real real; | | typedef Math::real real; | |
| friend class GeodesicExact; | | friend class GeodesicExact; | |
| static const int nC4_ = GeodesicExact::nC4_; | | static const int nC4_ = GeodesicExact::nC4_; | |
| | | | |
| real _lat1, _lon1, _azi1; | | real _lat1, _lon1, _azi1; | |
| real _a, _f, _b, _c2, _f1, _e2, _salp0, _calp0, _k2, | | real _a, _f, _b, _c2, _f1, _e2, _salp0, _calp0, _k2, | |
| | | | |
End of changes. 1 change blocks. |
| 5 lines changed or deleted | | 3 lines changed or added | |
|
| Math.hpp | | Math.hpp | |
| | | | |
| skipping to change at line 21 | | skipping to change at line 21 | |
| // include guard to enforce this ordering. | | // include guard to enforce this ordering. | |
| #include <GeographicLib/Constants.hpp> | | #include <GeographicLib/Constants.hpp> | |
| | | | |
| #if !defined(GEOGRAPHICLIB_MATH_HPP) | | #if !defined(GEOGRAPHICLIB_MATH_HPP) | |
| #define GEOGRAPHICLIB_MATH_HPP 1 | | #define GEOGRAPHICLIB_MATH_HPP 1 | |
| | | | |
| /** | | /** | |
| * Are C++11 math functions available? | | * Are C++11 math functions available? | |
| **********************************************************************/ | | **********************************************************************/ | |
| #if !defined(GEOGRAPHICLIB_CPLUSPLUS11_MATH) | | #if !defined(GEOGRAPHICLIB_CPLUSPLUS11_MATH) | |
|
| # if defined(__GNUC__) && __GNUC__ == 4 && __GNUC_MINOR__ >= 8 \ | | # if defined(__GNUC__) && __GNUC__ == 4 && __GNUC_MINOR__ >= 7 \ | |
| && __cplusplus >= 201103 | | && __cplusplus >= 201103 && !(defined(__ANDROID__) || defined(ANDROID)) | |
| | | // The android toolchain uses g++ and supports C++11, but not, apparently, | |
| | | the | |
| | | // new mathematical functions introduced with C++11. Android toolchains mi | |
| | | ght | |
| | | // define __ANDROID__ or ANDROID; so need to check both. | |
| # define GEOGRAPHICLIB_CPLUSPLUS11_MATH 1 | | # define GEOGRAPHICLIB_CPLUSPLUS11_MATH 1 | |
| # elif defined(_MSC_VER) && _MSC_VER >= 1800 | | # elif defined(_MSC_VER) && _MSC_VER >= 1800 | |
| # define GEOGRAPHICLIB_CPLUSPLUS11_MATH 1 | | # define GEOGRAPHICLIB_CPLUSPLUS11_MATH 1 | |
| # else | | # else | |
| # define GEOGRAPHICLIB_CPLUSPLUS11_MATH 0 | | # define GEOGRAPHICLIB_CPLUSPLUS11_MATH 0 | |
| # endif | | # endif | |
| #endif | | #endif | |
| | | | |
| #if !defined(WORDS_BIGENDIAN) | | #if !defined(WORDS_BIGENDIAN) | |
| # define WORDS_BIGENDIAN 0 | | # define WORDS_BIGENDIAN 0 | |
| | | | |
End of changes. 1 change blocks. |
| 2 lines changed or deleted | | 7 lines changed or added | |
|
| UTMUPS.hpp | | UTMUPS.hpp | |
| | | | |
| skipping to change at line 73 | | skipping to change at line 73 | |
| typedef Math::real real; | | typedef Math::real real; | |
| static const real falseeasting_[4]; | | static const real falseeasting_[4]; | |
| static const real falsenorthing_[4]; | | static const real falsenorthing_[4]; | |
| static const real mineasting_[4]; | | static const real mineasting_[4]; | |
| static const real maxeasting_[4]; | | static const real maxeasting_[4]; | |
| static const real minnorthing_[4]; | | static const real minnorthing_[4]; | |
| static const real maxnorthing_[4]; | | static const real maxnorthing_[4]; | |
| static const int epsg01N = 32601; // EPSG code for UTM 01N | | static const int epsg01N = 32601; // EPSG code for UTM 01N | |
| static const int epsg60N = 32660; // EPSG code for UTM 60N | | static const int epsg60N = 32660; // EPSG code for UTM 60N | |
| static const int epsgN = 32661; // EPSG code for UPS N | | static const int epsgN = 32661; // EPSG code for UPS N | |
|
| static const int epsg01S = 32701; // EPSG code for UTM 01N | | static const int epsg01S = 32701; // EPSG code for UTM 01S | |
| static const int epsg60S = 32760; // EPSG code for UTM 60S | | static const int epsg60S = 32760; // EPSG code for UTM 60S | |
| static const int epsgS = 32761; // EPSG code for UPS S | | static const int epsgS = 32761; // EPSG code for UPS S | |
| static real CentralMeridian(int zone) throw() | | static real CentralMeridian(int zone) throw() | |
| { return real(6 * zone - 183); } | | { return real(6 * zone - 183); } | |
| static void CheckLatLon(real lat, real lon); | | static void CheckLatLon(real lat, real lon); | |
| // Throw an error if easting or northing are outside standard ranges.
If | | // Throw an error if easting or northing are outside standard ranges.
If | |
| // throwp = false, return bool instead. | | // throwp = false, return bool instead. | |
| static bool CheckCoords(bool utmp, bool northp, real x, real y, | | static bool CheckCoords(bool utmp, bool northp, real x, real y, | |
| bool msgrlimits = false, bool throwp = true); | | bool msgrlimits = false, bool throwp = true); | |
| UTMUPS(); // Disable constructor | | UTMUPS(); // Disable constructor | |
| | | | |
End of changes. 1 change blocks. |
| 1 lines changed or deleted | | 1 lines changed or added | |
|