AlbersEqualArea.hpp   AlbersEqualArea.hpp 
/** /**
* \file AlbersEqualArea.hpp * \file AlbersEqualArea.hpp
* \brief Header for GeographicLib::AlbersEqualArea class * \brief Header for GeographicLib::AlbersEqualArea class
* *
* Copyright (c) Charles Karney (2010, 2011) <charles@karney.com> and licen sed * Copyright (c) Charles Karney (2010, 2011) <charles@karney.com> and licen sed
* under the LGPL. For more information, see * under the MIT/X11 License. For more information, see
* http://geographiclib.sourceforge.net/ * http://geographiclib.sourceforge.net/
**********************************************************************/ **********************************************************************/
#if !defined(GEOGRAPHICLIB_ALBERSEQUALAREA_HPP) #if !defined(GEOGRAPHICLIB_ALBERSEQUALAREA_HPP)
#define GEOGRAPHICLIB_ALBERSEQUALAREA_HPP "$Id: 62d2975148c072f824730134ca6 b1cbc659250f0 $" #define GEOGRAPHICLIB_ALBERSEQUALAREA_HPP "$Id: e29eed8bc763c20ae10131ef13f 243c3b99bd37b $"
#include <algorithm> #include <algorithm>
#include <GeographicLib/Constants.hpp> #include <GeographicLib/Constants.hpp>
namespace GeographicLib { namespace GeographicLib {
/** /**
* \brief Albers Equal Area Conic Projection * \brief Albers Equal Area Conic Projection
* *
* Implementation taken from the report, * Implementation taken from the report,
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added


 AzimuthalEquidistant.hpp   AzimuthalEquidistant.hpp 
/** /**
* \file AzimuthalEquidistant.hpp * \file AzimuthalEquidistant.hpp
* \brief Header for GeographicLib::AzimuthalEquidistant class * \brief Header for GeographicLib::AzimuthalEquidistant class
* *
* Copyright (c) Charles Karney (2009, 2010, 2011) <charles@karney.com> and * Copyright (c) Charles Karney (2009, 2010, 2011) <charles@karney.com> and
* licensed under the LGPL. For more information, see * licensed under the MIT/X11 License. For more information, see
* http://geographiclib.sourceforge.net/ * http://geographiclib.sourceforge.net/
**********************************************************************/ **********************************************************************/
#if !defined(GEOGRAPHICLIB_AZIMUTHALEQUIDISTANT_HPP) #if !defined(GEOGRAPHICLIB_AZIMUTHALEQUIDISTANT_HPP)
#define GEOGRAPHICLIB_AZIMUTHALEQUIDISTANT_HPP "$Id: 5b471fba64d7706c552fa2 1bcc6b70e8283837a0 $" #define GEOGRAPHICLIB_AZIMUTHALEQUIDISTANT_HPP "$Id: f711f34c879ebd191d3aa2 7530964550336dd248 $"
#include <GeographicLib/Geodesic.hpp> #include <GeographicLib/Geodesic.hpp>
#include <GeographicLib/Constants.hpp> #include <GeographicLib/Constants.hpp>
namespace GeographicLib { namespace GeographicLib {
/** /**
* \brief Azimuthal Equidistant Projection. * \brief Azimuthal Equidistant Projection.
* *
* Azimuthal equidistant projection centered at an arbitrary position on the * Azimuthal equidistant projection centered at an arbitrary position on the
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added


 CassiniSoldner.hpp   CassiniSoldner.hpp 
/** /**
* \file CassiniSoldner.hpp * \file CassiniSoldner.hpp
* \brief Header for GeographicLib::CassiniSoldner class * \brief Header for GeographicLib::CassiniSoldner class
* *
* Copyright (c) Charles Karney (2009, 2010, 2011) <charles@karney.com> and * Copyright (c) Charles Karney (2009, 2010, 2011) <charles@karney.com> and
* licensed under the LGPL. For more information, see * licensed under the MIT/X11 License. For more information, see
* http://geographiclib.sourceforge.net/ * http://geographiclib.sourceforge.net/
**********************************************************************/ **********************************************************************/
#if !defined(GEOGRAPHICLIB_CASSINISOLDNER_HPP) #if !defined(GEOGRAPHICLIB_CASSINISOLDNER_HPP)
#define GEOGRAPHICLIB_CASSINISOLDNER_HPP "$Id: 4ef919febf6e2388065e651dd606 b0bf3b7443ce $" #define GEOGRAPHICLIB_CASSINISOLDNER_HPP "$Id: ffa72d53546c2066064723afc1f0 a4c6dfadc2f0 $"
#include <GeographicLib/Geodesic.hpp> #include <GeographicLib/Geodesic.hpp>
#include <GeographicLib/GeodesicLine.hpp> #include <GeographicLib/GeodesicLine.hpp>
#include <GeographicLib/Constants.hpp> #include <GeographicLib/Constants.hpp>
namespace GeographicLib { namespace GeographicLib {
/** /**
* \brief Cassini-Soldner Projection. * \brief Cassini-Soldner Projection.
* *
skipping to change at line 69 skipping to change at line 69
* respectively, (\e lat1, \e lon1) and (\e lat, \e lon). * respectively, (\e lat1, \e lon1) and (\e lat, \e lon).
**********************************************************************/ **********************************************************************/
class GEOGRAPHIC_EXPORT CassiniSoldner { class GEOGRAPHIC_EXPORT CassiniSoldner {
private: private:
typedef Math::real real; typedef Math::real real;
const Geodesic _earth; const Geodesic _earth;
GeodesicLine _meridian; GeodesicLine _meridian;
real _sbet0, _cbet0; real _sbet0, _cbet0;
static const real eps1_; static const real eps1_;
static const real eps2_; static const real tiny_;
static const unsigned maxit_ = 10; static const unsigned maxit_ = 10;
// The following private helper functions are copied from Geodesic. // The following private helper functions are copied from Geodesic.
static inline real AngNormalize(real x) throw() { static inline real AngNormalize(real x) throw() {
// Place angle in [-180, 180). Assumes x is in [-540, 540). // Place angle in [-180, 180). Assumes x is in [-540, 540).
return x >= 180 ? x - 360 : x < -180 ? x + 360 : x; return x >= 180 ? x - 360 : x < -180 ? x + 360 : x;
} }
static inline real AngRound(real x) throw() { static inline real AngRound(real x) throw() {
// The makes the smallest gap in x = 1/16 - nextafter(1/16, 0) = 1/2^ 57 // The makes the smallest gap in x = 1/16 - nextafter(1/16, 0) = 1/2^ 57
// for reals = 0.7 pm on the earth if x is an angle in degrees. (Thi s // for reals = 0.7 pm on the earth if x is an angle in degrees. (Thi s
 End of changes. 3 change blocks. 
3 lines changed or deleted 3 lines changed or added


 Config.h   Config.h 
#define HAVE_LONG_DOUBLE 1 #define HAVE_LONG_DOUBLE 1
#define GEOGRAPHICLIB_VERSION_STRING "1.11" #define GEOGRAPHICLIB_VERSION_STRING "1.12"
 End of changes. 1 change blocks. 
0 lines changed or deleted 0 lines changed or added


 Constants.hpp   Constants.hpp 
/** /**
* \file Constants.hpp * \file Constants.hpp
* \brief Header for GeographicLib::Constants class * \brief Header for GeographicLib::Constants class
* *
* Copyright (c) Charles Karney (2008, 2009, 2010, 2011) <charles@karney.co m> * Copyright (c) Charles Karney (2008, 2009, 2010, 2011) <charles@karney.co m>
* and licensed under the LGPL. For more information, see * and licensed under the MIT/X11 License. For more information, see
* http://geographiclib.sourceforge.net/ * http://geographiclib.sourceforge.net/
**********************************************************************/ **********************************************************************/
#if !defined(GEOGRAPHICLIB_CONSTANTS_HPP) #if !defined(GEOGRAPHICLIB_CONSTANTS_HPP)
#define GEOGRAPHICLIB_CONSTANTS_HPP "$Id: 4aca66343d10b60147ea54b9ede6cc7f0 5e0916d $" #define GEOGRAPHICLIB_CONSTANTS_HPP "$Id: d38ac71ad012dd3652e229545db677f1a 5e24899 $"
#include <GeographicLib/Config.h> #include <GeographicLib/Config.h>
/** /**
* Are C++0X math functions available? * Are C++0X math functions available?
**********************************************************************/ **********************************************************************/
#if !defined(GEOGRAPHICLIB_CPLUSPLUS0X_MATH) #if !defined(GEOGRAPHICLIB_CPLUSPLUS0X_MATH)
# if defined(__GXX_EXPERIMENTAL_CXX0X__) # if defined(__GXX_EXPERIMENTAL_CXX0X__)
# define GEOGRAPHICLIB_CPLUSPLUS0X_MATH 1 # define GEOGRAPHICLIB_CPLUSPLUS0X_MATH 1
# else # else
skipping to change at line 192 skipping to change at line 192
T a = (std::max)(x, y), T a = (std::max)(x, y),
b = (std::min)(x, y) / (a ? a : 1); b = (std::min)(x, y) / (a ? a : 1);
return a * std::sqrt(1 + b * b); return a * std::sqrt(1 + b * b);
} }
#elif GEOGRAPHICLIB_CPLUSPLUS0X_MATH #elif GEOGRAPHICLIB_CPLUSPLUS0X_MATH
template<typename T> template<typename T>
static inline T hypot(T x, T y) throw() { return std::hypot(x, y); } static inline T hypot(T x, T y) throw() { return std::hypot(x, y); }
#elif defined(_MSC_VER) #elif defined(_MSC_VER)
static inline double hypot(double x, double y) throw() static inline double hypot(double x, double y) throw()
{ return _hypot(x, y); } { return _hypot(x, y); }
#if (_MSC_VER < 1400)
// Visual C++ 7.1/VS .NET 2003 does not have _hypotf()
static inline float hypot(float x, float y) throw()
{ return float(_hypot(x, y)); }
#else
static inline float hypot(float x, float y) throw() static inline float hypot(float x, float y) throw()
{ return _hypotf(x, y); } { return _hypotf(x, y); }
#endif
#if defined(HAVE_LONG_DOUBLE) #if defined(HAVE_LONG_DOUBLE)
static inline long double hypot(long double x, long double y) throw() static inline long double hypot(long double x, long double y) throw()
{ return _hypot(x, y); } { return _hypot(x, y); }
#endif #endif
#else #else
// Use overloading to define generic versions // Use overloading to define generic versions
static inline double hypot(double x, double y) throw() static inline double hypot(double x, double y) throw()
{ return ::hypot(x, y); } { return ::hypot(x, y); }
static inline float hypot(float x, float y) throw() static inline float hypot(float x, float y) throw()
{ return ::hypotf(x, y); } { return ::hypotf(x, y); }
 End of changes. 4 change blocks. 
2 lines changed or deleted 8 lines changed or added


 DMS.hpp   DMS.hpp 
/** /**
* \file DMS.hpp * \file DMS.hpp
* \brief Header for GeographicLib::DMS class * \brief Header for GeographicLib::DMS class
* *
* Copyright (c) Charles Karney (2008, 2009, 2010, 2011) <charles@karney.co m> * Copyright (c) Charles Karney (2008, 2009, 2010, 2011) <charles@karney.co m>
* and licensed under the LGPL. For more information, see * and licensed under the MIT/X11 License. For more information, see
* http://geographiclib.sourceforge.net/ * http://geographiclib.sourceforge.net/
**********************************************************************/ **********************************************************************/
#if !defined(GEOGRAPHICLIB_DMS_HPP) #if !defined(GEOGRAPHICLIB_DMS_HPP)
#define GEOGRAPHICLIB_DMS_HPP "$Id: 5b4f8ca628248d9f4ad044627eabe6f5918c0c2 d $" #define GEOGRAPHICLIB_DMS_HPP "$Id: 3d0c051c53cf51014788621dda01462bb08e2d8 c $"
#include <sstream> #include <sstream>
#include <iomanip> #include <iomanip>
#include <GeographicLib/Constants.hpp> #include <GeographicLib/Constants.hpp>
#if defined(_MSC_VER) #if defined(_MSC_VER)
// Squelch warnings about dll vs string // Squelch warnings about dll vs string
#pragma warning (push) #pragma warning (push)
#pragma warning (disable: 4251) #pragma warning (disable: 4251)
#endif #endif
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added


 EllipticFunction.hpp   EllipticFunction.hpp 
/** /**
* \file EllipticFunction.hpp * \file EllipticFunction.hpp
* \brief Header for GeographicLib::EllipticFunction class * \brief Header for GeographicLib::EllipticFunction class
* *
* Copyright (c) Charles Karney (2008, 2009, 2011) <charles@karney.com> * Copyright (c) Charles Karney (2008, 2009, 2011) <charles@karney.com>
* and licensed under the LGPL. For more information, see * and licensed under the MIT/X11 License. For more information, see
* http://geographiclib.sourceforge.net/ * http://geographiclib.sourceforge.net/
**********************************************************************/ **********************************************************************/
#if !defined(GEOGRAPHICLIB_ELLIPTICFUNCTION_HPP) #if !defined(GEOGRAPHICLIB_ELLIPTICFUNCTION_HPP)
#define GEOGRAPHICLIB_ELLIPTICFUNCTION_HPP "$Id: 8e5a2b0b4722672f75bb33acb8 233a78f00d8839 $" #define GEOGRAPHICLIB_ELLIPTICFUNCTION_HPP "$Id: d792b6c69cf47621f2fbee0285 4010cebba9feac $"
#include <GeographicLib/Constants.hpp> #include <GeographicLib/Constants.hpp>
namespace GeographicLib { namespace GeographicLib {
/** /**
* \brief Elliptic functions needed for TransverseMercatorExact * \brief Elliptic functions needed for TransverseMercatorExact
* *
* This provides the subset of elliptic functions needed for * This provides the subset of elliptic functions needed for
* TransverseMercatorExact. For a given ellipsoid, only parameters \e * TransverseMercatorExact. For a given ellipsoid, only parameters \e
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added


 GeoCoords.hpp   GeoCoords.hpp 
/** /**
* \file GeoCoords.hpp * \file GeoCoords.hpp
* \brief Header for GeographicLib::GeoCoords class * \brief Header for GeographicLib::GeoCoords class
* *
* Copyright (c) Charles Karney (2008, 2009, 2010, 2011) <charles@karney.co m> * Copyright (c) Charles Karney (2008, 2009, 2010, 2011) <charles@karney.co m>
* and licensed under the LGPL. For more information, see * and licensed under the MIT/X11 License. For more information, see
* http://geographiclib.sourceforge.net/ * http://geographiclib.sourceforge.net/
**********************************************************************/ **********************************************************************/
#ifndef GEOGRAPHICLIB_GEOCOORDS_HPP #ifndef GEOGRAPHICLIB_GEOCOORDS_HPP
#define GEOGRAPHICLIB_GEOCOORDS_HPP "$Id: 99a8aac8540818e46115bc98694955d14 6e53fef $" #define GEOGRAPHICLIB_GEOCOORDS_HPP "$Id: d7bac63e51ac0d5aeb4b27c87f7f5ebaf 8baa134 $"
#include <GeographicLib/UTMUPS.hpp> #include <GeographicLib/UTMUPS.hpp>
#include <GeographicLib/Constants.hpp> #include <GeographicLib/Constants.hpp>
namespace GeographicLib { namespace GeographicLib {
/** /**
* \brief Conversion between geographic coordinates * \brief Conversion between geographic coordinates
* *
* This class stores a geographic position which may be set via the * This class stores a geographic position which may be set via the
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added


 Geocentric.hpp   Geocentric.hpp 
/** /**
* \file Geocentric.hpp * \file Geocentric.hpp
* \brief Header for GeographicLib::Geocentric class * \brief Header for GeographicLib::Geocentric class
* *
* Copyright (c) Charles Karney (2008, 2009, 2010, 2011) <charles@karney.co m> * Copyright (c) Charles Karney (2008, 2009, 2010, 2011) <charles@karney.co m>
* and licensed under the LGPL. For more information, see * and licensed under the MIT/X11 License. For more information, see
* http://geographiclib.sourceforge.net/ * http://geographiclib.sourceforge.net/
**********************************************************************/ **********************************************************************/
#if !defined(GEOGRAPHICLIB_GEOCENTRIC_HPP) #if !defined(GEOGRAPHICLIB_GEOCENTRIC_HPP)
#define GEOGRAPHICLIB_GEOCENTRIC_HPP "$Id: 9a894a0d79bd444c60cfb3b4ecf4981c 1d3dd757 $" #define GEOGRAPHICLIB_GEOCENTRIC_HPP "$Id: 8f8b1d77b1719a8254cc7b3a7c148273 1f175b08 $"
#include <vector> #include <vector>
#include <algorithm> #include <algorithm>
#include <GeographicLib/Constants.hpp> #include <GeographicLib/Constants.hpp>
namespace GeographicLib { namespace GeographicLib {
/** /**
* \brief %Geocentric coordinates * \brief %Geocentric coordinates
* *
skipping to change at line 116 skipping to change at line 116
* *
* @param[in] lat latitude of point (degrees). * @param[in] lat latitude of point (degrees).
* @param[in] lon longitude of point (degrees). * @param[in] lon longitude of point (degrees).
* @param[in] h height of point above the ellipsoid (meters). * @param[in] h height of point above the ellipsoid (meters).
* @param[out] x geocentric coordinate (meters). * @param[out] x geocentric coordinate (meters).
* @param[out] y geocentric coordinate (meters). * @param[out] y geocentric coordinate (meters).
* @param[out] z geocentric coordinate (meters). * @param[out] z geocentric coordinate (meters).
* @param[out] M if the length of the vector is 9, fill with the rotati on * @param[out] M if the length of the vector is 9, fill with the rotati on
* matrix in row-major order. * matrix in row-major order.
* *
* Pre-multiplying a unit vector in local cartesian coordinates (east, * Let \e v be a unit vector located at (\e lat, \e lon, \e h). We can
* north, up) by \e M transforms the vector to geocentric coordinates. * express \e v as \e column vectors in one of two ways
* - in east, north, up coordinates (where the components are relative
to a
* local coordinate system at (\e lat, \e lon, \e h)); call this
* representation \e v1.
* - in geocentric \e x, \e y, \e z coordinates; call this representati
on
* \e v0.
* .
* Then we have \e v0 = \e M . \e v1.
********************************************************************** / ********************************************************************** /
void Forward(real lat, real lon, real h, real& x, real& y, real& z, void Forward(real lat, real lon, real h, real& x, real& y, real& z,
std::vector<real>& M) std::vector<real>& M)
const throw() { const throw() {
if (M.end() == M.begin() + dim2_) { if (M.end() == M.begin() + dim2_) {
real t[dim2_]; real t[dim2_];
IntForward(lat, lon, h, x, y, z, t); IntForward(lat, lon, h, x, y, z, t);
copy(t, t + dim2_, M.begin()); copy(t, t + dim2_, M.begin());
} else } else
IntForward(lat, lon, h, x, y, z, NULL); IntForward(lat, lon, h, x, y, z, NULL);
skipping to change at line 166 skipping to change at line 173
* *
* @param[in] x geocentric coordinate (meters). * @param[in] x geocentric coordinate (meters).
* @param[in] y geocentric coordinate (meters). * @param[in] y geocentric coordinate (meters).
* @param[in] z geocentric coordinate (meters). * @param[in] z geocentric coordinate (meters).
* @param[out] lat latitude of point (degrees). * @param[out] lat latitude of point (degrees).
* @param[out] lon longitude of point (degrees). * @param[out] lon longitude of point (degrees).
* @param[out] h height of point above the ellipsoid (meters). * @param[out] h height of point above the ellipsoid (meters).
* @param[out] M if the length of the vector is 9, fill with the rotati on * @param[out] M if the length of the vector is 9, fill with the rotati on
* matrix in row-major order. * matrix in row-major order.
* *
* Pre-multiplying a unit vector in geocentric coordinates by the trans * Let \e v be a unit vector located at (\e lat, \e lon, \e h). We can
pose * express \e v as \e column vectors in one of two ways
* of \e M transforms the vector to local cartesian coordinates (east, * - in east, north, up coordinates (where the components are relative
* north, up). to a
* local coordinate system at (\e lat, \e lon, \e h)); call this
* representation \e v1.
* - in geocentric \e x, \e y, \e z coordinates; call this representati
on
* \e v0.
* .
* Then we have \e v1 = \e M^T . \e v0, where \e M^T is the transpose o
f \e
* M.
********************************************************************** / ********************************************************************** /
void Reverse(real x, real y, real z, real& lat, real& lon, real& h, void Reverse(real x, real y, real z, real& lat, real& lon, real& h,
std::vector<real>& M) std::vector<real>& M)
const throw() { const throw() {
if (M.end() == M.begin() + dim2_) { if (M.end() == M.begin() + dim2_) {
real t[dim2_]; real t[dim2_];
IntReverse(x, y, z, lat, lon, h, t); IntReverse(x, y, z, lat, lon, h, t);
copy(t, t + dim2_, M.begin()); copy(t, t + dim2_, M.begin());
} else } else
IntReverse(x, y, z, lat, lon, h, NULL); IntReverse(x, y, z, lat, lon, h, NULL);
 End of changes. 4 change blocks. 
8 lines changed or deleted 26 lines changed or added


 Geodesic.hpp   Geodesic.hpp 
/** /**
* \file Geodesic.hpp * \file Geodesic.hpp
* \brief Header for GeographicLib::Geodesic class * \brief Header for GeographicLib::Geodesic class
* *
* Copyright (c) Charles Karney (2009, 2010, 2011) <charles@karney.com> * Copyright (c) Charles Karney (2009, 2010, 2011) <charles@karney.com>
* and licensed under the LGPL. For more information, see * and licensed under the MIT/X11 License. For more information, see
* http://geographiclib.sourceforge.net/ * http://geographiclib.sourceforge.net/
**********************************************************************/ **********************************************************************/
#if !defined(GEOGRAPHICLIB_GEODESIC_HPP) #if !defined(GEOGRAPHICLIB_GEODESIC_HPP)
#define GEOGRAPHICLIB_GEODESIC_HPP "$Id: d93e74a8d3eadc56d947c54b86978191f9 1bf758 $" #define GEOGRAPHICLIB_GEODESIC_HPP "$Id: 08483b14e89af4913976c07a8a2fb1770e a54454 $"
#include <GeographicLib/Constants.hpp> #include <GeographicLib/Constants.hpp>
#if !defined(GEOD_ORD) #if !defined(GEOD_ORD)
/** /**
* The order of the expansions used by Geodesic. * The order of the expansions used by Geodesic.
**********************************************************************/ **********************************************************************/
#define GEOD_ORD (GEOGRAPHICLIB_PREC == 1 ? 6 : GEOGRAPHICLIB_PREC == 0 ? 3 : 7) #define GEOD_ORD (GEOGRAPHICLIB_PREC == 1 ? 6 : GEOGRAPHICLIB_PREC == 0 ? 3 : 7)
#endif #endif
skipping to change at line 132 skipping to change at line 132
static const int nA2_ = GEOD_ORD; static const int nA2_ = GEOD_ORD;
static const int nC2_ = GEOD_ORD; static const int nC2_ = GEOD_ORD;
static const int nA3_ = GEOD_ORD; static const int nA3_ = GEOD_ORD;
static const int nA3x_ = nA3_; static const int nA3x_ = nA3_;
static const int nC3_ = GEOD_ORD; static const int nC3_ = GEOD_ORD;
static const int nC3x_ = (nC3_ * (nC3_ - 1)) / 2; static const int nC3x_ = (nC3_ * (nC3_ - 1)) / 2;
static const int nC4_ = GEOD_ORD; static const int nC4_ = GEOD_ORD;
static const int nC4x_ = (nC4_ * (nC4_ + 1)) / 2; static const int nC4x_ = (nC4_ * (nC4_ + 1)) / 2;
static const unsigned maxit_ = 50; static const unsigned maxit_ = 50;
void Lengths(real eps, real sig12, static const real tiny_;
real ssig1, real csig1, real ssig2, real csig2,
real cbet1, real cbet2,
real& s12s, real& m12a, real& m0,
bool scalep, real& M12, real& M21,
real tc[], real zc[]) const throw();
static real Astroid(real R, real z) throw();
real InverseStart(real sbet1, real cbet1, real sbet2, real cbet2,
real lam12,
real& salp1, real& calp1,
real& salp2, real& calp2,
real C1a[], real C2a[]) const throw();
real Lambda12(real sbet1, real cbet1, real sbet2, real cbet2,
real salp1, real calp1,
real& salp2, real& calp2, real& sig12,
real& ssig1, real& csig1, real& ssig2, real& csig2,
real& eps, real& domg12, bool diffp, real& dlam12,
real C1a[], real C2a[], real C3a[])
const throw();
static const real eps2_;
static const real tol0_; static const real tol0_;
static const real tol1_; static const real tol1_;
static const real tol2_; static const real tol2_;
static const real xthresh_; static const real xthresh_;
const real _a, _f, _r, _f1, _e2, _ep2, _n, _b, _c2, _etol2;
real _A3x[nA3x_], _C3x[nC3x_], _C4x[nC4x_]; enum captype {
CAP_NONE = 0U,
CAP_C1 = 1U<<0,
CAP_C1p = 1U<<1,
CAP_C2 = 1U<<2,
CAP_C3 = 1U<<3,
CAP_C4 = 1U<<4,
CAP_ALL = 0x1FU,
OUT_ALL = 0x7F80U,
};
static real SinCosSeries(bool sinp, static real SinCosSeries(bool sinp,
real sinx, real cosx, const real c[], int n) real sinx, real cosx, const real c[], int n)
throw(); throw();
static inline real AngNormalize(real x) throw() { static inline real AngNormalize(real x) throw() {
// Place angle in [-180, 180). Assumes x is in [-540, 540). // Place angle in [-180, 180). Assumes x is in [-540, 540).
return x >= 180 ? x - 360 : x < -180 ? x + 360 : x; return x >= 180 ? x - 360 : x < -180 ? x + 360 : x;
} }
static inline real AngRound(real x) throw() { static inline real AngRound(real x) throw() {
// The makes the smallest gap in x = 1/16 - nextafter(1/16, 0) = 1/2^ 57 // The makes the smallest gap in x = 1/16 - nextafter(1/16, 0) = 1/2^ 57
// for reals = 0.7 pm on the earth if x is an angle in degrees. (Thi s // for reals = 0.7 pm on the earth if x is an angle in degrees. (Thi s
skipping to change at line 183 skipping to change at line 173
volatile real y = std::abs(x); volatile real y = std::abs(x);
// The compiler mustn't "simplify" z - (z - y) to y // The compiler mustn't "simplify" z - (z - y) to y
y = y < z ? z - (z - y) : y; y = y < z ? z - (z - y) : y;
return x < 0 ? -y : y; return x < 0 ? -y : y;
} }
static inline void SinCosNorm(real& sinx, real& cosx) throw() { static inline void SinCosNorm(real& sinx, real& cosx) throw() {
real r = Math::hypot(sinx, cosx); real r = Math::hypot(sinx, cosx);
sinx /= r; sinx /= r;
cosx /= r; cosx /= r;
} }
static real Astroid(real x, real y) throw();
// _r is OBSOLETE, can be removed
const real _a, _f, _r, _f1, _e2, _ep2, _n, _b, _c2, _etol2;
real _A3x[nA3x_], _C3x[nC3x_], _C4x[nC4x_];
void Lengths(real eps, real sig12,
real ssig1, real csig1, real ssig2, real csig2,
real cbet1, real cbet2,
real& s12s, real& m12a, real& m0,
bool scalep, real& M12, real& M21,
real C1a[], real C2a[]) const throw();
real InverseStart(real sbet1, real cbet1, real sbet2, real cbet2,
real lam12,
real& salp1, real& calp1,
real& salp2, real& calp2,
real C1a[], real C2a[]) const throw();
real Lambda12(real sbet1, real cbet1, real sbet2, real cbet2,
real salp1, real calp1,
real& salp2, real& calp2, real& sig12,
real& ssig1, real& csig1, real& ssig2, real& csig2,
real& eps, real& domg12, bool diffp, real& dlam12,
real C1a[], real C2a[], real C3a[])
const throw();
// These are Maxima generated functions to provide series approximation s to // These are Maxima generated functions to provide series approximation s to
// the integrals for the ellipsoidal geodesic. // the integrals for the ellipsoidal geodesic.
static real A1m1f(real eps) throw(); static real A1m1f(real eps) throw();
static void C1f(real eps, real c[]) throw(); static void C1f(real eps, real c[]) throw();
static void C1pf(real eps, real c[]) throw(); static void C1pf(real eps, real c[]) throw();
static real A2m1f(real eps) throw(); static real A2m1f(real eps) throw();
static void C2f(real eps, real c[]) throw(); static void C2f(real eps, real c[]) throw();
void A3coeff() throw(); void A3coeff() throw();
real A3f(real eps) const throw(); real A3f(real eps) const throw();
void C3coeff() throw(); void C3coeff() throw();
void C3f(real eps, real c[]) const throw(); void C3f(real eps, real c[]) const throw();
void C4coeff() throw(); void C4coeff() throw();
void C4f(real k2, real c[]) const throw(); void C4f(real k2, real c[]) const throw();
enum captype {
CAP_NONE = 0U,
CAP_C1 = 1U<<0,
CAP_C1p = 1U<<1,
CAP_C2 = 1U<<2,
CAP_C3 = 1U<<3,
CAP_C4 = 1U<<4,
CAP_ALL = 0x1FU,
OUT_ALL = 0x7F80U,
};
public: public:
/** /**
* Bit masks for what calculations to do. These masks do double duty. * Bit masks for what calculations to do. These masks do double duty.
* They signify to the GeodesicLine::GeodesicLine constructor and to * They signify to the GeodesicLine::GeodesicLine constructor and to
* Geodesic::Line what capabilities should be included in the GeodesicL ine * Geodesic::Line what capabilities should be included in the GeodesicL ine
* object. They also specify which results to return in the general * object. They also specify which results to return in the general
* routines Geodesic::GenDirect and Geodesic::GenInverse routines. * routines Geodesic::GenDirect and Geodesic::GenInverse routines.
* GeodesicLine::mask is a duplication of this enum. * GeodesicLine::mask is a duplication of this enum.
********************************************************************** / ********************************************************************** /
skipping to change at line 595 skipping to change at line 601
* @param[out] M12 geodesic scale of point 2 relative to point 1 * @param[out] M12 geodesic scale of point 2 relative to point 1
* (dimensionless). * (dimensionless).
* @param[out] M21 geodesic scale of point 1 relative to point 2 * @param[out] M21 geodesic scale of point 1 relative to point 2
* (dimensionless). * (dimensionless).
* @param[out] S12 area under the geodesic (meters<sup>2</sup>). * @param[out] S12 area under the geodesic (meters<sup>2</sup>).
* @return \e a12 arc length of between point 1 and point 2 (degrees). * @return \e a12 arc length of between point 1 and point 2 (degrees).
* *
* If either point is at a pole, the azimuth is defined by keeping the * If either point is at a pole, the azimuth is defined by keeping the
* longitude fixed and writing \e lat = 90 - \e eps or -90 + \e eps and * longitude fixed and writing \e lat = 90 - \e eps or -90 + \e eps and
* taking the limit \e eps -> 0 from above. If the routine fails to * taking the limit \e eps -> 0 from above. If the routine fails to
* converge, then all the requested outputs are set to Math::NaN(). Th * converge, then all the requested outputs are set to Math::NaN(). (T
is est
* is not expected to happen with ellipsoidal models of the earth; plea * for such results with Math::isnan.) This is not expected to happen
se with
* report all cases where this occurs. * ellipsoidal models of the earth; please report all cases where this
* occurs.
* *
* The following functions are overloaded versions of Geodesic::Inverse * The following functions are overloaded versions of Geodesic::Inverse
* which omit some of the output parameters. Note, however, that the a rc * which omit some of the output parameters. Note, however, that the a rc
* length is always computed and returned as the function value. * length is always computed and returned as the function value.
********************************************************************** / ********************************************************************** /
Math::real Inverse(real lat1, real lon1, real lat2, real lon2, Math::real Inverse(real lat1, real lon1, real lat2, real lon2,
real& s12, real& azi1, real& azi2, real& m12, real& s12, real& azi1, real& azi2, real& m12,
real& M12, real& M21, real& S12) const throw() { real& M12, real& M21, real& S12) const throw() {
return GenInverse(lat1, lon1, lat2, lon2, return GenInverse(lat1, lon1, lat2, lon2,
DISTANCE | AZIMUTH | DISTANCE | AZIMUTH |
skipping to change at line 720 skipping to change at line 727
* - \e outmask |= Geodesic::AZIMUTH for the latitude \e azi2. * - \e outmask |= Geodesic::AZIMUTH for the latitude \e azi2.
* - \e outmask |= Geodesic::REDUCEDLENGTH for the reduced length \e * - \e outmask |= Geodesic::REDUCEDLENGTH for the reduced length \e
* m12. * m12.
* - \e outmask |= Geodesic::GEODESICSCALE for the geodesic scales \e * - \e outmask |= Geodesic::GEODESICSCALE for the geodesic scales \e
* M12 and \e M21. * M12 and \e M21.
* - \e outmask |= Geodesic::AREA for the area \e S12. * - \e outmask |= Geodesic::AREA for the area \e S12.
* . * .
* The arc length is always computed and returned as the function value . * The arc length is always computed and returned as the function value .
********************************************************************** / ********************************************************************** /
Math::real GenInverse(real lat1, real lon1, real lat2, real lon2, Math::real GenInverse(real lat1, real lon1, real lat2, real lon2,
unsigned outmask, unsigned outmask,
real& s12, real& azi1, real& azi2, real& s12, real& azi1, real& azi2,
real& m12, real& M12, real& M21, real& S12) real& m12, real& M12, real& M21, real& S12)
const throw(); const throw();
///@} ///@}
/** \name Interface to GeodesicLine. /** \name Interface to GeodesicLine.
********************************************************************** / ********************************************************************** /
///@{ ///@{
/** /**
* Set up to do a series of ranges. * Set up to do a series of ranges.
* *
 End of changes. 9 change blocks. 
43 lines changed or deleted 50 lines changed or added


 GeodesicLine.hpp   GeodesicLine.hpp 
/** /**
* \file GeodesicLine.hpp * \file GeodesicLine.hpp
* \brief Header for GeographicLib::GeodesicLine class * \brief Header for GeographicLib::GeodesicLine class
* *
* Copyright (c) Charles Karney (2009, 2010, 2011) <charles@karney.com> * Copyright (c) Charles Karney (2009, 2010, 2011) <charles@karney.com>
* and licensed under the LGPL. For more information, see * and licensed under the MIT/X11 License. For more information, see
* http://geographiclib.sourceforge.net/ * http://geographiclib.sourceforge.net/
**********************************************************************/ **********************************************************************/
#if !defined(GEOGRAPHICLIB_GEODESICLINE_HPP) #if !defined(GEOGRAPHICLIB_GEODESICLINE_HPP)
#define GEOGRAPHICLIB_GEODESICLINE_HPP "$Id: 7621f104dea2ed253fbcf6173ffc8f 2c23c3d67b $" #define GEOGRAPHICLIB_GEODESICLINE_HPP "$Id: 592ae103b61c941eff6b856e0b20fe 973e5656e1 $"
#include <GeographicLib/Constants.hpp> #include <GeographicLib/Constants.hpp>
#include <GeographicLib/Geodesic.hpp> #include <GeographicLib/Geodesic.hpp>
namespace GeographicLib { namespace GeographicLib {
/** /**
* \brief A geodesic line. * \brief A geodesic line.
* *
* GeodesicLine facilitates the determination of a series of points on a * GeodesicLine facilitates the determination of a series of points on a
skipping to change at line 95 skipping to change at line 95
static const int nC3_ = Geodesic::nC3_; static const int nC3_ = Geodesic::nC3_;
static const int nC4_ = Geodesic::nC4_; static const int nC4_ = Geodesic::nC4_;
real _lat1, _lon1, _azi1; real _lat1, _lon1, _azi1;
real _a, _f, _b, _c2, _f1, _salp0, _calp0, _k2, real _a, _f, _b, _c2, _f1, _salp0, _calp0, _k2,
_salp1, _calp1, _ssig1, _csig1, _stau1, _ctau1, _somg1, _comg1, _salp1, _calp1, _ssig1, _csig1, _stau1, _ctau1, _somg1, _comg1,
_A1m1, _A2m1, _A3c, _B11, _B21, _B31, _A4, _B41; _A1m1, _A2m1, _A3c, _B11, _B21, _B31, _A4, _B41;
// index zero elements of _C1a, _C1pa, _C2a, _C3a are unused // index zero elements of _C1a, _C1pa, _C2a, _C3a are unused
real _C1a[nC1_ + 1], _C1pa[nC1p_ + 1], _C2a[nC2_ + 1], _C3a[nC3_], real _C1a[nC1_ + 1], _C1pa[nC1p_ + 1], _C2a[nC2_ + 1], _C3a[nC3_],
_C4a[nC4_]; // all the elements of _C4a are used _C4a[nC4_]; // all the elements of _C4a are used
bool _areap; bool _areap; // _areap is OBSOLETE, can be removed
unsigned _caps; unsigned _caps;
enum captype { enum captype {
CAP_NONE = Geodesic::CAP_NONE, CAP_NONE = Geodesic::CAP_NONE,
CAP_C1 = Geodesic::CAP_C1, CAP_C1 = Geodesic::CAP_C1,
CAP_C1p = Geodesic::CAP_C1p, CAP_C1p = Geodesic::CAP_C1p,
CAP_C2 = Geodesic::CAP_C2, CAP_C2 = Geodesic::CAP_C2,
CAP_C3 = Geodesic::CAP_C3, CAP_C3 = Geodesic::CAP_C3,
CAP_C4 = Geodesic::CAP_C4, CAP_C4 = Geodesic::CAP_C4,
CAP_ALL = Geodesic::CAP_ALL, CAP_ALL = Geodesic::CAP_ALL,
skipping to change at line 535 skipping to change at line 535
///@{ ///@{
/** /**
* @return true if the object has been initialized. * @return true if the object has been initialized.
********************************************************************** / ********************************************************************** /
bool Init() const throw() { return _caps != 0U; } bool Init() const throw() { return _caps != 0U; }
/** /**
* @return \e lat1 the latitude of point 1 (degrees). * @return \e lat1 the latitude of point 1 (degrees).
********************************************************************** / ********************************************************************** /
Math::real Latitude() const throw() { return Init() ? _lat1 : Math::NaN Math::real Latitude() const throw()
(); } { return Init() ? _lat1 : Math::NaN<real>(); }
/** /**
* @return \e lon1 the longitude of point 1 (degrees). * @return \e lon1 the longitude of point 1 (degrees).
********************************************************************** / ********************************************************************** /
Math::real Longitude() const throw() Math::real Longitude() const throw()
{ return Init() ? _lon1 : Math::NaN(); } { return Init() ? _lon1 : Math::NaN<real>(); }
/** /**
* @return \e azi1 the azimuth (degrees) of the geodesic line at point 1. * @return \e azi1 the azimuth (degrees) of the geodesic line at point 1.
********************************************************************** / ********************************************************************** /
Math::real Azimuth() const throw() { return Init() ? _azi1 : Math::NaN( Math::real Azimuth() const throw()
); } { return Init() ? _azi1 : Math::NaN<real>(); }
/** /**
* @return \e azi0 the azimuth (degrees) of the geodesic line as it cro sses * @return \e azi0 the azimuth (degrees) of the geodesic line as it cro sses
* the equator in a northward direction. * the equator in a northward direction.
********************************************************************** / ********************************************************************** /
Math::real EquatorialAzimuth() const throw() { Math::real EquatorialAzimuth() const throw() {
return Init() ? return Init() ?
atan2(_salp0, _calp0) / Math::degree<real>() : Math::NaN(); atan2(_salp0, _calp0) / Math::degree<real>() : Math::NaN<real>();
} }
/** /**
* @return \e a1 the arc length (degrees) between the northward equator ial * @return \e a1 the arc length (degrees) between the northward equator ial
* crossing and point 1. * crossing and point 1.
********************************************************************** / ********************************************************************** /
Math::real EquatorialArc() const throw() { Math::real EquatorialArc() const throw() {
return Init() ? return Init() ?
atan2(_ssig1, _csig1) / Math::degree<real>() : Math::NaN(); atan2(_ssig1, _csig1) / Math::degree<real>() : Math::NaN<real>();
} }
/** /**
* @return \e a the equatorial radius of the ellipsoid (meters). This is * @return \e a the equatorial radius of the ellipsoid (meters). This is
* the value inherited from the Geodesic object used in the construct or. * the value inherited from the Geodesic object used in the construct or.
********************************************************************** / ********************************************************************** /
Math::real MajorRadius() const throw() { return Init() ? _a : Math::NaN Math::real MajorRadius() const throw()
(); } { return Init() ? _a : Math::NaN<real>(); }
/** /**
* @return \e f the flattening of the ellipsoid. This is the value * @return \e f the flattening of the ellipsoid. This is the value
* inherited from the Geodesic object used in the constructor. * inherited from the Geodesic object used in the constructor.
********************************************************************** / ********************************************************************** /
Math::real Flattening() const throw() { return Init() ? _f : Math::NaN( Math::real Flattening() const throw()
); } { return Init() ? _f : Math::NaN<real>(); }
/** /**
* <b>DEPRECATED</b> * <b>DEPRECATED</b>
* @return \e r the inverse flattening of the ellipsoid. * @return \e r the inverse flattening of the ellipsoid.
********************************************************************** / ********************************************************************** /
Math::real InverseFlattening() const throw() Math::real InverseFlattening() const throw()
{ return Init() ? 1/_f : Math::NaN(); } { return Init() ? 1/_f : Math::NaN<real>(); }
/** /**
* @return \e caps the computational capabilities that this object was * @return \e caps the computational capabilities that this object was
* constructed with. LATITUDE and AZIMUTH are always included. * constructed with. LATITUDE and AZIMUTH are always included.
********************************************************************** / ********************************************************************** /
unsigned Capabilities() const throw() { return _caps; } unsigned Capabilities() const throw() { return _caps; }
/** /**
* @param[in] testcaps a set of bitor'ed GeodesicLine::mask values. * @param[in] testcaps a set of bitor'ed GeodesicLine::mask values.
* @return true if the GeodesicLine object has all these capabilities. * @return true if the GeodesicLine object has all these capabilities.
 End of changes. 11 change blocks. 
15 lines changed or deleted 15 lines changed or added


 Geoid.hpp   Geoid.hpp 
/** /**
* \file Geoid.hpp * \file Geoid.hpp
* \brief Header for GeographicLib::Geoid class * \brief Header for GeographicLib::Geoid class
* *
* Copyright (c) Charles Karney (2009, 2010, 2011) <charles@karney.com> * Copyright (c) Charles Karney (2009, 2010, 2011) <charles@karney.com>
* and licensed under the LGPL. For more information, see * and licensed under the MIT/X11 License. For more information, see
* http://geographiclib.sourceforge.net/ * http://geographiclib.sourceforge.net/
**********************************************************************/ **********************************************************************/
#if !defined(GEOGRAPHICLIB_GEOID_HPP) #if !defined(GEOGRAPHICLIB_GEOID_HPP)
#define GEOGRAPHICLIB_GEOID_HPP "$Id: 64e08f1d43515d6da898e5255319d701dde75 00c $" #define GEOGRAPHICLIB_GEOID_HPP "$Id: c7fbce09c004d4ffcce66d6d59c7163f2c581 948 $"
#include <string> #include <string>
#include <vector> #include <vector>
#include <fstream> #include <fstream>
#include <GeographicLib/Constants.hpp> #include <GeographicLib/Constants.hpp>
#if defined(_MSC_VER) #if defined(_MSC_VER)
// Squelch warnings about dll vs vector // Squelch warnings about dll vs vector
#pragma warning (push) #pragma warning (push)
#pragma warning (disable: 4251) #pragma warning (disable: 4251)
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added


 Gnomonic.hpp   Gnomonic.hpp 
/** /**
* \file Gnomonic.hpp * \file Gnomonic.hpp
* \brief Header for GeographicLib::Gnomonic class * \brief Header for GeographicLib::Gnomonic class
* *
* Copyright (c) Charles Karney (2010, 2011) <charles@karney.com> and licen sed * Copyright (c) Charles Karney (2010, 2011) <charles@karney.com> and licen sed
* under the LGPL. For more information, see * under the MIT/X11 License. For more information, see
* http://geographiclib.sourceforge.net/ * http://geographiclib.sourceforge.net/
**********************************************************************/ **********************************************************************/
#if !defined(GEOGRAPHICLIB_GNOMONIC_HPP) #if !defined(GEOGRAPHICLIB_GNOMONIC_HPP)
#define GEOGRAPHICLIB_GNOMONIC_HPP "$Id: dfab3affb3ed4ae149ff2fdf04c4e30503 126308 $" #define GEOGRAPHICLIB_GNOMONIC_HPP "$Id: 8a8a791b2f8ace09e181271d0988615a3f e28ef0 $"
#include <GeographicLib/Geodesic.hpp> #include <GeographicLib/Geodesic.hpp>
#include <GeographicLib/GeodesicLine.hpp> #include <GeographicLib/GeodesicLine.hpp>
#include <GeographicLib/Constants.hpp> #include <GeographicLib/Constants.hpp>
namespace GeographicLib { namespace GeographicLib {
/** /**
* \brief %Gnomonic Projection. * \brief %Gnomonic Projection.
* *
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added


 LambertConformalConic.hpp   LambertConformalConic.hpp 
/** /**
* \file LambertConformalConic.hpp * \file LambertConformalConic.hpp
* \brief Header for GeographicLib::LambertConformalConic class * \brief Header for GeographicLib::LambertConformalConic class
* *
* Copyright (c) Charles Karney (2010, 2011) <charles@karney.com> and licen sed * Copyright (c) Charles Karney (2010, 2011) <charles@karney.com> and licen sed
* under the LGPL. For more information, see * under the MIT/X11 License. For more information, see
* http://geographiclib.sourceforge.net/ * http://geographiclib.sourceforge.net/
**********************************************************************/ **********************************************************************/
#if !defined(GEOGRAPHICLIB_LAMBERTCONFORMALCONIC_HPP) #if !defined(GEOGRAPHICLIB_LAMBERTCONFORMALCONIC_HPP)
#define GEOGRAPHICLIB_LAMBERTCONFORMALCONIC_HPP "$Id: 36261b322b57fd7a06c53 868842661888a202041 $" #define GEOGRAPHICLIB_LAMBERTCONFORMALCONIC_HPP "$Id: b2f2b9bc4827fa14f7c09 0daebd1a5429b32791a $"
#include <algorithm> #include <algorithm>
#include <GeographicLib/Constants.hpp> #include <GeographicLib/Constants.hpp>
namespace GeographicLib { namespace GeographicLib {
/** /**
* \brief Lambert Conformal Conic Projection * \brief Lambert Conformal Conic Projection
* *
* Implementation taken from the report, * Implementation taken from the report,
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added


 LocalCartesian.hpp   LocalCartesian.hpp 
/** /**
* \file LocalCartesian.hpp * \file LocalCartesian.hpp
* \brief Header for GeographicLib::LocalCartesian class * \brief Header for GeographicLib::LocalCartesian class
* *
* Copyright (c) Charles Karney (2008, 2009, 2010, 2011) <charles@karney.co m> * Copyright (c) Charles Karney (2008, 2009, 2010, 2011) <charles@karney.co m>
* and licensed under the LGPL. For more information, see * and licensed under the MIT/X11 License. For more information, see
* http://geographiclib.sourceforge.net/ * http://geographiclib.sourceforge.net/
**********************************************************************/ **********************************************************************/
#if !defined(GEOGRAPHICLIB_LOCALCARTESIAN_HPP) #if !defined(GEOGRAPHICLIB_LOCALCARTESIAN_HPP)
#define GEOGRAPHICLIB_LOCALCARTESIAN_HPP "$Id: 1f16fc06cd148ecb87836a52fad1 2dc36a69a52b $" #define GEOGRAPHICLIB_LOCALCARTESIAN_HPP "$Id: 7ec9e1a810dc0eb527d0e20c69df 60ac1a2ba499 $"
#include <GeographicLib/Geocentric.hpp> #include <GeographicLib/Geocentric.hpp>
#include <GeographicLib/Constants.hpp> #include <GeographicLib/Constants.hpp>
namespace GeographicLib { namespace GeographicLib {
/** /**
* \brief Local Cartesian coordinates * \brief Local Cartesian coordinates
* *
* Convert between geodetic coordinates latitude = \e lat, longitude = \e * Convert between geodetic coordinates latitude = \e lat, longitude = \e
skipping to change at line 115 skipping to change at line 115
* *
* @param[in] lat latitude of point (degrees). * @param[in] lat latitude of point (degrees).
* @param[in] lon longitude of point (degrees). * @param[in] lon longitude of point (degrees).
* @param[in] h height of point above the ellipsoid (meters). * @param[in] h height of point above the ellipsoid (meters).
* @param[out] x local cartesian coordinate (meters). * @param[out] x local cartesian coordinate (meters).
* @param[out] y local cartesian coordinate (meters). * @param[out] y local cartesian coordinate (meters).
* @param[out] z local cartesian coordinate (meters). * @param[out] z local cartesian coordinate (meters).
* @param[out] M if the length of the vector is 9, fill with the rotati on * @param[out] M if the length of the vector is 9, fill with the rotati on
* matrix in row-major order. * matrix in row-major order.
* *
* Pre-multiplying a unit vector in local cartesian coordinates at (lat * Let \e v be a unit vector located at (\e lat, \e lon, \e h). We can
, * express \e v as \e column vectors in one of two ways
* lon, h) by \e M transforms the vector to local cartesian coordinates * - in east, north, up coordinates (where the components are relative
at to a
* (lat0, lon0, h0). * local coordinate system at (\e lat, \e lon, \e h)); call this
* representation \e v1.
* - in \e x, \e y, \e z coordinates (where the components are relative
to
* the local coordinate system at (\e lat0, \e lon0, \e h0)); call th
is
* representation \e v0.
* .
* Then we have \e v0 = \e M . \e v1.
********************************************************************** / ********************************************************************** /
void Forward(real lat, real lon, real h, real& x, real& y, real& z, void Forward(real lat, real lon, real h, real& x, real& y, real& z,
std::vector<real>& M) std::vector<real>& M)
const throw() { const throw() {
if (M.end() == M.begin() + dim2_) { if (M.end() == M.begin() + dim2_) {
real t[dim2_]; real t[dim2_];
IntForward(lat, lon, h, x, y, z, t); IntForward(lat, lon, h, x, y, z, t);
copy(t, t + dim2_, M.begin()); copy(t, t + dim2_, M.begin());
} else } else
IntForward(lat, lon, h, x, y, z, NULL); IntForward(lat, lon, h, x, y, z, NULL);
skipping to change at line 160 skipping to change at line 167
* *
* @param[in] x local cartesian coordinate (meters). * @param[in] x local cartesian coordinate (meters).
* @param[in] y local cartesian coordinate (meters). * @param[in] y local cartesian coordinate (meters).
* @param[in] z local cartesian coordinate (meters). * @param[in] z local cartesian coordinate (meters).
* @param[out] lat latitude of point (degrees). * @param[out] lat latitude of point (degrees).
* @param[out] lon longitude of point (degrees). * @param[out] lon longitude of point (degrees).
* @param[out] h height of point above the ellipsoid (meters). * @param[out] h height of point above the ellipsoid (meters).
* @param[out] M if the length of the vector is 9, fill with the rotati on * @param[out] M if the length of the vector is 9, fill with the rotati on
* matrix in row-major order. * matrix in row-major order.
* *
* Pre-multiplying a unit vector in local cartesian coordinates at (lat * Let \e v be a unit vector located at (\e lat, \e lon, \e h). We can
0, * express \e v as \e column vectors in one of two ways
* lon0, h0) by the transpose of \e M transforms the vector to local * - in east, north, up coordinates (where the components are relative
* cartesian coordinates at (lat, lon, h). to a
* local coordinate system at (\e lat, \e lon, \e h)); call this
* representation \e v1.
* - in \e x, \e y, \e z coordinates (where the components are relative
to
* the local coordinate system at (\e lat0, \e lon0, \e h0)); call th
is
* representation \e v0.
* .
* Then we have \e v1 = \e M^T . \e v0, where \e M^T is the transpose o
f \e
* M.
********************************************************************** / ********************************************************************** /
void Reverse(real x, real y, real z, real& lat, real& lon, real& h, void Reverse(real x, real y, real z, real& lat, real& lon, real& h,
std::vector<real>& M) std::vector<real>& M)
const throw() { const throw() {
if (M.end() == M.begin() + dim2_) { if (M.end() == M.begin() + dim2_) {
real t[dim2_]; real t[dim2_];
IntReverse(x, y, z, lat, lon, h, t); IntReverse(x, y, z, lat, lon, h, t);
copy(t, t + dim2_, M.begin()); copy(t, t + dim2_, M.begin());
} else } else
IntReverse(x, y, z, lat, lon, h, NULL); IntReverse(x, y, z, lat, lon, h, NULL);
 End of changes. 4 change blocks. 
11 lines changed or deleted 30 lines changed or added


 MGRS.hpp   MGRS.hpp 
/** /**
* \file MGRS.hpp * \file MGRS.hpp
* \brief Header for GeographicLib::MGRS class * \brief Header for GeographicLib::MGRS class
* *
* Copyright (c) Charles Karney (2008, 2009, 2010, 2011) <charles@karney.co m> * Copyright (c) Charles Karney (2008, 2009, 2010, 2011) <charles@karney.co m>
* and licensed under the LGPL. For more information, see * and licensed under the MIT/X11 License. For more information, see
* http://geographiclib.sourceforge.net/ * http://geographiclib.sourceforge.net/
**********************************************************************/ **********************************************************************/
#if !defined(GEOGRAPHICLIB_MGRS_HPP) #if !defined(GEOGRAPHICLIB_MGRS_HPP)
#define GEOGRAPHICLIB_MGRS_HPP "$Id: e69a6ec0376f85352407c6c889b6de31aab2f2 d3 $" #define GEOGRAPHICLIB_MGRS_HPP "$Id: ec89e8a2c1c4a41fb7c08b0a9fd287116516f6 a5 $"
#include <sstream> #include <sstream>
#include <GeographicLib/Constants.hpp> #include <GeographicLib/Constants.hpp>
#include <GeographicLib/UTMUPS.hpp> #include <GeographicLib/UTMUPS.hpp>
#if defined(_MSC_VER) #if defined(_MSC_VER)
// Squelch warnings about dll vs string // Squelch warnings about dll vs string
#pragma warning (push) #pragma warning (push)
#pragma warning (disable: 4251) #pragma warning (disable: 4251)
#endif #endif
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added


 OSGB.hpp   OSGB.hpp 
/** /**
* \file OSGB.hpp * \file OSGB.hpp
* \brief Header for GeographicLib::OSGB class * \brief Header for GeographicLib::OSGB class
* *
* Copyright (c) Charles Karney (2010, 2011) <charles@karney.com> and licen sed * Copyright (c) Charles Karney (2010, 2011) <charles@karney.com> and licen sed
* under the LGPL. For more information, see * under the MIT/X11 License. For more information, see
* http://geographiclib.sourceforge.net/ * http://geographiclib.sourceforge.net/
**********************************************************************/ **********************************************************************/
#if !defined(GEOGRAPHICLIB_OSGB_HPP) #if !defined(GEOGRAPHICLIB_OSGB_HPP)
#define GEOGRAPHICLIB_OSGB_HPP "$Id: 42b12900bf7035d62562ca4d97ea930e69db8c af $" #define GEOGRAPHICLIB_OSGB_HPP "$Id: 5460ecf2cc63586e97d0f4b1217816ef03fa2c bf $"
#include <string> #include <string>
#include <sstream> #include <sstream>
#include <GeographicLib/Constants.hpp> #include <GeographicLib/Constants.hpp>
#include <GeographicLib/TransverseMercator.hpp> #include <GeographicLib/TransverseMercator.hpp>
#if defined(_MSC_VER) #if defined(_MSC_VER)
// Squelch warnings about dll vs string // Squelch warnings about dll vs string
#pragma warning (push) #pragma warning (push)
#pragma warning (disable: 4251) #pragma warning (disable: 4251)
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added


 PolarStereographic.hpp   PolarStereographic.hpp 
/** /**
* \file PolarStereographic.hpp * \file PolarStereographic.hpp
* \brief Header for GeographicLib::PolarStereographic class * \brief Header for GeographicLib::PolarStereographic class
* *
* Copyright (c) Charles Karney (2008, 2009, 2010, 2011) <charles@karney.co m> * Copyright (c) Charles Karney (2008, 2009, 2010, 2011) <charles@karney.co m>
* and licensed under the LGPL. For more information, see * and licensed under the MIT/X11 License. For more information, see
* http://geographiclib.sourceforge.net/ * http://geographiclib.sourceforge.net/
**********************************************************************/ **********************************************************************/
#if !defined(GEOGRAPHICLIB_POLARSTEREOGRAPHIC_HPP) #if !defined(GEOGRAPHICLIB_POLARSTEREOGRAPHIC_HPP)
#define GEOGRAPHICLIB_POLARSTEREOGRAPHIC_HPP "$Id: d87b9c7de659fb35a42845b6 3ae1e5b8239db032 $" #define GEOGRAPHICLIB_POLARSTEREOGRAPHIC_HPP "$Id: 461ca662af89d37e5276ab02 9e7c6959d5bbdd74 $"
#include <GeographicLib/Constants.hpp> #include <GeographicLib/Constants.hpp>
namespace GeographicLib { namespace GeographicLib {
/** /**
* \brief Polar Stereographic Projection * \brief Polar Stereographic Projection
* *
* Implementation taken from the report, * Implementation taken from the report,
* - J. P. Snyder, * - J. P. Snyder,
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added


 TransverseMercator.hpp   TransverseMercator.hpp 
/** /**
* \file TransverseMercator.hpp * \file TransverseMercator.hpp
* \brief Header for GeographicLib::TransverseMercator class * \brief Header for GeographicLib::TransverseMercator class
* *
* Copyright (c) Charles Karney (2008, 2009, 2010, 2011) <charles@karney.co m> * Copyright (c) Charles Karney (2008, 2009, 2010, 2011) <charles@karney.co m>
* and licensed under the LGPL. For more information, see * and licensed under the MIT/X11 License. For more information, see
* http://geographiclib.sourceforge.net/ * http://geographiclib.sourceforge.net/
**********************************************************************/ **********************************************************************/
#if !defined(GEOGRAPHICLIB_TRANSVERSEMERCATOR_HPP) #if !defined(GEOGRAPHICLIB_TRANSVERSEMERCATOR_HPP)
#define GEOGRAPHICLIB_TRANSVERSEMERCATOR_HPP "$Id: ceb368923a049a1e5fddfb83 6983974ad315b13e $" #define GEOGRAPHICLIB_TRANSVERSEMERCATOR_HPP "$Id: e72f3f875456c5cd776e697a bcb0cdfeca8a7e72 $"
#include <GeographicLib/Constants.hpp> #include <GeographicLib/Constants.hpp>
#if !defined(TM_TX_MAXPOW) #if !defined(TM_TX_MAXPOW)
/** /**
* The order of the series approximation used in TransverseMercator. * The order of the series approximation used in TransverseMercator.
* TM_TX_MAXPOW can be set to any integer in [4, 8]. * TM_TX_MAXPOW can be set to any integer in [4, 8].
**********************************************************************/ **********************************************************************/
#define TM_TX_MAXPOW \ #define TM_TX_MAXPOW \
(GEOGRAPHICLIB_PREC == 1 ? 6 : GEOGRAPHICLIB_PREC == 0 ? 4 : 8) (GEOGRAPHICLIB_PREC == 1 ? 6 : GEOGRAPHICLIB_PREC == 0 ? 4 : 8)
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added


 TransverseMercatorExact.hpp   TransverseMercatorExact.hpp 
/** /**
* \file TransverseMercatorExact.hpp * \file TransverseMercatorExact.hpp
* \brief Header for GeographicLib::TransverseMercatorExact class * \brief Header for GeographicLib::TransverseMercatorExact class
* *
* Copyright (c) Charles Karney (2008, 2009, 2010, 2011) <charles@karney.co m> * Copyright (c) Charles Karney (2008, 2009, 2010, 2011) <charles@karney.co m>
* and licensed under the LGPL. For more information, see * and licensed under the MIT/X11 License. For more information, see
* http://geographiclib.sourceforge.net/ * http://geographiclib.sourceforge.net/
**********************************************************************/ **********************************************************************/
#if !defined(GEOGRAPHICLIB_TRANSVERSEMERCATOREXACT_HPP) #if !defined(GEOGRAPHICLIB_TRANSVERSEMERCATOREXACT_HPP)
#define GEOGRAPHICLIB_TRANSVERSEMERCATOREXACT_HPP "$Id: 0dd60506e65ce6eebf1 fe0a38dc9d58840535e74 $" #define GEOGRAPHICLIB_TRANSVERSEMERCATOREXACT_HPP "$Id: 73f66e3f4714382bfde 874d68feccb2c71a2b8af $"
#include <GeographicLib/Constants.hpp> #include <GeographicLib/Constants.hpp>
#include <GeographicLib/EllipticFunction.hpp> #include <GeographicLib/EllipticFunction.hpp>
namespace GeographicLib { namespace GeographicLib {
/** /**
* \brief An exact implementation of the Transverse Mercator Projection * \brief An exact implementation of the Transverse Mercator Projection
* *
* Implementation of the Transverse Mercator Projection given in * Implementation of the Transverse Mercator Projection given in
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added


 UTMUPS.hpp   UTMUPS.hpp 
/** /**
* \file UTMUPS.hpp * \file UTMUPS.hpp
* \brief Header for GeographicLib::UTMUPS class * \brief Header for GeographicLib::UTMUPS class
* *
* Copyright (c) Charles Karney (2008, 2009, 2010, 2011) <charles@karney.co m> * Copyright (c) Charles Karney (2008, 2009, 2010, 2011) <charles@karney.co m>
* and licensed under the LGPL. For more information, see * and licensed under the MIT/X11 License. For more information, see
* http://geographiclib.sourceforge.net/ * http://geographiclib.sourceforge.net/
**********************************************************************/ **********************************************************************/
#if !defined(GEOGRAPHICLIB_UTMUPS_HPP) #if !defined(GEOGRAPHICLIB_UTMUPS_HPP)
#define GEOGRAPHICLIB_UTMUPS_HPP "$Id: d860994613fb8833812d850ab154d98aa4c8 83b6 $" #define GEOGRAPHICLIB_UTMUPS_HPP "$Id: 3f219712008c744df44a62261bbc79683767 6872 $"
#include <sstream> #include <sstream>
#include <GeographicLib/Constants.hpp> #include <GeographicLib/Constants.hpp>
namespace GeographicLib { namespace GeographicLib {
/** /**
* \brief Convert between Geographic coordinates and UTM/UPS * \brief Convert between Geographic coordinates and UTM/UPS
* *
* UTM and UPS are defined * UTM and UPS are defined
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/