[geographiclib] 01/08: Imported Upstream version 1.41

Sebastiaan Couwenberg sebastic at moszumanska.debian.org
Fri Mar 13 17:35:51 UTC 2015


This is an automated email from the git hooks/post-receive script.

sebastic pushed a commit to branch master
in repository geographiclib.

commit 4d3b2f3fcef71652b3e4fb98bddd67e4b6ec0513
Author: Bas Couwenberg <sebastic at xs4all.nl>
Date:   Fri Mar 13 17:44:54 2015 +0100

    Imported Upstream version 1.41
---
 CMakeLists.txt                                     |   6 +-
 NEWS                                               |  20 +-
 configure                                          |  22 +-
 configure.ac                                       |   4 +-
 doc/GeographicLib.dox.in                           | 457 ++++++++++++++-------
 examples/JacobiConformal.cpp                       |   7 +-
 examples/JacobiConformal.hpp                       | 133 +++---
 examples/Makefile.am                               |   1 +
 examples/Makefile.in                               |   1 +
 include/GeographicLib/Config.h                     |   4 +-
 include/GeographicLib/Constants.hpp                |   6 +-
 include/GeographicLib/OSGB.hpp                     |   9 +-
 include/GeographicLib/Rhumb.hpp                    |  10 +-
 .../java/net/sf/geographiclib/Accumulator.java     |   2 +-
 .../main/java/net/sf/geographiclib/Geodesic.java   |   2 +-
 legacy/C/direct.c                                  |   2 +-
 legacy/C/inverse.c                                 |   2 +-
 legacy/C/planimeter.c                              |   2 +-
 man/CartConvert.1                                  |   4 +-
 man/CartConvert.usage                              |   2 +-
 man/ConicProj.1                                    |   4 +-
 man/ConicProj.usage                                |   2 +-
 man/GeoConvert.1                                   |   4 +-
 man/GeoConvert.usage                               |   2 +-
 man/GeodSolve.1                                    |   4 +-
 man/GeodSolve.usage                                |   2 +-
 man/GeodesicProj.1                                 |   4 +-
 man/GeodesicProj.usage                             |   2 +-
 man/GeoidEval.1                                    |   4 +-
 man/GeoidEval.usage                                |   2 +-
 man/Gravity.1                                      |   4 +-
 man/Gravity.usage                                  |   2 +-
 man/MagneticField.1                                |   4 +-
 man/MagneticField.usage                            |   2 +-
 man/Planimeter.1                                   |  16 +-
 man/Planimeter.1.html                              |   6 +-
 man/Planimeter.pod                                 |  12 +-
 man/Planimeter.usage                               |  13 +-
 man/RhumbSolve.1                                   |   4 +-
 man/RhumbSolve.usage                               |   2 +-
 man/TransverseMercatorProj.1                       |   4 +-
 man/TransverseMercatorProj.usage                   |   2 +-
 pom.xml                                            |   2 +-
 src/CMakeLists.txt                                 |   7 +-
 src/GeographicLib.pro                              |   2 +-
 src/Rhumb.cpp                                      |   2 +-
 src/TransverseMercator.cpp                         |  18 +-
 tools/CMakeLists.txt                               |   7 +
 tools/geographiclib-get-magnetic.sh                |  10 +-
 49 files changed, 545 insertions(+), 300 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 0b7eb73..1d19ca6 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -2,7 +2,7 @@ project (GeographicLib)
 
 # Version information
 set (PROJECT_VERSION_MAJOR 1)
-set (PROJECT_VERSION_MINOR 40)
+set (PROJECT_VERSION_MINOR 41)
 set (PROJECT_VERSION_PATCH 0)
 set (PROJECT_VERSION "${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}")
 if (PROJECT_VERSION_PATCH GREATER 0)
@@ -42,8 +42,8 @@ endif ()
 
 # The library version tracks the numbering given by libtool in the
 # autoconf set up.
-set (LIBVERSION 14)
-set (LIBVERSIONFULL 14.0.1)
+set (LIBVERSION_API 14)
+set (LIBVERSION_BUILD 14.0.2)
 string (TOLOWER ${PROJECT_NAME} PROJECT_NAME_LOWER)
 string (TOUPPER ${PROJECT_NAME} PROJECT_NAME_UPPER)
 
diff --git a/NEWS b/NEWS
index 177bd9b..40764ce 100644
--- a/NEWS
+++ b/NEWS
@@ -4,7 +4,20 @@ For more information, see
 
     http://geographiclib.sourceforge.net/
 
-The current version of the library is 1.40.
+The current version of the library is 1.41.
+
+Changes between 1.41 (released 2015-03-09) and 1.40 versions:
+
+  * Fix bug in Rhumb::Inverse (with exact = true) and related functions
+    which causes the wrong distance to be reported if one of the end
+    points is at a pole.  Thanks to Thomas Murray for reporting this.
+
+  * Add International Geomagnetic Reference Field (12th generation),
+    which approximates the main magnetic field of the earth for the
+    period 1900-2020.
+
+  * Split information about Jacobi's conformal projection to a separate
+    section and include more material.
 
 Changes between 1.40 (released 2014-12-18) and 1.39 versions:
 
@@ -444,7 +457,10 @@ Changes between 1.25 (released 2012-10-16) and 1.24 versions:
     + cmake uses folders in Visual Studio to reduce clutter;
     + allow precision of reals to be set in cmake;
     + fail gracefully in the absence of pod documentation tools;
-    + remove support for maintainer tasks in Makefile.mk.
+    + remove support for maintainer tasks in Makefile.mk;
+    + upgrade to automake 1.11.6 to fix the "make distcheck" security
+      vulnerability; see
+      http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2012-3386
 
 Changes between 1.24 (released 2012-09-22) and 1.23 versions:
 
diff --git a/configure b/configure
index 1f7b7eb..1db0215 100755
--- a/configure
+++ b/configure
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for GeographicLib 1.40.
+# Generated by GNU Autoconf 2.69 for GeographicLib 1.41.
 #
 # Report bugs to <charles at karney.com>.
 #
@@ -590,8 +590,8 @@ MAKEFLAGS=
 # Identity of this package.
 PACKAGE_NAME='GeographicLib'
 PACKAGE_TARNAME='geographiclib'
-PACKAGE_VERSION='1.40'
-PACKAGE_STRING='GeographicLib 1.40'
+PACKAGE_VERSION='1.41'
+PACKAGE_STRING='GeographicLib 1.41'
 PACKAGE_BUGREPORT='charles at karney.com'
 PACKAGE_URL=''
 
@@ -1343,7 +1343,7 @@ if test "$ac_init_help" = "long"; then
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures GeographicLib 1.40 to adapt to many kinds of systems.
+\`configure' configures GeographicLib 1.41 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1414,7 +1414,7 @@ fi
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of GeographicLib 1.40:";;
+     short | recursive ) echo "Configuration of GeographicLib 1.41:";;
    esac
   cat <<\_ACEOF
 
@@ -1525,7 +1525,7 @@ fi
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-GeographicLib configure 1.40
+GeographicLib configure 1.41
 generated by GNU Autoconf 2.69
 
 Copyright (C) 2012 Free Software Foundation, Inc.
@@ -1966,7 +1966,7 @@ cat >config.log <<_ACEOF
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by GeographicLib $as_me 1.40, which was
+It was created by GeographicLib $as_me 1.41, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   $ $0 $@
@@ -2943,7 +2943,7 @@ fi
 
 # Define the identity of the package.
  PACKAGE='geographiclib'
- VERSION='1.40'
+ VERSION='1.41'
 
 
 cat >>confdefs.h <<_ACEOF
@@ -3045,7 +3045,7 @@ ac_config_headers="$ac_config_headers include/GeographicLib/Config-ac.h"
 
 
 LT_CURRENT=14
-LT_REVISION=1
+LT_REVISION=2
 LT_AGE=0
 
 
@@ -16243,7 +16243,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by GeographicLib $as_me 1.40, which was
+This file was extended by GeographicLib $as_me 1.41, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -16309,7 +16309,7 @@ _ACEOF
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
 ac_cs_version="\\
-GeographicLib config.status 1.40
+GeographicLib config.status 1.41
 configured by $0, generated by GNU Autoconf 2.69,
   with options \\"\$ac_cs_config\\"
 
diff --git a/configure.ac b/configure.ac
index ed387c8..8c9baa4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,7 +1,7 @@
 dnl
 dnl Copyright (C) 2009, Francesco P. Lovergine <frankie at debian.org>
 
-AC_INIT([GeographicLib],[1.40],[charles at karney.com])
+AC_INIT([GeographicLib],[1.41],[charles at karney.com])
 AC_CANONICAL_SYSTEM
 AC_PREREQ(2.61)
 AC_CONFIG_SRCDIR(src/Geodesic.cpp)
@@ -35,7 +35,7 @@ dnl Interfaces changed/added/removed:   CURRENT++ REVISION=0
 dnl Interfaces added:                   AGE++
 dnl Interfaces removed:                 AGE=0
 LT_CURRENT=14
-LT_REVISION=1
+LT_REVISION=2
 LT_AGE=0
 AC_SUBST(LT_CURRENT)
 AC_SUBST(LT_REVISION)
diff --git a/doc/GeographicLib.dox.in b/doc/GeographicLib.dox.in
index 3b9e6b3..fb4cd33 100644
--- a/doc/GeographicLib.dox.in
+++ b/doc/GeographicLib.dox.in
@@ -12,7 +12,7 @@ namespace GeographicLib {
 \mainpage GeographicLib library
 \author Charles F. F. Karney (charles at karney.com)
 \version @PROJECT_VERSION@
-\date 2014-12-18
+\date 2015-03-09
 
 \section abstract Abstract
 
@@ -22,7 +22,7 @@ MGRS, geocentric, and local cartesian coordinates, for gravity (e.g.,
 EGM2008), geoid height and geomagnetic field (e.g., WMM2015)
 calculations, and for solving geodesic problems.  The emphasis is on
 returning accurate results with errors close to round-off (about 5--15
-nanometers).  New accurate algorithms for \ref geodesic and \ref
+nanometers).  Accurate algorithms for \ref geodesic and \ref
 transversemercator have been developed for this library.  The
 functionality of the library can be accessed from user code, from the
 \ref utilities provided, or via the \ref other.  Also included is a .NET
@@ -76,6 +76,7 @@ For more information, see http://geographiclib.sourceforge.net/.
  - \ref magnetic
  - \ref geodesic
  - \ref triaxial
+ - \ref jacobi
  - \ref rhumb
  - \ref greatellipse
  - \ref transversemercator
@@ -2576,6 +2577,10 @@ The supported models are
    <a href="http://ngdc.noaa.gov/IAGA/vmod/igrf.html">International
    Geomagnetic Reference Field (11th generation)</a>, which approximates
    the main magnetic field for the period 1900--2015.
+ - <b>igrf12</b>, the
+   <a href="http://ngdc.noaa.gov/IAGA/vmod/igrf.html">International
+   Geomagnetic Reference Field (12th generation)</a>, which approximates
+   the main magnetic field for the period 1900--2020.
  - <b>emm2010</b>, the
    <a href="http://ngdc.noaa.gov/geomag/EMM/index.html"> Enhanced
    Magnetic Model 2010</a>, which approximates the main and crustal
@@ -2643,6 +2648,20 @@ These magnetic models are available for download:
  <a href="https://sf.net/projects/geographiclib/files/magnetic-distrib/igrf11.zip">
  link</a> (8)</center>
 <tr>
+ <td>igrf12
+ <td><center>13</center>
+ <td><center>1900--2020</center>
+ <td><center>26</center>
+ <td><center>
+ <a href="https://sf.net/projects/geographiclib/files/magnetic-distrib/igrf12.tar.bz2">
+ link</a> (7)</center>
+ <td><center>
+ <a href="https://sf.net/projects/geographiclib/files/magnetic-distrib/igrf12.exe">
+ link</a> (310)</center>
+ <td><center>
+ <a href="https://sf.net/projects/geographiclib/files/magnetic-distrib/igrf12.zip">
+ link</a> (8)</center>
+<tr>
  <td>emm2010
  <td><center>739</center>
  <td><center>2010--2015</center>
@@ -2665,7 +2684,7 @@ geographiclib-get-magnetic (typically installed in /usr/local/sbin)
 which automates the process of downloading and installing the magnetic
 models.  For example
 \verbatim
-   geographiclib-get-magnetic all  # install wmm2010, wmm2015, igrf11, emm2010
+   geographiclib-get-magnetic all  # install wmm2010, wmm2015, igrf11, igrf12, emm2010
    geographiclib-get-magnetic -h   # for help
 \endverbatim
 This script should be run as a user with write access to the
@@ -2734,9 +2753,9 @@ keywords
      meters.
    - <b>NumModels</b> (default 1), the number of models.  WMM2015
      consists of a single model giving the magnetic field and its time
-     variation at 2015.  IGRF11 consists of 23 models for 1900 thru 2010
+     variation at 2015.  IGRF12 consists of 24 models for 1900 thru 2015
      at 5 year intervals.  The time variation is given only for the last
-     model to allow extrapolation beyond 2010.  For dates prior to 2010,
+     model to allow extrapolation beyond 2015.  For dates prior to 2015,
      linear interpolation is used.
    - <b>Epoch</b> (required), the time origin (in fractional years) for
      the first model.
@@ -2900,7 +2919,7 @@ References:
    Aeronautical Chart and Information Center (St. Louis, 1964),
    Chaps. 5--7.
  - J. Danielsen,
-   The Area under the Geodesic,
+   The area under the geodesic,
    Survey Review 30(232), 61--66 (1989).
    DOI: <a href="https://dx.doi.org/10.1179/003962689791474267">
    10.1179/003962689791474267</a>
@@ -3052,7 +3071,7 @@ In the expansions below, we have
  - \f$ c^2 = a^2/2 + b^2/2 (\tanh^{-1}e)/e \f$
  - \e ep2 = \f$ e'^2 \f$
  - \e k2 = \f$ k^2 \f$
- - \e eps = \f$ \epsilon \f$
+ - \e eps = \f$ \epsilon = k^2 / (\sqrt{1 + k^2} + 1)^2\f$
 
 The formula for distance is
 \f[
@@ -3813,7 +3832,7 @@ Back to \ref magnetic.  Forward to \ref triaxial.  Up to \ref contents.
 \page triaxial Geodesics on a triaxial ellipsoid
 
 <center>
-Back to \ref geodesic.  Forward to \ref rhumb.  Up to \ref contents.
+Back to \ref geodesic.  Forward to \ref jacobi.  Up to \ref contents.
 </center>
 
 Jacobi (1839) showed that the problem of geodesics on a triaxial
@@ -3834,7 +3853,6 @@ Go to
  - \ref triaxial-survey
  - \ref triaxial-stab
  - \ref triaxial-inverse
- - \ref triaxial-conformal
 
 <b>NOTES</b>
  -# A triaxial ellipsoid approximates the earth only slightly better
@@ -4384,179 +4402,321 @@ The shortest path found by this method is unique unless:
 
 \section triaxial-conformal Jacobi's conformal projection
 
-In Vorlesungen über Dynamik, §28, Jacobi gives the following
-conformal mapping of the triaxial ellipsoid onto a plane
+This material is now on its own page; see \ref jacobi.
+
+<center>
+Back to \ref geodesic.  Forward to \ref jacobi.  Up to \ref contents.
+</center>
+**********************************************************************/
+/**
+\page jacobi Jacobi's conformal projection
+
+<center>
+Back to \ref triaxial.  Forward to \ref rhumb.  Up to
+\ref contents.
+</center>
+
+In addition to solving the geodesic problem for the triaxial ellipsoid,
+Jacobi (1839) briefly mentions the problem of the conformal projection
+of ellipsoid.  He covers this in greater detail in <i>Vorlesungen
+über Dynamik</i>, §28, which is now available in an
+<a href="https://www.worldcat.org/oclc/440645889">
+English translation: Lectures on Dynamics</a>
+(<a href="http://geographiclib.sf.net/jacobi-errata.html">
+errata</a>).
+
+\section jacobi-conformal Conformal projection
+
+It is convenient to rotate Jacobi's ellipsoidal coordinate system so
+that \f$(X,Y,Z)\f$ are respectively the middle, large, and small axes of
+the ellipsoid.  The longitude \f$\omega\f$ is shifted so that
+\f$(\beta=0,\omega=0)\f$ is the point \f$(b,0,0)\f$.  The coordinates
+are thus defined by
+\f[
+\begin{align}
+  X &= b \cos\beta \cos\omega, \\
+  Y &= a \sin\omega
+      \frac{\sqrt{a^2 - b^2\sin^2\beta - c^2\cos^2\beta}}
+           {\sqrt{a^2 - c^2}}, \\
+  Z &= c \sin\beta
+      \frac{\sqrt{a^2\cos^2\omega + b^2\sin^2\omega - c^2}}
+           {\sqrt{a^2 - c^2}}.
+\end{align}
+\f]
+After this change, the large principal ellipse is the equator,
+\f$\beta=0\f$, while the small principal ellipse is the prime meridian,
+\f$\omega=0\f$.  The four umbilic points, \f$\left|\omega\right| =
+\left|\beta\right| = \frac12\pi\f$, lie on middle principal ellipse in
+the plane \f$X=0\f$.
+
+Jacobi gives the following conformal mapping of the triaxial ellipsoid
+onto a plane
 \f[
 \begin{align}
-x &= 2 \int \frac
-{\sqrt{a^2 \sin^2\omega + b^2 \cos^2\omega}}
-{\sqrt{a^2 \sin^2\omega + b^2 \cos^2\omega - c^2}}\, d\omega, \\
-y &= 2 \int \frac
+x &= \frac{\sqrt{a^2-c^2}}b  \int \frac
+{\sqrt{a^2 \cos^2\omega + b^2 \sin^2\omega}}
+{\sqrt{a^2 \cos^2\omega + b^2 \sin^2\omega - c^2}}\, d\omega, \\
+y &= \frac{\sqrt{a^2-c^2}}b \int \frac
 {\sqrt{b^2 \sin^2\beta + c^2 \cos^2\beta}}
 {\sqrt{a^2 - b^2 \sin^2\beta - c^2 \cos^2\beta}}\, d\beta.
 \end{align}
 \f]
 The scale of the projection is
 \f[
-k = \frac2
-{\sqrt{a^2 \sin^2\omega + b^2 (\cos^2\omega-\sin^2\beta) - c^2 \cos^2\beta}}.
+k = \frac{\sqrt{a^2-c^2}}
+{b\sqrt{a^2 \cos^2\omega + b^2 (\sin^2\omega-\sin^2\beta) - c^2 \cos^2\beta}}.
 \f]
+I have scaled the Jacobi's projection by a constant factor,
+\f[
+\frac{\sqrt{a^2-c^2}}{2b},
+\f]
+so that it reduces to the familiar formulas in the case of an oblate ellipsoid.
+
+\section jacobi-elliptic The projection in terms of elliptic integrals
+
+The projection may be expressed in terms of elliptic integrals,
+\f[
+\begin{align}
+x&=(1+e_a^2)\,\Pi(\omega',-e_a^2, \cos\nu),\\
+y&=(1-e_c^2)\,\Pi(\beta' , e_c^2, \sin\nu),\\
+k&=\frac{\sqrt{e_a^2+e_c^2}}{b\sqrt{e_a^2\cos^2\omega+e_c^2\cos^2\beta}},
+\end{align}
+\f]
+where
+\f[
+\begin{align}
+e_a &= \frac{\sqrt{a^2-b^2}}b, \qquad
+e_c = \frac{\sqrt{b^2-c^2}}b, \\
+\tan\omega' &= \frac ba \tan\omega = \frac 1{\sqrt{1+e_a^2}} \tan\omega, \\
+\tan\beta' &= \frac bc \tan\beta = \frac 1{\sqrt{1-e_c^2}} \tan\beta, \\
+\tan\nu &= \frac ac \frac{\sqrt{b^2-c^2}}{\sqrt{a^2-b^2}}
+=\frac{e_c}{e_a}\frac{\sqrt{1+e_a^2}}{\sqrt{1-e_c^2}},
+\end{align}
+\f]
+\f$\nu\f$ is the geographic latitude of the umbilic point at \f$\beta =
+\omega = \frac12\pi\f$ (the angle a normal at the umbilic point makes
+with the equatorial plane), and \f$\Pi(\phi,\alpha^2,k)\f$ is the
+elliptic integral of the third kind, http://dlmf.nist.gov/19.2.E7.  This
+allows the projection to be numerically computed using
+EllipticFunction::Pi(real phi) const.
+
 Nyrtsov, et al.,
  - M. V. Nyrtsov, M. E. Flies, M. M. Borisov, P. J. Stooke,
    <a href="https://dx.doi.org/10.1007/978-3-642-32618-9_17">
    Jacobi conformal projection of the triaxial ellipsoid: new projection
    for mapping of small celestial bodies,</a> in
-   <i>Cartography from Pole to Pole</i>,
-   selected contributions to the 26th international conference of the ICA,
-   Dresden 2013,
-   edited by M. Buchroithner, N. Prechtel, and D. Burghardt
+   <i>Cartography from Pole to Pole</i>
    (Springer, 2014), pp. 235--246.
  .
-express the projection in terms of elliptic integrals,
+also expressed the projection in terms of elliptic integrals.
+However, their expressions don't allow the limits of ellipsoids of
+revolution to be readily recovered.  The relations
+http://dlmf.nist.gov/19.7.E5 can be used to put their results in the
+form given here.
+
+\section jacobi-properties Properties of the projection
+
+\f$x\f$ (resp. \f$y\f$) depends on \f$\omega\f$ (resp. \f$\beta\f$)
+alone, so that latitude-longitude grid maps to straight lines in the
+projection.  In this sense, the Jacobi projection is the natural
+generalization of the Mercator projection for the triaxial ellipsoid.
+(See below for the limit \f$a\rightarrow b\f$, which makes this
+connection explicit.)
+
+In the general case (all the axes are different), the scale diverges
+only at the umbilic points.  The behavior of these singularities is
+illustrated by the complex function
+\f[
+f(z;e) = \cosh^{-1}(z/e) - \log(2/e).
+\f]
+For \f$e > 0\f$, this function has two square root singularities at
+\f$\pm e\f$, corresponding to the two northern umbilic points.
+Plotting contours of its real (resp. imaginary) part gives the
+behavior of the lines of constant latitude (resp. longitude) near the
+north pole in Fig. 1.  If we pass to the limit \f$e\rightarrow 0\f$,
+then \f$ f(z;e)\rightarrow\log z\f$, and the two branch points merge
+yielding a stronger (logarithmic) singularity at \f$z = 0\f$,
+concentric circles of latitude, and radial lines of longitude.
+
+Again in the general case, the extents of \f$x\f$ and \f$y\f$ are
+finite,
 \f[
 \begin{align}
-x&=\frac{2b}{\sqrt{a^2-c^2}}
-G\biggl(\omega',\frac{a^2-b^2}{a^2-c^2},
-        \frac cb\frac{\sqrt{a^2-b^2}}{\sqrt{a^2-c^2}}\biggr),\\
-y&=\frac{2c}{\sqrt{a^2-b^2}}
-G\biggl(\beta',-\frac{b^2-c^2}{a^2-b^2},
-        i\frac ac\frac{\sqrt{b^2-c^2}}{\sqrt{a^2-b^2}}\biggr),
+x\bigl(\tfrac12\pi\bigr) &=(1+e_a^2)\,\Pi(-e_a^2, \cos\nu),\\
+y\bigl(\tfrac12\pi\bigr) &=(1-e_c^2)\,\Pi(e_c^2, \sin\nu),
 \end{align}
 \f]
-where
+where \f$\Pi(\alpha^2,k)\f$ is the complete elliptic integral of the
+third kind, http://dlmf.nist.gov/19.2.E8.
+
+In particular, if we substitute values appropriate for the earth,
 \f[
 \begin{align}
-\tan\omega' &= \frac{\sqrt{a^2-c^2}}{\sqrt{b^2-c^2}} \tan\omega, \\
-\tan\beta' &= \frac{\sqrt{a^2-b^2}}{\sqrt{a^2-c^2}} \tan\beta,
+a&=(6378137+35)\,\mathrm m,\\
+b&=(6378137-35)\,\mathrm m,\\
+c&=6356752\,\mathrm m,\\
 \end{align}
 \f]
-and
+we have
 \f[
 \begin{align}
- G(\phi,\alpha^2,k) &= \int_0^\phi
- \frac{\sqrt{1 - k^2\sin^2\theta}}{1 - \alpha^2\sin^2\theta}\,d\theta\\
- &=\frac{k^2}{\alpha^2}F(\phi, k)
- +\biggl(1-\frac{k^2}{\alpha^2}\biggr)\Pi(\phi, \alpha^2, k)
+x\bigl({\textstyle\frac12}\pi\bigr) &= 1.5720928 = \hphantom{0}90.07428^\circ,\\
+y\bigl({\textstyle\frac12}\pi\bigr) &= 4.2465810 = 243.31117^\circ.\\
+\end{align}
+\f]
+
+The projection may be inverted (to give \f$\omega\f$ in terms of \f$x\f$
+and \f$\beta\f$ in terms of \f$y\f$) by using Newton's method to find
+the root of, for example, \f$x(\omega) - x_0 = 0\f$.  The derivative of
+the elliptic integral is, of course, just given by its defining
+relation.
+
+If rhumb lines are defined as curves with a constant bearing relative
+to the ellipsoid coordinates, then these are straight lines in the
+Jacobi projection.  A rhumb line which passes over an umbilic point
+immediately retraces its path.  A rhumb line which crosses the line
+joining the two northerly umbilic points starts traveling south with
+a reversed heading (e.g., a NE heading becomes a SW heading).  This
+behavior is preserved in the limit \f$a\rightarrow b\f$ (although the
+longitude becomes indeterminate in this limit).
+
+\section jacobi-limiting Limiting cases
+
+<b>Oblate ellipsoid</b>, \f$a\rightarrow b\f$.  The coordinate system
+is
+\f[
+\begin{align}
+  X &= b \cos\beta \cos\omega, \\
+  Y &= b \cos\beta \sin\omega, \\
+  Z &= c \sin\beta.
 \end{align}
 \f]
-is the combination of elliptic integrals of the first and third kinds
-that appears in the integral, given by Legendre (1811), for the
-longitude of a geodesic on an ellipsoid of revolution.
-The function \f$ G(\phi,\alpha^2,k) \f$ is provided by the
-EllipticFunction class.  The expression for \f$ x \f$ is essentially the
-same at that given by Nyrtsov, et al.; I have put their expression for
-\f$ y \f$ into a somewhat simpler form using an imaginary modulus.
-
-Using http://dlmf.nist.gov/19.7.E9 the projection may also be written
-as
+Thus \f$\beta\f$ (resp. \f$\beta'\f$) is the parametric
+(resp. geographic) latitude and \f$\omega=\omega'\f$ is the longitude;
+the quantity \f$e_c\f$ is the eccentricity of the ellipsoid.
+Using http://dlmf.nist.gov/19.6.E12 and http://dlmf.nist.gov/19.2.E19
+the projection reduces to the normal Mercator projection for an oblate
+ellipsoid,
 \f[
 \begin{align}
-x &= \frac{2a^2}{b{\sqrt{a^2-c^2}}}
-\Pi\biggl(\omega', -\frac{a^2-b^2}{b^2},
-          \frac cb\frac{\sqrt{a^2-b^2}}{\sqrt{a^2-c^2}}\biggr) \\
-&\quad{}-2\tan^{-1}\biggl(\frac{(a^2-b^2) \sin\omega' \cos\omega'}
-{\sqrt{a^2(b^2-c^2)\sin^2\omega' + b^2(a^2-c^2)\cos^2\omega'}}\biggr),\\
-y &= \frac{2b^2}{c\sqrt{a^2-b^2}}
-\Pi\biggl(\beta',-\frac{b^2-c^2}{c^2},
-          i\frac ac\frac{\sqrt{b^2-c^2}}{\sqrt{a^2-b^2}}\biggr) \\
-&\quad{}-2\sinh^{-1}\biggl(\frac{(b^2-c^2)\sin\beta \cos\beta}
-{\sqrt{b^2(a^2-b^2)\sin^2\beta + c^2(a^2-c^2)\cos^2\beta}}\biggr).
+x &= \omega,\\
+y &= \sinh^{-1}\tan\beta'
+- e_c \tanh^{-1}(e_c\sin\beta'),\\
+k &= \frac1{b\cos\beta}.
 \end{align}
 \f]
-In the case of a nearly spherical ellipsoid, the parameter of the
-elliptic integral (its second argument) is small.
-
-Notes:
- - \f$x\f$ (resp. \f$y\f$) depends on \f$\omega\f$ (resp. \f$\beta\f$)
-   alone, so that latitude-longitude grid maps to straight lines in the
-   projection.  In this sense, the Jacobi projection is the natural
-   generalization of the Mercator projection for the triaxial ellipsoid.
-   Indeed, in the limit \f$b\rightarrow a\f$, it reduces to the normal
-   Mercator projection for an oblate ellipsoid (apart from an overall
-   scale),
-   \f[
-   \begin{align}
-   x &= \frac{2a}{\sqrt{a^2 - c^2}} \omega,\\
-   y &= \frac{2a}{\sqrt{a^2 - c^2}} \int \frac
-   {\sqrt{a^2 \sin^2\beta + c^2 \cos^2\beta}}{a\cos\beta}\, d\beta\\
-   &= \frac{2a}{\sqrt{a^2 - c^2}} \sinh^{-1}\biggl(\frac ac \tan\beta\biggr) -
-   2\sinh^{-1}\biggl(\frac{\sqrt{a^2-c^2}}c\sin\beta\biggr),\\
-   k &= \frac{2a}{\sqrt{a^2 - c^2}}\frac1{a\cos\beta};
-   \end{align}
-   \f]
-   recall that \f$\beta\f$ is the parametric latitude in this limit.
- - In the general case (all the axes are different), the scale diverges
-   only at the umbilic points, \f$\sin\omega = \cos\beta = 0\f$.  The
-   behavior of these singularities is illustrated by the complex
-   function
-   \f[
-   f(z;e) = \cosh^{-1}(z/e) - \log(2/e).
-   \f]
-   For \f$e > 0\f$, this function has two square root singularities at
-   \f$\pm e\f$, corresponding to the two northern umbilic points.
-   Plotting contours of its real (resp. imaginary) part gives the
-   behavior of the lines of constant latitude (resp. longitude) near the
-   north pole in Fig. 1.  If we pass to the limit \f$e\rightarrow 0\f$,
-   then \f$ f(z;e)\rightarrow\log z\f$, and the two branch points merge
-   yielding a stronger (logarithmic) singularity at \f$z = 0\f$,
-   concentric circles of latitude, and radial lines of longitude.
- - Again in the general case, the extents of \f$x\f$ and \f$y\f$ are
-   finite (given by the complete elliptic integral of the third kind),
-   \f[
-   \begin{align}
-   x\bigl({\textstyle\frac12}\pi\bigr) &= \frac{2a^2}{b{\sqrt{a^2-c^2}}}
-   \Pi\biggl(-\frac{a^2-b^2}{b^2},
-   \frac cb\frac{\sqrt{a^2-b^2}}{\sqrt{a^2-c^2}}\biggr),\\
-   y\bigl({\textstyle\frac12}\pi\bigr) &= \frac{2b^2}{c\sqrt{a^2-b^2}}
-   \Pi\biggl(-\frac{b^2-c^2}{c^2},
-   i\frac ac\frac{\sqrt{b^2-c^2}}{\sqrt{a^2-b^2}}\biggr).
-   \end{align}
-   \f]
- - In particular, if we substitute values appropriate for the earth,
-   \f[
-   \begin{align}
-   a&=(6378137+35)\,\mathrm m,\\
-   b&=(6378137-35)\,\mathrm m,\\
-   c&=6356752\,\mathrm m,\\
-   \end{align}
-   \f]
-   we have
-   \f[
-   \begin{align}
-   x\bigl({\textstyle\frac12}\pi\bigr) &= 38.396508 = 1.0000005\,q,\\
-   y\bigl({\textstyle\frac12}\pi\bigr) &= 103.717719 = 2.7012293\,q,\\
-   \end{align}
-   \f]
-   where
-   \f[
-   q = \pi \frac{\sqrt{a^2+b^2}}{\sqrt{a^2+b^2-2c^2}}.
-   \f]
- - The projection may be inverted (to give \f$\omega\f$ in terms of
-   \f$x\f$ and \f$\beta\f$ in terms of \f$y\f$) by using Newton's
-   method to find the root of, for example, \f$x(\omega) - x_0 = 0\f$.
-   The derivative \f$ dx(\omega)/d\omega \f$ is, of course, twice the
-   integrand in the first expression for \f$x\f$.
- - If rhumb lines are defined as curves with a constant bearing relative
-   to the ellipsoid coordinates, then these are straight lines in the
-   Jacobi projection.  A rhumb line which passes over an umbilic point
-   immediately retraces its path.  A rhumb line which crosses the line
-   joining the two northerly umbilic points starts traveling south with
-   a reversed heading (e.g., a NE heading becomes a SW heading).  This
-   behavior is preserved in the limit \f$b\rightarrow a\f$ (although the
-   longitude becomes indeterminate in this limit).
+
+<b>Prolate ellipsoid</b>, \f$c\rightarrow b\f$. The coordinate system
+is
+\f[
+\begin{align}
+  X &= b \cos\omega \cos\beta, \\
+  Y &= a \sin\omega, \\
+  Z &= b \cos\omega \sin\beta.
+\end{align}
+\f]
+Thus \f$\omega\f$ (resp. \f$\omega'\f$) now plays the role of the
+parametric (resp. geographic) latitude and while \f$\beta=\beta'\f$ is
+the longitude.  Using http://dlmf.nist.gov/19.6.E12
+http://dlmf.nist.gov/19.2.E19 and http://dlmf.nist.gov/19.2.E18 the
+projection reduces to similar expressions with the roles of \f$\beta\f$
+and \f$\omega\f$ switched,
+\f[
+\begin{align}
+x &= \sinh^{-1}\tan\omega'
++ e_a
+  \tan^{-1}(e_a\sin\omega'),\\
+y &= \beta,\\
+k &= \frac1{b\cos\omega}.
+\end{align}
+\f]
+
+<b>Sphere</b>, \f$a\rightarrow b\f$ and \f$c\rightarrow b\f$.  This is a
+non-uniform limit depending on the parameter \f$\nu\f$,
+\f[
+\begin{align}
+  X &= b \cos\omega \cos\beta, \\
+  Y &= b \sin\omega \sqrt{1 - \sin^2\nu\sin^2\beta}, \\
+  Z &= b \sin\beta \sqrt{1 - \cos^2\nu\sin^2\omega}.
+\end{align}
+\f]
+Using http://dlmf.nist.gov/19.6.E13 the projection can be put in terms
+of the elliptic integral of the first kind, http://dlmf.nist.gov/19.2.E4
+\f[
+\begin{align}
+x &= F(\omega, \cos\nu), \\
+y &= F(\beta, \sin\nu), \\
+k &= \frac1{b \sqrt{\cos^2\nu\cos^2\omega + \sin^2\nu\cos^2\beta}},
+\end{align}
+\f]
+Obtaining the limit of a sphere via an oblate (resp. prolate) ellipsoid
+corresponds to setting \f$\nu = \frac12\pi\f$ (resp. \f$\nu
+=0\f$).  In these limits, the elliptic integral reduces to elementary
+functions http://dlmf.nist.gov/19.6.E7 and http://dlmf.nist.gov/19.6.E8
+\f[
+\begin{align}
+F(\phi, 0) &= \phi, \\
+F(\phi, 1) &= \mathop{\mathrm{gd}}\nolimits^{-1}\phi = \sinh^{-1}\tan\phi.
+\end{align}
+\f]
+The spherical limit gives the projection found by É. Guyou in
+ - <a href="https://books.google.com/books?id=saBDAQAAIAAJ&pg=PA308">
+   Sur un nouveau système de projection de la sphère</a>,
+   Comptes Rendus 102(6), 308--310 (1886).
+ - <a href="https://books.google.com/books?id=VjU8AQAAMAAJ&pg=PA16">
+   Nouveau système de projection de la sphère: généralisation de la
+   projection de Mercator</a>,
+   Annales Hydrographiques (2nd series) 9, 16--35 (1887).
+ .
+who apparently derived it without realizing that it is just a special
+case of the projection Jacobi had given some 40 years earlier.  Guyou's
+name is usually associated with the particular choice,
+\f$\nu=\frac14\pi\f$, in which case the hemisphere
+\f$\left|\omega\right|\le\frac12\pi\f$ is mapped into a square.
+However, by varying \f$\nu\in[0,\frac12\pi]\f$ the hemisphere can be
+mapped into a rectangle with any aspect ratio, \f$K(\cos\nu) :
+K(\sin\nu)\f$, where \f$K(k)\f$ is the complete elliptic integral of
+the first find, http://dlmf.nist.gov/19.2.E8.
+
+\section jacobi-sphere Conformal mapping of an ellipsoid to a sphere
+
+An essential tool in deriving conformal projections of an ellipsoid of
+revolution is the conformal mapping of the ellipsoid onto a sphere.
+This allows conformal projections of the sphere to be generalized to the
+case of an ellipsoid of revolution.  This conformal mapping is obtained
+by using the ellipsoidal Mercator projection to map the ellipsoid to
+the plane and then using the spherical Mercator projection to map the
+plane onto the sphere.
+
+A similar construction is possible for a triaxial ellipsoid.  Map each
+octant of the ellipsoid onto a rectangle using the Jacobi projection.
+The aspect ratio of this rectangle is
+\f[
+(1+e_a^2)\,\Pi(-e_a^2, \cos\nu) :
+(1-e_c^2)\,\Pi( e_c^2, \sin\nu).
+\f]
+Find the value of \f$\nu'\f$ such that this ratio equals
+\f[
+K(\cos\nu') : K(\sin\nu').
+\f]
+Map the rectangle onto the equivalent octant of the sphere using Guyou's
+projection with parameter \f$\nu = \nu'\f$.  This reduces to the
+standard construction in the limit of an ellipsoid of revolution.
+
+\section jacobi-implementation An implementation of the projection
 
 An implementation of the Jacobi conformal projection is given here
 \include JacobiConformal.hpp
 
 <center>
-Back to \ref geodesic.  Forward to \ref rhumb.  Up to \ref contents.
+Back to \ref triaxial.  Forward to \ref rhumb.  Up to \ref contents.
 </center>
 **********************************************************************/
 /**
 \page rhumb Rhumb lines
 
 <center>
-Back to \ref triaxial.  Forward to \ref greatellipse.  Up to
+Back to \ref jacobi.  Forward to \ref greatellipse.  Up to
 \ref contents.
 </center>
 
@@ -5144,7 +5304,7 @@ unchanged.  The result for the sum is
 \f]
 
 <center>
-Back to \ref triaxial.  Forward to \ref greatellipse.  Up to
+Back to \ref jacobi.  Forward to \ref greatellipse.  Up to
 \ref contents.
 </center>
 **********************************************************************/
@@ -6848,6 +7008,18 @@ of the
 <a href="https://sourceforge.net/p/geographiclib/code/ci/release/tree/">
 git repository for GeographicLib</a>.
 
+ - <a href="http://geographiclib.sf.net/1.41">Version 1.41</a>
+   (released 2015-03-09)
+   - Fix bug in Rhumb::Inverse (with \e exact = true) and related
+     functions which causes the wrong distance to be reported if one of
+     the end points is at a pole.  Thanks to Thomas Murray for reporting
+     this.
+   - Add International Geomagnetic Reference Field (12th generation),
+     which approximates the main magnetic field of the earth for the
+     period 1900--2020.
+   - Split information about \ref jacobi to a separate section and
+     include more material.
+
  - <a href="http://geographiclib.sf.net/1.40">Version 1.40</a>
    (released 2014-12-18)
    - Add the World Magnetic Model 2015, wmm2015.  This is now the
@@ -7250,7 +7422,10 @@ git repository for GeographicLib</a>.
      - cmake uses folders in Visual Studio to reduce clutter;
      - allow precision of reals to be set in cmake;
      - fail gracefully in the absence of pod documentation tools;
-     - remove support for maintainer tasks in Makefile.mk.
+     - remove support for maintainer tasks in Makefile.mk;
+     - upgrade to automake 1.11.6 to fix the "make distcheck" security
+       vulnerability; see
+       http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2012-3386
 
  - <a href="http://geographiclib.sf.net/1.24">Version 1.24</a>
    (released 2012-09-22)
diff --git a/examples/JacobiConformal.cpp b/examples/JacobiConformal.cpp
index 6a60f55..37bf20b 100644
--- a/examples/JacobiConformal.cpp
+++ b/examples/JacobiConformal.cpp
@@ -9,16 +9,15 @@ using namespace GeographicLib;
 int main() {
   Utility::set_digits();
   Math::real a = 6378137+35, b = 6378137-35, c = 6356752;
-  JacobiConformal jc(a, b, c);
+  JacobiConformal jc(a, b, c, a-b, b-c);
   cout  << fixed << setprecision(1)
         << "Ellipsoid parameters: a = "
         << a << ", b = " << b << ", c = " << c << "\n"
         << setprecision(10)
         << "Quadrants: x = " << jc.x() << ", y = " << jc.y() << "\n";
-  Math::real f = 90 / jc.x();
-  cout << "Scaled coordinates (angle x y):\n";
+  cout << "Coordinates (angle x y) in degrees:\n";
   for (int i = 0; i <= 90; i += 5) {
     Math::real omg = i, bet = i;
-    cout << i << " " << jc.x(omg)*f << " " << jc.y(bet)*f << "\n";
+    cout << i << " " << jc.x(omg) << " " << jc.y(bet) << "\n";
   }
 }
diff --git a/examples/JacobiConformal.hpp b/examples/JacobiConformal.hpp
index 01ff124..86f93d7 100644
--- a/examples/JacobiConformal.hpp
+++ b/examples/JacobiConformal.hpp
@@ -1,8 +1,8 @@
 /**
  * \file JacobiConformal.hpp
- * \brief A class for Jacobi's conformal projection of a triaxial ellipsoid.
+ * \brief Jacobi's conformal projection of a triaxial ellipsoid.
  *
- * Copyright (c) Charles Karney (2014) <charles at karney.com> and licensed
+ * Copyright (c) Charles Karney (2014-2015) <charles at karney.com> and licensed
  * under the MIT/X11 License.  For more information, see
  * http://geographiclib.sourceforge.net/
  **********************************************************************/
@@ -10,21 +10,25 @@
 #include <GeographicLib/EllipticFunction.hpp>
 
 namespace GeographicLib {
-
   /**
    * \brief Jacobi's conformal projection
    *
-   * This is a conformal projection of the ellipsoid to a plane in which the
-   * grid lines are straight; see Jacobi, Vorlesungen ueber Dynamik, Sect. 28.
-   * The constructor takes the semi-axes of the ellipsoid (which must be
-   * scalene).  Member functions map the ellipsoidal coordinates ω and
-   * β separately to \e x and \e y.
+   * This is a conformal projection of the ellipsoid to a plane in which
+   * the grid lines are straight; see Jacobi, Vorlesungen ueber Dynamik,
+   * Sect. 28.  The constructor takes the semi-axes of the ellipsoid (which
+   * must be in order).  Member functions map the ellipsoidal coordinates
+   * ω and β separately to \e x and \e y.  Jacobi's coordinates
+   * have been multiplied by
+   * (<i>a</i><sup>2</sub>−<i>c</i><sup>2</sub>)<sup>1/2</sup> /
+   * (2<i>b</i>) so that the customary results are returned in the cases of
+   * a sphere or an ellipsoid of revolution.
    **********************************************************************/
   class JacobiConformal {
-    Math::real _a, _b, _c, _ab2, _bc2, _ac2, _ab, _bc, _ac;
-    EllipticFunction _exa, _eya;
-    static void norm(Math::real& x, Math::real& y)
-    { Math::real z = Math::hypot(x, y); x /= z; y /= z; }
+    typedef Math::real real;
+    real _a, _b, _c, _ab2, _bc2, _ac2;
+    EllipticFunction _ex, _ey;
+    static void norm(real& x, real& y)
+    { real z = Math::hypot(x, y); x /= z; y /= z; }
   public:
     /**
      * Constructor for a trixial ellipsoid with semi-axes
@@ -33,70 +37,92 @@ namespace GeographicLib {
      * @param[in] b
      * @param[in] c
      *
-     * The semi-axes must satisfy \e a > \e b > \e c > 0.
+     * The semi-axes must satisfy \e a ≥ \e b ≥ \e c > 0 and \e a >
+     * \e c.  This form of the constructor cannot be used to specify a
+     * sphere (use the next constructor).
      **********************************************************************/
-    JacobiConformal(Math::real a, Math::real b, Math::real c)
+    JacobiConformal(real a, real b, real c)
       : _a(a), _b(b), _c(c)
       , _ab2((_a - _b) * (_a + _b))
       , _bc2((_b - _c) * (_b + _c))
       , _ac2((_a - _c) * (_a + _c))
-      , _exa(+_ab2 / _ac2 * Math::sq(_c / _b), -_ab2 / Math::sq(_b),
-             +_bc2 / _ac2 * Math::sq(_a / _b), +Math::sq(_a / _b) )
-      , _eya(-_bc2 / _ab2 * Math::sq(_a / _c), -_bc2 / Math::sq(_c),
-             +_ac2 / _ab2 * Math::sq(_b / _c), +Math::sq(_b / _c))
+      , _ex(_ab2 / _ac2 * Math::sq(_c / _b), -_ab2 / Math::sq(_b),
+            _bc2 / _ac2 * Math::sq(_a / _b), Math::sq(_a / _b))
+      , _ey(_bc2 / _ac2 * Math::sq(_a / _b), +_bc2 / Math::sq(_b),
+            _ab2 / _ac2 * Math::sq(_c / _b), Math::sq(_c / _b))
     {
-      using std::sqrt;
-      if (!(a > b && b > c && c > 0))
-        throw GeographicErr("axes are not in order");
-      _ab = sqrt(_ab2);
-      _bc = sqrt(_bc2);
-      _ac = sqrt(_ac2);
+      if (!(a >= b && b >= c && c > 0))
+        throw GeographicErr("JacobiConformal: axes are not in order");
+      if (!(a > c))
+        throw GeographicErr("JacobiConformal: use alternate constructor for sphere");
     }
     /**
-     * @return the quadrant length in the \e x direction
+     * Alternate constructor for a triaxial ellipsoid with semi-axes
+     *
+     * @param[in] a
+     * @param[in] b
+     * @param[in] c
+     * @param[in] ab the relative magnitude of \e a &minus \e b.
+     * @param[in] bc the relative magnitude of \e b &minus \e c.
+     *
+     * This form can be used to specify a sphere.  The semi-axes must
+     * satisfy \e a &ge \e b &ge c > 0.  The ratio \e ab : \e bc must equal
+     * (<i>a</i>−<i>b</i>) : (<i>b</i>−<i>c</i>) with \e ab
+     * ≥ 0, \e bc ≥ 0, and \e ab + \e bc > 0.
      **********************************************************************/
-    Math::real x() const {
-      return 2 * Math::sq(_a) / (_b * _ac) * _exa.Pi();
+    JacobiConformal(real a, real b, real c, real ab, real bc)
+      : _a(a), _b(b), _c(c)
+      , _ab2(ab * (_a + _b))
+      , _bc2(bc * (_b + _c))
+      , _ac2(_ab2 + _bc2)
+      , _ex(_ab2 / _ac2 * Math::sq(_c / _b),
+            -(_a - _b) * (_a + _b) / Math::sq(_b),
+            _bc2 / _ac2 * Math::sq(_a / _b), Math::sq(_a / _b))
+      , _ey(_bc2 / _ac2 * Math::sq(_a / _b),
+            +(_b - _c) * (_b + _c) / Math::sq(_b),
+            _ab2 / _ac2 * Math::sq(_c / _b), Math::sq(_c / _b))
+    {
+      if (!(a >= b && b >= c && c > 0 && ab >= 0 && bc >= 0))
+        throw GeographicErr("JacobiConformal: axes are not in order");
+      if (!(ab + bc > 0))
+        throw GeographicErr("JacobiConformal: ab + bc must be positive");
     }
     /**
+     * @return the quadrant length in the \e x direction
+     **********************************************************************/
+    Math::real x() const { return Math::sq(_a / _b) * _ex.Pi(); }
+    /**
      * The \e x projection
      *
      * @param[in] somg sin(ω)
      * @param[in] comg cos(ω)
      * @return \e x
      **********************************************************************/
-    Math::real x(Math::real somg, Math::real comg) const {
-      using std::sqrt; using std::atan;
-      Math::real somg1 = _ac * somg, comg1 = _bc * comg;
-      norm(somg1, comg1);
-      Math::real domg1 = _exa.Delta(somg1, comg1);
-      return 2 *
-        ( Math::sq(_a) / (_b * _ac) * _exa.Pi(somg1, comg1, domg1) -
-          atan(_ab2 * somg1 * comg1 / sqrt(Math::sq(_a * somg1) * _bc2 +
-                                           Math::sq(_b * comg1) * _ac2)) );
+    Math::real x(real somg, real comg) const {
+      real somg1 = _b * somg, comg1 = _a * comg; norm(somg1, comg1);
+      return Math::sq(_a / _b)
+        * _ex.Pi(somg1, comg1, _ex.Delta(somg1, comg1));
     }
     /**
      * The \e x projection
      *
      * @param[in] omg ω (in degrees)
-     * @return \e x
+     * @return \e x (in degrees)
      *
      * ω must be in (−180°, 180°].
      **********************************************************************/
-    Math::real x(Math::real omg) const {
+    Math::real x(real omg) const {
       using std::abs; using std::sin; using std::cos;
-      Math::real
+      real
         a = omg * Math::degree(),
         somg = abs(omg) == 180 ? 0 : sin(a),
         comg = abs(omg) ==  90 ? 0 : cos(a);
-      return x(somg, comg);
+      return x(somg, comg) / Math::degree();
     }
     /**
      * @return the quadrant length in the \e y direction
      **********************************************************************/
-    Math::real y() const {
-      return  2 * Math::sq(_b) / (_c * _ab) * _eya.Pi();
-    }
+    Math::real y() const { return Math::sq(_c / _b) * _ey.Pi(); }
     /**
      * The \e y projection
      *
@@ -104,31 +130,26 @@ namespace GeographicLib {
      * @param[in] cbet cos(β)
      * @return \e y
      **********************************************************************/
-    Math::real y(Math::real sbet, Math::real cbet) const {
-      using std::sqrt;
-      Math::real sbet1 = _ab * sbet, cbet1 = _ac * cbet;
-      norm(sbet1, cbet1);
-      Math::real dbet1 = _eya.Delta(sbet1, cbet1);
-      return 2 *
-        ( Math::sq(_b) / (_c * _ab) * _eya.Pi(sbet1, cbet1, dbet1) -
-          Math::asinh(_bc2 * sbet * cbet / sqrt(Math::sq(_b * sbet) * _ab2 +
-                                                Math::sq(_c * cbet) * _ac2 )) );
+    Math::real y(real sbet, real cbet) const {
+      real sbet1 = _b * sbet, cbet1 = _c * cbet; norm(sbet1, cbet1);
+      return Math::sq(_c / _b)
+        * _ey.Pi(sbet1, cbet1, _ey.Delta(sbet1, cbet1));
     }
     /**
      * The \e y projection
      *
      * @param[in] bet β (in degrees)
-     * @return \e y
+     * @return \e y (in degrees)
      *
      * β must be in (−180°, 180°].
      **********************************************************************/
-    Math::real y(Math::real bet) const {
+    Math::real y(real bet) const {
       using std::abs; using std::sin; using std::cos;
-      Math::real
+      real
         a = bet * Math::degree(),
         sbet = abs(bet) == 180 ? 0 : sin(a),
         cbet = abs(bet) ==  90 ? 0 : cos(a);
-      return y(sbet, cbet);
+      return y(sbet, cbet) / Math::degree();
     }
   };
 
diff --git a/examples/Makefile.am b/examples/Makefile.am
index 4b61a2d..331dad6 100644
--- a/examples/Makefile.am
+++ b/examples/Makefile.am
@@ -47,6 +47,7 @@ EXAMPLE_FILES = \
 	example-UTMUPS.cpp \
 	example-Utility.cpp \
 	GeoidToGTX.cpp \
+	JacobiConformal.cpp JacobiConformal.hpp \
 	make-egmcof.cpp
 
 EXTRA_DIST = CMakeLists.txt $(EXAMPLE_FILES)
diff --git a/examples/Makefile.in b/examples/Makefile.in
index 67ea03b..f59da88 100644
--- a/examples/Makefile.in
+++ b/examples/Makefile.in
@@ -295,6 +295,7 @@ EXAMPLE_FILES = \
 	example-UTMUPS.cpp \
 	example-Utility.cpp \
 	GeoidToGTX.cpp \
+	JacobiConformal.cpp JacobiConformal.hpp \
 	make-egmcof.cpp
 
 EXTRA_DIST = CMakeLists.txt $(EXAMPLE_FILES)
diff --git a/include/GeographicLib/Config.h b/include/GeographicLib/Config.h
index f1d1498..1831e6d 100644
--- a/include/GeographicLib/Config.h
+++ b/include/GeographicLib/Config.h
@@ -1,8 +1,8 @@
 // This will be overwritten by ./configure
 
-#define GEOGRAPHICLIB_VERSION_STRING "1.40"
+#define GEOGRAPHICLIB_VERSION_STRING "1.41"
 #define GEOGRAPHICLIB_VERSION_MAJOR 1
-#define GEOGRAPHICLIB_VERSION_MINOR 40
+#define GEOGRAPHICLIB_VERSION_MINOR 41
 #define GEOGRAPHICLIB_VERSION_PATCH 0
 
 // Undefine HAVE_LONG_DOUBLE if this type is unknown to the compiler
diff --git a/include/GeographicLib/Constants.hpp b/include/GeographicLib/Constants.hpp
index 0bd2af8..99671a3 100644
--- a/include/GeographicLib/Constants.hpp
+++ b/include/GeographicLib/Constants.hpp
@@ -41,14 +41,16 @@
 // correspondences:
 //
 // _MSC_VER  Visual Studio
+//   1100     vc5
+//   1200     vc6
 //   1300     vc7
-//   1311     vc7.1 (2003)
+//   1310     vc7.1 (2003)
 //   1400     vc8   (2005)
 //   1500     vc9   (2008)
 //   1600     vc10  (2010)
 //   1700     vc11  (2012)
 //   1800     vc12  (2013)
-//   1900     vc14
+//   1900     vc14  (2015)
 #    define GEOGRAPHICLIB_STATIC_ASSERT static_assert
 #  else
 #    define GEOGRAPHICLIB_STATIC_ASSERT(cond,reason) \
diff --git a/include/GeographicLib/OSGB.hpp b/include/GeographicLib/OSGB.hpp
index cb029fb..9ceec06 100644
--- a/include/GeographicLib/OSGB.hpp
+++ b/include/GeographicLib/OSGB.hpp
@@ -2,7 +2,7 @@
  * \file OSGB.hpp
  * \brief Header for GeographicLib::OSGB class
  *
- * Copyright (c) Charles Karney (2010-2014) <charles at karney.com> and licensed
+ * Copyright (c) Charles Karney (2010-2015) <charles at karney.com> and licensed
  * under the MIT/X11 License.  For more information, see
  * http://geographiclib.sourceforge.net/
  **********************************************************************/
@@ -182,8 +182,11 @@ namespace GeographicLib {
      * @return \e a the equatorial radius of the Airy 1830 ellipsoid (meters).
      *
      * This is 20923713 ft converted to meters using the rule 1 ft =
-     * 10<sup>9.48401603−10</sup> m.  (The Airy 1830 value is returned
-     * because the OSGB projection is based on this ellipsoid.)
+     * 10<sup>9.48401603−10</sup> m.  The Airy 1830 value is returned
+     * because the OSGB projection is based on this ellipsoid.  The conversion
+     * factor from feet to meters is the one used for the 1936 retriangulation
+     * of Britain; see Section A.1 (p. 37) of <i>A guide to coordinate systems
+     * in Great Britain</i>, v2.2 (Dec. 2013).
      **********************************************************************/
     static Math::real MajorRadius() {
     // result is about 6377563.3960320664406 m
diff --git a/include/GeographicLib/Rhumb.hpp b/include/GeographicLib/Rhumb.hpp
index 723f720..d4ffce8 100644
--- a/include/GeographicLib/Rhumb.hpp
+++ b/include/GeographicLib/Rhumb.hpp
@@ -2,8 +2,8 @@
  * \file Rhumb.hpp
  * \brief Header for GeographicLib::Rhumb and GeographicLib::RhumbLine classes
  *
- * Copyright (c) Charles Karney (2012) <charles at karney.com> and licensed under
- * the MIT/X11 License.  For more information, see
+ * Copyright (c) Charles Karney (2014-2015) <charles at karney.com> and licensed
+ * under the MIT/X11 License.  For more information, see
  * http://geographiclib.sourceforge.net/
  **********************************************************************/
 
@@ -83,9 +83,11 @@ namespace GeographicLib {
     }
     static inline real tano(real x) {
       using std::abs; using std::tan;
+      // Need the volatile declaration for optimized builds on 32-bit centos
+      // with g++ 4.4.7
+      GEOGRAPHICLIB_VOLATILE real y = 2 * abs(x);
       return
-        2 * abs(x) == Math::pi() ? (x < 0 ? - overflow() : overflow()) :
-        tan(x);
+        y == Math::pi() ? (x < 0 ? - overflow() : overflow()) : tan(x);
     }
     static inline real gd(real x)
     { using std::atan; using std::sinh; return atan(sinh(x)); }
diff --git a/java/src/main/java/net/sf/geographiclib/Accumulator.java b/java/src/main/java/net/sf/geographiclib/Accumulator.java
index 991b912..1a8cf34 100644
--- a/java/src/main/java/net/sf/geographiclib/Accumulator.java
+++ b/java/src/main/java/net/sf/geographiclib/Accumulator.java
@@ -17,7 +17,7 @@ package net.sf.geographiclib;
  * The implementation follows J. R. Shewchuk,
  * <a href="https://dx.doi.org/10.1007/PL00009321"> Adaptive Precision
  * Floating-Point Arithmetic and Fast Robust Geometric Predicates</a>,
- * Discrete & Computational Geometry 18(3) 305–363 (1997).
+ * Discrete & Computational Geometry 18(3) 305–363 (1997).
  * <p>
  * In the documentation of the member functions, <i>sum</i> stands for the value
  * currently held in the accumulator.
diff --git a/java/src/main/java/net/sf/geographiclib/Geodesic.java b/java/src/main/java/net/sf/geographiclib/Geodesic.java
index 812eee3..ca4518c 100644
--- a/java/src/main/java/net/sf/geographiclib/Geodesic.java
+++ b/java/src/main/java/net/sf/geographiclib/Geodesic.java
@@ -264,7 +264,7 @@ public class Geodesic {
    * <p>
    * @param a equatorial radius (meters).
    * @param f flattening of ellipsoid.  Setting <i>f</i> = 0 gives a sphere.
-   *   Negative <i>f</i> gives a prolate ellipsoid.  If <i>f</i> > 1, set
+   *   Negative <i>f</i> gives a prolate ellipsoid.  If <i>f</i> > 1, set
    *   flattening to 1/<i>f</i>.
    * @exception GeographicErr if <i>a</i> or (1 − <i>f</i> ) <i>a</i> is
    *   not positive.
diff --git a/legacy/C/direct.c b/legacy/C/direct.c
index b8c1130..9df69e8 100644
--- a/legacy/C/direct.c
+++ b/legacy/C/direct.c
@@ -24,7 +24,7 @@ int main() {
   struct geod_geodesic g;
 
   geod_init(&g, a, f);
-  while (scanf("%lf %lf %lf %lf\n", &lat1, &lon1, &azi1, &s12) == 4) {
+  while (scanf("%lf %lf %lf %lf", &lat1, &lon1, &azi1, &s12) == 4) {
     geod_direct(&g, lat1, lon1, azi1, s12, &lat2, &lon2, &azi2);
     printf("%.15f %.15f %.15f\n", lat2, lon2, azi2);
   }
diff --git a/legacy/C/inverse.c b/legacy/C/inverse.c
index 5e96a8e..a42fb40 100644
--- a/legacy/C/inverse.c
+++ b/legacy/C/inverse.c
@@ -24,7 +24,7 @@ int main() {
   struct geod_geodesic g;
 
   geod_init(&g, a, f);
-  while (scanf("%lf %lf %lf %lf\n", &lat1, &lon1, &lat2, &lon2) == 4) {
+  while (scanf("%lf %lf %lf %lf", &lat1, &lon1, &lat2, &lon2) == 4) {
     geod_inverse(&g, lat1, lon1, lat2, lon2, &s12, &azi1, &azi2);
     printf("%.15f %.15f %.10f\n", azi1, azi2, s12);
   }
diff --git a/legacy/C/planimeter.c b/legacy/C/planimeter.c
index 12661ef..932bd25 100644
--- a/legacy/C/planimeter.c
+++ b/legacy/C/planimeter.c
@@ -29,7 +29,7 @@ int main() {
   geod_init(&g, a, f);
   geod_polygon_init(&p, 0);
 
-  while (scanf("%lf %lf\n", &lat, &lon) == 2)
+  while (scanf("%lf %lf", &lat, &lon) == 2)
     geod_polygon_addpoint(&g, &p, lat, lon);
   n = geod_polygon_compute(&g, &p, 0, 1, &A, &P);
   printf("%d %.8f %.3f\n", n, P, A);
diff --git a/man/CartConvert.1 b/man/CartConvert.1
index 01e1640..40ecef0 100644
--- a/man/CartConvert.1
+++ b/man/CartConvert.1
@@ -1,4 +1,4 @@
-.\" Automatically generated by Pod::Man 2.27 (Pod::Simple 3.28)
+.\" Automatically generated by Pod::Man 2.27 (Pod::Simple 3.29)
 .\"
 .\" Standard preamble:
 .\" ========================================================================
@@ -133,7 +133,7 @@
 .\" ========================================================================
 .\"
 .IX Title "CARTCONVERT 1"
-.TH CARTCONVERT 1 "2014-12-18" "GeographicLib 1.40" "GeographicLib Utilities"
+.TH CARTCONVERT 1 "2015-03-09" "GeographicLib 1.41" "GeographicLib Utilities"
 .\" For nroff, turn off justification.  Always turn off hyphenation; it makes
 .\" way too many mistakes in technical documents.
 .if n .ad l
diff --git a/man/CartConvert.usage b/man/CartConvert.usage
index f761cc1..aebe039 100644
--- a/man/CartConvert.usage
+++ b/man/CartConvert.usage
@@ -9,7 +9,7 @@ int usage(int retval, bool brief) {
 "For full documentation type:\n"
 "    CartConvert --help\n"
 "or visit:\n"
-"    http://geographiclib.sf.net/1.40/CartConvert.1.html\n";
+"    http://geographiclib.sf.net/1.41/CartConvert.1.html\n";
   else
     ( retval ? std::cerr : std::cout ) << "Man page:\n"
 "NAME\n"
diff --git a/man/ConicProj.1 b/man/ConicProj.1
index 9314beb..cd75e14 100644
--- a/man/ConicProj.1
+++ b/man/ConicProj.1
@@ -1,4 +1,4 @@
-.\" Automatically generated by Pod::Man 2.27 (Pod::Simple 3.28)
+.\" Automatically generated by Pod::Man 2.27 (Pod::Simple 3.29)
 .\"
 .\" Standard preamble:
 .\" ========================================================================
@@ -133,7 +133,7 @@
 .\" ========================================================================
 .\"
 .IX Title "CONICPROJ 1"
-.TH CONICPROJ 1 "2014-12-18" "GeographicLib 1.40" "GeographicLib Utilities"
+.TH CONICPROJ 1 "2015-03-09" "GeographicLib 1.41" "GeographicLib Utilities"
 .\" For nroff, turn off justification.  Always turn off hyphenation; it makes
 .\" way too many mistakes in technical documents.
 .if n .ad l
diff --git a/man/ConicProj.usage b/man/ConicProj.usage
index 00f4d87..e827916 100644
--- a/man/ConicProj.usage
+++ b/man/ConicProj.usage
@@ -9,7 +9,7 @@ int usage(int retval, bool brief) {
 "For full documentation type:\n"
 "    ConicProj --help\n"
 "or visit:\n"
-"    http://geographiclib.sf.net/1.40/ConicProj.1.html\n";
+"    http://geographiclib.sf.net/1.41/ConicProj.1.html\n";
   else
     ( retval ? std::cerr : std::cout ) << "Man page:\n"
 "NAME\n"
diff --git a/man/GeoConvert.1 b/man/GeoConvert.1
index 9474a16..4b4efb6 100644
--- a/man/GeoConvert.1
+++ b/man/GeoConvert.1
@@ -1,4 +1,4 @@
-.\" Automatically generated by Pod::Man 2.27 (Pod::Simple 3.28)
+.\" Automatically generated by Pod::Man 2.27 (Pod::Simple 3.29)
 .\"
 .\" Standard preamble:
 .\" ========================================================================
@@ -133,7 +133,7 @@
 .\" ========================================================================
 .\"
 .IX Title "GEOCONVERT 1"
-.TH GEOCONVERT 1 "2014-12-18" "GeographicLib 1.40" "GeographicLib Utilities"
+.TH GEOCONVERT 1 "2015-03-09" "GeographicLib 1.41" "GeographicLib Utilities"
 .\" For nroff, turn off justification.  Always turn off hyphenation; it makes
 .\" way too many mistakes in technical documents.
 .if n .ad l
diff --git a/man/GeoConvert.usage b/man/GeoConvert.usage
index dd7b8b7..71e7e00 100644
--- a/man/GeoConvert.usage
+++ b/man/GeoConvert.usage
@@ -9,7 +9,7 @@ int usage(int retval, bool brief) {
 "For full documentation type:\n"
 "    GeoConvert --help\n"
 "or visit:\n"
-"    http://geographiclib.sf.net/1.40/GeoConvert.1.html\n";
+"    http://geographiclib.sf.net/1.41/GeoConvert.1.html\n";
   else
     ( retval ? std::cerr : std::cout ) << "Man page:\n"
 "NAME\n"
diff --git a/man/GeodSolve.1 b/man/GeodSolve.1
index f1ea676..0d75358 100644
--- a/man/GeodSolve.1
+++ b/man/GeodSolve.1
@@ -1,4 +1,4 @@
-.\" Automatically generated by Pod::Man 2.27 (Pod::Simple 3.28)
+.\" Automatically generated by Pod::Man 2.27 (Pod::Simple 3.29)
 .\"
 .\" Standard preamble:
 .\" ========================================================================
@@ -133,7 +133,7 @@
 .\" ========================================================================
 .\"
 .IX Title "GEODSOLVE 1"
-.TH GEODSOLVE 1 "2014-12-18" "GeographicLib 1.40" "GeographicLib Utilities"
+.TH GEODSOLVE 1 "2015-03-09" "GeographicLib 1.41" "GeographicLib Utilities"
 .\" For nroff, turn off justification.  Always turn off hyphenation; it makes
 .\" way too many mistakes in technical documents.
 .if n .ad l
diff --git a/man/GeodSolve.usage b/man/GeodSolve.usage
index bcae93f..8d841c5 100644
--- a/man/GeodSolve.usage
+++ b/man/GeodSolve.usage
@@ -9,7 +9,7 @@ int usage(int retval, bool brief) {
 "For full documentation type:\n"
 "    GeodSolve --help\n"
 "or visit:\n"
-"    http://geographiclib.sf.net/1.40/GeodSolve.1.html\n";
+"    http://geographiclib.sf.net/1.41/GeodSolve.1.html\n";
   else
     ( retval ? std::cerr : std::cout ) << "Man page:\n"
 "NAME\n"
diff --git a/man/GeodesicProj.1 b/man/GeodesicProj.1
index 3081d2a..fae7901 100644
--- a/man/GeodesicProj.1
+++ b/man/GeodesicProj.1
@@ -1,4 +1,4 @@
-.\" Automatically generated by Pod::Man 2.27 (Pod::Simple 3.28)
+.\" Automatically generated by Pod::Man 2.27 (Pod::Simple 3.29)
 .\"
 .\" Standard preamble:
 .\" ========================================================================
@@ -133,7 +133,7 @@
 .\" ========================================================================
 .\"
 .IX Title "GEODESICPROJ 1"
-.TH GEODESICPROJ 1 "2014-12-18" "GeographicLib 1.40" "GeographicLib Utilities"
+.TH GEODESICPROJ 1 "2015-03-09" "GeographicLib 1.41" "GeographicLib Utilities"
 .\" For nroff, turn off justification.  Always turn off hyphenation; it makes
 .\" way too many mistakes in technical documents.
 .if n .ad l
diff --git a/man/GeodesicProj.usage b/man/GeodesicProj.usage
index c767e9d..c2a337e 100644
--- a/man/GeodesicProj.usage
+++ b/man/GeodesicProj.usage
@@ -9,7 +9,7 @@ int usage(int retval, bool brief) {
 "For full documentation type:\n"
 "    GeodesicProj --help\n"
 "or visit:\n"
-"    http://geographiclib.sf.net/1.40/GeodesicProj.1.html\n";
+"    http://geographiclib.sf.net/1.41/GeodesicProj.1.html\n";
   else
     ( retval ? std::cerr : std::cout ) << "Man page:\n"
 "NAME\n"
diff --git a/man/GeoidEval.1 b/man/GeoidEval.1
index b1d91a7..590c50b 100644
--- a/man/GeoidEval.1
+++ b/man/GeoidEval.1
@@ -1,4 +1,4 @@
-.\" Automatically generated by Pod::Man 2.27 (Pod::Simple 3.28)
+.\" Automatically generated by Pod::Man 2.27 (Pod::Simple 3.29)
 .\"
 .\" Standard preamble:
 .\" ========================================================================
@@ -133,7 +133,7 @@
 .\" ========================================================================
 .\"
 .IX Title "GEOIDEVAL 1"
-.TH GEOIDEVAL 1 "2014-12-18" "GeographicLib 1.40" "GeographicLib Utilities"
+.TH GEOIDEVAL 1 "2015-03-09" "GeographicLib 1.41" "GeographicLib Utilities"
 .\" For nroff, turn off justification.  Always turn off hyphenation; it makes
 .\" way too many mistakes in technical documents.
 .if n .ad l
diff --git a/man/GeoidEval.usage b/man/GeoidEval.usage
index 3d3650c..bd5e4b3 100644
--- a/man/GeoidEval.usage
+++ b/man/GeoidEval.usage
@@ -10,7 +10,7 @@ int usage(int retval, bool brief) {
 "For full documentation type:\n"
 "    GeoidEval --help\n"
 "or visit:\n"
-"    http://geographiclib.sf.net/1.40/GeoidEval.1.html\n";
+"    http://geographiclib.sf.net/1.41/GeoidEval.1.html\n";
   else
     ( retval ? std::cerr : std::cout ) << "Man page:\n"
 "NAME\n"
diff --git a/man/Gravity.1 b/man/Gravity.1
index 6273c92..50fa937 100644
--- a/man/Gravity.1
+++ b/man/Gravity.1
@@ -1,4 +1,4 @@
-.\" Automatically generated by Pod::Man 2.27 (Pod::Simple 3.28)
+.\" Automatically generated by Pod::Man 2.27 (Pod::Simple 3.29)
 .\"
 .\" Standard preamble:
 .\" ========================================================================
@@ -133,7 +133,7 @@
 .\" ========================================================================
 .\"
 .IX Title "GRAVITY 1"
-.TH GRAVITY 1 "2014-12-18" "GeographicLib 1.40" "GeographicLib Utilities"
+.TH GRAVITY 1 "2015-03-09" "GeographicLib 1.41" "GeographicLib Utilities"
 .\" For nroff, turn off justification.  Always turn off hyphenation; it makes
 .\" way too many mistakes in technical documents.
 .if n .ad l
diff --git a/man/Gravity.usage b/man/Gravity.usage
index 1136667..e2574b2 100644
--- a/man/Gravity.usage
+++ b/man/Gravity.usage
@@ -9,7 +9,7 @@ int usage(int retval, bool brief) {
 "For full documentation type:\n"
 "    Gravity --help\n"
 "or visit:\n"
-"    http://geographiclib.sf.net/1.40/Gravity.1.html\n";
+"    http://geographiclib.sf.net/1.41/Gravity.1.html\n";
   else
     ( retval ? std::cerr : std::cout ) << "Man page:\n"
 "NAME\n"
diff --git a/man/MagneticField.1 b/man/MagneticField.1
index fad3e28..4570b4c 100644
--- a/man/MagneticField.1
+++ b/man/MagneticField.1
@@ -1,4 +1,4 @@
-.\" Automatically generated by Pod::Man 2.27 (Pod::Simple 3.28)
+.\" Automatically generated by Pod::Man 2.27 (Pod::Simple 3.29)
 .\"
 .\" Standard preamble:
 .\" ========================================================================
@@ -133,7 +133,7 @@
 .\" ========================================================================
 .\"
 .IX Title "MAGNETICFIELD 1"
-.TH MAGNETICFIELD 1 "2014-12-18" "GeographicLib 1.40" "GeographicLib Utilities"
+.TH MAGNETICFIELD 1 "2015-03-09" "GeographicLib 1.41" "GeographicLib Utilities"
 .\" For nroff, turn off justification.  Always turn off hyphenation; it makes
 .\" way too many mistakes in technical documents.
 .if n .ad l
diff --git a/man/MagneticField.usage b/man/MagneticField.usage
index e4c78ff..e7b9bd1 100644
--- a/man/MagneticField.usage
+++ b/man/MagneticField.usage
@@ -10,7 +10,7 @@ int usage(int retval, bool brief) {
 "For full documentation type:\n"
 "    MagneticField --help\n"
 "or visit:\n"
-"    http://geographiclib.sf.net/1.40/MagneticField.1.html\n";
+"    http://geographiclib.sf.net/1.41/MagneticField.1.html\n";
   else
     ( retval ? std::cerr : std::cout ) << "Man page:\n"
 "NAME\n"
diff --git a/man/Planimeter.1 b/man/Planimeter.1
index 4a57ea9..d38bb09 100644
--- a/man/Planimeter.1
+++ b/man/Planimeter.1
@@ -1,4 +1,4 @@
-.\" Automatically generated by Pod::Man 2.27 (Pod::Simple 3.28)
+.\" Automatically generated by Pod::Man 2.27 (Pod::Simple 3.29)
 .\"
 .\" Standard preamble:
 .\" ========================================================================
@@ -133,7 +133,7 @@
 .\" ========================================================================
 .\"
 .IX Title "PLANIMETER 1"
-.TH PLANIMETER 1 "2014-12-18" "GeographicLib 1.40" "GeographicLib Utilities"
+.TH PLANIMETER 1 "2015-03-09" "GeographicLib 1.41" "GeographicLib Utilities"
 .\" For nroff, turn off justification.  Always turn off hyphenation; it makes
 .\" way too many mistakes in technical documents.
 .if n .ad l
@@ -184,8 +184,9 @@ If the \fB\-s\fR option is given, then the interpretation used is the one
 that results in a positive area; i.e., the area is positive and less
 than the total area of the ellipsoid.
 .PP
-Only simple polygons are supported for the area computation.  Polygons
-may include one or both poles.  There is no need to close the polygon.
+Only simple (i.e., non-self-intersecting) polygons are supported for the
+area computation.  Polygons may include one or both poles.  There is no
+need to close the polygon.
 .SH "OPTIONS"
 .IX Header "OPTIONS"
 .IP "\fB\-r\fR" 4
@@ -219,7 +220,9 @@ given (in meters^2) with (\fIprec\fR \- 5) digits after the decimal point.
 .IP "\fB\-G\fR" 4
 .IX Item "-G"
 use the series formulation for the geodesics.  This is the default
-option and recommened for terrestrial applications.
+option and is recommended for terrestrial applications.  This option,
+\&\fB\-G\fR, and the following three options, \fB\-E\fR, \fB\-Q\fR, and \fB\-R\fR, are
+mutually exclusive.
 .IP "\fB\-E\fR" 4
 .IX Item "-E"
 use \*(L"exact\*(R" algorithms (based on elliptic integrals) for the geodesic
@@ -231,8 +234,7 @@ accurate for modest flattenings.)
 .IX Item "-Q"
 perform the calculation on the authalic sphere.  The area calculation is
 accurate even if the flattening is large, \fIprovided\fR the edges are
-sufficiently short.  The perimeter calculation is not accurate.  \fB\-E\fR
-and \fB\-Q\fR are mutually exclusive.
+sufficiently short.  The perimeter calculation is not accurate.
 .IP "\fB\-R\fR" 4
 .IX Item "-R"
 The lines joining the vertices are rhumb lines instead of geodesics.
diff --git a/man/Planimeter.1.html b/man/Planimeter.1.html
index 8c25f13..f2abae2 100644
--- a/man/Planimeter.1.html
+++ b/man/Planimeter.1.html
@@ -29,7 +29,7 @@
 
 <p>Of course, encircling an area in the clockwise direction is equivalent to encircling the rest of the ellipsoid in the counter-clockwise direction. The default interpretation used by <b>Planimeter</b> is the one that results in a smaller magnitude of area; i.e., the magnitude of the area is less than or equal to one half the total area of the ellipsoid. If the <b>-s</b> option is given, then the interpretation used is the one that results in a positive area; i.e., the area is positive  [...]
 
-<p>Only simple polygons are supported for the area computation. Polygons may include one or both poles. There is no need to close the polygon.</p>
+<p>Only simple (i.e., non-self-intersecting) polygons are supported for the area computation. Polygons may include one or both poles. There is no need to close the polygon.</p>
 
 <h1 id="OPTIONS">OPTIONS</h1>
 
@@ -68,7 +68,7 @@
 <dt id="G"><b>-G</b></dt>
 <dd>
 
-<p>use the series formulation for the geodesics. This is the default option and recommened for terrestrial applications.</p>
+<p>use the series formulation for the geodesics. This is the default option and is recommended for terrestrial applications. This option, <b>-G</b>, and the following three options, <b>-E</b>, <b>-Q</b>, and <b>-R</b>, are mutually exclusive.</p>
 
 </dd>
 <dt id="E"><b>-E</b></dt>
@@ -80,7 +80,7 @@
 <dt id="Q"><b>-Q</b></dt>
 <dd>
 
-<p>perform the calculation on the authalic sphere. The area calculation is accurate even if the flattening is large, <i>provided</i> the edges are sufficiently short. The perimeter calculation is not accurate. <b>-E</b> and <b>-Q</b> are mutually exclusive.</p>
+<p>perform the calculation on the authalic sphere. The area calculation is accurate even if the flattening is large, <i>provided</i> the edges are sufficiently short. The perimeter calculation is not accurate.</p>
 
 </dd>
 <dt id="R"><b>-R</b></dt>
diff --git a/man/Planimeter.pod b/man/Planimeter.pod
index cd2ce66..789a984 100644
--- a/man/Planimeter.pod
+++ b/man/Planimeter.pod
@@ -47,8 +47,9 @@ If the B<-s> option is given, then the interpretation used is the one
 that results in a positive area; i.e., the area is positive and less
 than the total area of the ellipsoid.
 
-Only simple polygons are supported for the area computation.  Polygons
-may include one or both poles.  There is no need to close the polygon.
+Only simple (i.e., non-self-intersecting) polygons are supported for the
+area computation.  Polygons may include one or both poles.  There is no
+need to close the polygon.
 
 =head1 OPTIONS
 
@@ -90,7 +91,9 @@ given (in meters^2) with (I<prec> - 5) digits after the decimal point.
 =item B<-G>
 
 use the series formulation for the geodesics.  This is the default
-option and recommened for terrestrial applications.
+option and is recommended for terrestrial applications.  This option,
+B<-G>, and the following three options, B<-E>, B<-Q>, and B<-R>, are
+mutually exclusive.
 
 =item B<-E>
 
@@ -104,8 +107,7 @@ accurate for modest flattenings.)
 
 perform the calculation on the authalic sphere.  The area calculation is
 accurate even if the flattening is large, I<provided> the edges are
-sufficiently short.  The perimeter calculation is not accurate.  B<-E>
-and B<-Q> are mutually exclusive.
+sufficiently short.  The perimeter calculation is not accurate.
 
 =item B<-R>
 
diff --git a/man/Planimeter.usage b/man/Planimeter.usage
index a964f05..b562a86 100644
--- a/man/Planimeter.usage
+++ b/man/Planimeter.usage
@@ -9,7 +9,7 @@ int usage(int retval, bool brief) {
 "For full documentation type:\n"
 "    Planimeter --help\n"
 "or visit:\n"
-"    http://geographiclib.sf.net/1.40/Planimeter.1.html\n";
+"    http://geographiclib.sf.net/1.41/Planimeter.1.html\n";
   else
     ( retval ? std::cerr : std::cout ) << "Man page:\n"
 "NAME\n"
@@ -55,8 +55,9 @@ int usage(int retval, bool brief) {
 "       results in a positive area; i.e., the area is positive and less than\n"
 "       the total area of the ellipsoid.\n"
 "\n"
-"       Only simple polygons are supported for the area computation.  Polygons\n"
-"       may include one or both poles.  There is no need to close the polygon.\n"
+"       Only simple (i.e., non-self-intersecting) polygons are supported for\n"
+"       the area computation.  Polygons may include one or both poles.  There\n"
+"       is no need to close the polygon.\n"
 "\n"
 "OPTIONS\n"
 "       -r  toggle whether counter-clockwise traversal of the polygon returns a\n"
@@ -85,7 +86,9 @@ int usage(int retval, bool brief) {
 "           decimal point.\n"
 "\n"
 "       -G  use the series formulation for the geodesics.  This is the default\n"
-"           option and recommened for terrestrial applications.\n"
+"           option and is recommended for terrestrial applications.  This\n"
+"           option, -G, and the following three options, -E, -Q, and -R, are\n"
+"           mutually exclusive.\n"
 "\n"
 "       -E  use \"exact\" algorithms (based on elliptic integrals) for the\n"
 "           geodesic calculations.  These are more accurate than the (default)\n"
@@ -96,7 +99,7 @@ int usage(int retval, bool brief) {
 "       -Q  perform the calculation on the authalic sphere.  The area\n"
 "           calculation is accurate even if the flattening is large, provided\n"
 "           the edges are sufficiently short.  The perimeter calculation is not\n"
-"           accurate.  -E and -Q are mutually exclusive.\n"
+"           accurate.\n"
 "\n"
 "       -R  The lines joining the vertices are rhumb lines instead of\n"
 "           geodesics.\n"
diff --git a/man/RhumbSolve.1 b/man/RhumbSolve.1
index 4ad176a..86c8c07 100644
--- a/man/RhumbSolve.1
+++ b/man/RhumbSolve.1
@@ -1,4 +1,4 @@
-.\" Automatically generated by Pod::Man 2.27 (Pod::Simple 3.28)
+.\" Automatically generated by Pod::Man 2.27 (Pod::Simple 3.29)
 .\"
 .\" Standard preamble:
 .\" ========================================================================
@@ -133,7 +133,7 @@
 .\" ========================================================================
 .\"
 .IX Title "RHUMBSOLVE 1"
-.TH RHUMBSOLVE 1 "2014-12-18" "GeographicLib 1.40" "GeographicLib Utilities"
+.TH RHUMBSOLVE 1 "2015-03-09" "GeographicLib 1.41" "GeographicLib Utilities"
 .\" For nroff, turn off justification.  Always turn off hyphenation; it makes
 .\" way too many mistakes in technical documents.
 .if n .ad l
diff --git a/man/RhumbSolve.usage b/man/RhumbSolve.usage
index 41ab0a3..6238a99 100644
--- a/man/RhumbSolve.usage
+++ b/man/RhumbSolve.usage
@@ -9,7 +9,7 @@ int usage(int retval, bool brief) {
 "For full documentation type:\n"
 "    RhumbSolve --help\n"
 "or visit:\n"
-"    http://geographiclib.sf.net/1.40/RhumbSolve.1.html\n";
+"    http://geographiclib.sf.net/1.41/RhumbSolve.1.html\n";
   else
     ( retval ? std::cerr : std::cout ) << "Man page:\n"
 "NAME\n"
diff --git a/man/TransverseMercatorProj.1 b/man/TransverseMercatorProj.1
index bb5a251..4568578 100644
--- a/man/TransverseMercatorProj.1
+++ b/man/TransverseMercatorProj.1
@@ -1,4 +1,4 @@
-.\" Automatically generated by Pod::Man 2.27 (Pod::Simple 3.28)
+.\" Automatically generated by Pod::Man 2.27 (Pod::Simple 3.29)
 .\"
 .\" Standard preamble:
 .\" ========================================================================
@@ -133,7 +133,7 @@
 .\" ========================================================================
 .\"
 .IX Title "TRANSVERSEMERCATORPROJ 1"
-.TH TRANSVERSEMERCATORPROJ 1 "2014-12-18" "GeographicLib 1.40" "GeographicLib Utilities"
+.TH TRANSVERSEMERCATORPROJ 1 "2015-03-09" "GeographicLib 1.41" "GeographicLib Utilities"
 .\" For nroff, turn off justification.  Always turn off hyphenation; it makes
 .\" way too many mistakes in technical documents.
 .if n .ad l
diff --git a/man/TransverseMercatorProj.usage b/man/TransverseMercatorProj.usage
index c730ec2..24207be 100644
--- a/man/TransverseMercatorProj.usage
+++ b/man/TransverseMercatorProj.usage
@@ -9,7 +9,7 @@ int usage(int retval, bool brief) {
 "For full documentation type:\n"
 "    TransverseMercatorProj --help\n"
 "or visit:\n"
-"    http://geographiclib.sf.net/1.40/TransverseMercatorProj.1.html\n";
+"    http://geographiclib.sf.net/1.41/TransverseMercatorProj.1.html\n";
   else
     ( retval ? std::cerr : std::cout ) << "Man page:\n"
 "NAME\n"
diff --git a/pom.xml b/pom.xml
index 31234c8..df7bdb7 100644
--- a/pom.xml
+++ b/pom.xml
@@ -13,7 +13,7 @@
 
   <groupId>com.sri.vt</groupId>
   <artifactId>geographiclib</artifactId>
-  <version>1.40-SNAPSHOT</version>
+  <version>1.41-SNAPSHOT</version>
   <packaging>majic-cmake</packaging>
   <name>GeographicLib</name>
 
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 26fa357..63e92a4 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -19,7 +19,8 @@ endif ()
 if (MSVC)
   if (GEOGRAPHICLIB_SHARED_LIB)
     set_target_properties (${PROJECT_SHARED_LIBRARIES} PROPERTIES
-      VERSION "${LIBVERSIONFULL}" OUTPUT_NAME ${LIBNAME} IMPORT_SUFFIX -i.lib)
+      VERSION "${LIBVERSION_BUILD}" OUTPUT_NAME ${LIBNAME}
+      IMPORT_SUFFIX -i.lib)
     if (CMAKE_VERSION VERSION_LESS 2.8.11)
       set_target_properties (${PROJECT_SHARED_LIBRARIES} PROPERTIES
         COMPILE_DEFINITIONS GEOGRAPHICLIB_SHARED_LIB=1)
@@ -30,7 +31,7 @@ if (MSVC)
   endif ()
   if (GEOGRAPHICLIB_STATIC_LIB)
     set_target_properties (${PROJECT_STATIC_LIBRARIES} PROPERTIES
-      VERSION "${LIBVERSIONFULL}" OUTPUT_NAME ${LIBNAME})
+      VERSION "${LIBVERSION_BUILD}" OUTPUT_NAME ${LIBNAME})
     if (CMAKE_VERSION VERSION_LESS 2.8.11)
       set_target_properties (${PROJECT_STATIC_LIBRARIES} PROPERTIES
         COMPILE_DEFINITIONS GEOGRAPHICLIB_SHARED_LIB=0)
@@ -42,7 +43,7 @@ if (MSVC)
 else ()
   set_target_properties (
     ${PROJECT_SHARED_LIBRARIES} ${PROJECT_STATIC_LIBRARIES} PROPERTIES
-    VERSION "${LIBVERSIONFULL}" SOVERSION "${LIBVERSION}"
+    VERSION "${LIBVERSION_BUILD}" SOVERSION "${LIBVERSION_API}"
     OUTPUT_NAME ${LIBNAME})
   if (APPLE AND GEOGRAPHICLIB_PRECISION EQUAL 5)
     if (GEOGRAPHICLIB_SHARED_LIB)
diff --git a/src/GeographicLib.pro b/src/GeographicLib.pro
index aea8873..387f24e 100644
--- a/src/GeographicLib.pro
+++ b/src/GeographicLib.pro
@@ -1,4 +1,4 @@
-VERSION = 14.0.1
+VERSION = 14.0.2
 
 TEMPLATE = lib
 
diff --git a/src/Rhumb.cpp b/src/Rhumb.cpp
index 4cea566..8b9d677 100644
--- a/src/Rhumb.cpp
+++ b/src/Rhumb.cpp
@@ -3,7 +3,7 @@
  * \brief Implementation for GeographicLib::Rhumb and GeographicLib::RhumbLine
  * classes
  *
- * Copyright (c) Charles Karney (2012) <charles at karney.com> and licensed under
+ * Copyright (c) Charles Karney (2014) <charles at karney.com> and licensed under
  * the MIT/X11 License.  For more information, see
  * http://geographiclib.sourceforge.net/
  **********************************************************************/
diff --git a/src/TransverseMercator.cpp b/src/TransverseMercator.cpp
index 85ab16c..2d035c6 100644
--- a/src/TransverseMercator.cpp
+++ b/src/TransverseMercator.cpp
@@ -2,7 +2,7 @@
  * \file TransverseMercator.cpp
  * \brief Implementation for GeographicLib::TransverseMercator class
  *
- * Copyright (c) Charles Karney (2008-2014) <charles at karney.com> and licensed
+ * Copyright (c) Charles Karney (2008-2015) <charles at karney.com> and licensed
  * under the MIT/X11 License.  For more information, see
  * http://geographiclib.sourceforge.net/
  *
@@ -277,8 +277,13 @@ namespace GeographicLib {
   // taupf and tauf are adapted from TransverseMercatorExact (taup and
   // taupinv).  tau = tan(phi), taup = sinh(psi)
   Math::real TransverseMercator::taupf(real tau) const {
-    if (!(abs(tau) < overflow()))
-      return tau;
+    if (!(abs(tau) < overflow())) {
+      // Fixed in 2015-02 to include the correct scale factor for large tau.
+      // This fixes the bug in Rhumb::GenInverse when one of the points is at a
+      // pole
+      real sig = sinh( eatanhe(real(1)) );
+      return tau / (Math::hypot(real(1), sig) + sig);
+    }
     real
       tau1 = Math::hypot(real(1), tau),
       sig = sinh( eatanhe(tau / tau1) );
@@ -286,8 +291,11 @@ namespace GeographicLib {
   }
 
   Math::real TransverseMercator::tauf(real taup) const {
-    if (!(abs(taup) < overflow()))
-      return taup;
+    if (!(abs(taup) < overflow())) {
+      // Fixed in 2015-02 to match taupf.
+      real sig = sinh( eatanhe(real(1)) );
+      return taup * (Math::hypot(real(1), sig) + sig);
+    }
     real
       // To lowest order in e^2, taup = (1 - e^2) * tau = _e2m * tau; so use
       // tau = taup/_e2m as a starting guess.  (This starting guess is the
diff --git a/tools/CMakeLists.txt b/tools/CMakeLists.txt
index 542e9bb..e8b0034 100644
--- a/tools/CMakeLists.txt
+++ b/tools/CMakeLists.txt
@@ -295,6 +295,13 @@ set_tests_properties (TransverseMercatorProj1
   PROPERTIES PASS_REGULAR_EXPRESSION
   "(90\\.0+ 0\\.0+ 0\\.0+|(90\\.0+|89\\.99999999999[0-9]+) -?180\\.0+ -?180\\.0+) (1\\.0000+|0\\.9999+)")
 
+# Test fix to bad handling of pole by RhumbSolve -i
+# Reported  2015-02-24 by Thomas Murray <thomas.murray56 at gmail.com>;
+add_test (NAME RhumbSolve0 COMMAND
+  RhumbSolve -p 3 -i --input-string "0 0 90 0")
+set_tests_properties (RhumbSolve0
+  PROPERTIES PASS_REGULAR_EXPRESSION "^0\\.0+ 10001965\\.729 ")
+
 if (EXISTS ${GEOGRAPHICLIB_DATA}/geoids/egm96-5.pgm)
   # Check fix for single-cell cache bug found 2010-11-23
   add_test (NAME GeoidEval0
diff --git a/tools/geographiclib-get-magnetic.sh b/tools/geographiclib-get-magnetic.sh
index 1dc613f..ef7bf57 100644
--- a/tools/geographiclib-get-magnetic.sh
+++ b/tools/geographiclib-get-magnetic.sh
@@ -2,8 +2,8 @@
 #
 # Download magnetic models for use by GeographicLib::MagneticModel.
 #
-# Copyright (c) Charles Karney (2011) <charles at karney.com> and licensed
-# under the MIT/X11 License.  For more information, see
+# Copyright (c) Charles Karney (2011-2015) <charles at karney.com> and
+# licensed under the MIT/X11 License.  For more information, see
 # http://geographiclib.sourceforge.net/
 
 DEFAULTDIR="@GEOGRAPHICLIB_DATA@"
@@ -27,13 +27,14 @@ table:
   wmm2010    12    2010-2015      2       3
   wmm2015    12    2015-2020      2       3
   igrf11     13    1900-2015      7      25
+  igrf12     13    1900-2020      7      26
   emm2010   740    2010-2015    3700    4400
 
 The size columns give the download and installed sizes of the datasets.
 In addition you can specify
 
   all = all of the supported magnetic models
-  minimal = wmm2015 igrf11
+  minimal = wmm2015 igrf12
 
 -p parentdir (default $DEFAULTDIR) specifies where the
 datasets should be stored.  The "Default $NAME path" listed when running
@@ -116,6 +117,7 @@ wmm2010
 wmm2015
 emm2010
 igrf11
+igrf12
 EOF
 
 while test $# -gt 0; do
@@ -127,7 +129,7 @@ while test $# -gt 0; do
 		cat $TEMP/all
 		;;
 	    minimal )
-		echo wmm2015; echo igrf11
+		echo wmm2015; echo igrf12
 		;;
 	    * )
 		echo Unknown magnetic model $1 1>&2

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-grass/geographiclib.git



More information about the Pkg-grass-devel mailing list