Talk:Vincenty's formulae

GeographicLib
The 'external link' to GeographicLib claims that it is 1000 times more accurate than Vincenty, but quotes an accuracy of 15nm versus 0.5mm for Vincenty? Surely that can't be right? -- 10:13, 11 June 2009 by 193.32.30.71


 * Presumably he's not claiming 15-nanometer accuracy is more than theoretically useful. Tim Zukas (talk) 18:18, 9 August 2010 (UTC)


 * Implicit in this claim of accuracy is the assumption that the task is to find shortest path on a mathematically defined ellipsoid and not on the geoid or the surface of the earth. An ellipsoid is a useful approximation of the geoid (despite differing from it by up to 100m). Furthermore being able to obtain highly accurate solutions for the ellipsoid is important in some applications (e.g., in order to ensure that the triangle inequality is satisfied). Cffk (talk) 20:51, 28 July 2011 (UTC)

To do
The article still needs a section on the Direct Method. An explanation of how it works could be useful.—3mta3 (talk) 11:57, 12 July 2009 (UTC)
 * This appears to have been done. IrishCowboy (talk) 16:58, 28 February 2012 (UTC)

There is a need for a non-technical introduction to what the Vincenty algorithm is, before the background about how Vicenty did it and why its efficient - almost a disambiguation page. After reading the main article, I was unclear as to when the vincenty algorithm can be used. Can it be used for any ellipsoid, or only Earth? And what kind of algorithm is it (i.e. between the sphere, which can be used for any sphere, see where, and the geoid, which cannot, see where). Then who, if anybody, comes after Vincenty - or to put it another way, what are the known bugs? — Preceding unsigned comment added by 212.183.128.47 (talk) 12:35, 3 September 2012 (UTC)

Please, somebody add images for inverse method to illustrate this http://en.wikipedia.org/wiki/Vincenty%27s_formulae#cite_note-opposite-3. — Preceding unsigned comment added by 89.208.20.50 (talk) 09:23, 31 May 2013 (UTC)

Incorrect formulae
Formulae (6) and (14) from the original paper have been incorrectly copied with disastrous results. Somebody who has time please fix this.

129.55.200.20 (talk) 16:34, 6 October 2009 (UTC)nobody
 * Fixed, thanks for the heads up. —3mta3 (talk) 08:15, 7 October 2009 (UTC)

Fixed: $$...(-1+2 \cos^2(2 \sigma_m))...$$ here was ^2 missing! Regards, Dirk  17.November 2009 Correct is:
 * $$ \Delta \sigma = B \sin \sigma \Big\{ \cos(2 \sigma_m) + \tfrac{1}{4} B \big[ \cos \sigma \big(-1+2 \cos^2(2 \sigma_m) \big) - \tfrac{1}{6} B \cos(2 \sigma_m) (-3+4 \sin^2 \sigma) \big(-3+4 \cos^2 (2 \sigma_m)\big)  \big] \Big\} $$  —Preceding unsigned comment added by 80.136.184.240 (talk) 10:05, 17 November 2009 (UTC)

Accuracy claims
The statement that Vincenty's formulae have accuracy of 0.5mm (0.000015“) is misleading. Having read the paper, I see where these numbers come from, and I don't believe Vincenty claims they represent the accuracy of his formulae. Vincenty says he compared his results with Rainsford's results, which were obtained using a different numerical method and published to millimeter precision, accounting for up to a 0.5mm discrepancy with Rainsford's results. That 0.000015“ isn't azimuth, that just says that a 0.000015“arc of a 6318.137km radius circle is 0.5mm.

How was the claim that 10-12 in λ corresponds to 0.06mm derived?

The claim that GeographicLib's accuracy is 1000 times more accurate by than Vincenty at 15nm is contradicted by the above claim (as pointed out by a previous commenter). At any rate the comparison is silly at best, since these numbers refer to a reference ellipsoid that does not describe the Earth's surface to millimeter accuracy. 216.15.124.160 (talk)nobody —Preceding undated comment added 05:10, 14 October 2009 (UTC).
 * So how accurately does any method determine a position on Earth? When I was calibrating GPS thirty years ago we used to get within 100mm using astronav or theodolites etc  and that was supposed to be pretty good. Greglocock (talk) 13:27, 26 June 2010 (UTC)

Accuracy not proved
Everyone talks about this formula as being perfect. But it simply was not tested. I've been searching for days, and everything, absolutely everything I found is based on the algorithm provided by Ed Williams, which in turn was used in the movable-type.co.uk website; which in turn is the most copied by other sites and applications which make references to that site.

I´ve also made thousands (literally) of distance tests from one place of the earth to the other, to an obsessive level I could never imagine. The result is that there are a few things that seem wrong.

First we have the haversine formula which supossedly overestimates (bigger distances) on polebound or transpolar distances while it underestimates (yield smaller results) when measuring transequatorial distances, for example when travelling from the northern hemisphere to the southern.

But the most strange is that I found Vincenty's, almost holy for some people, formula does exactly that. When measuring the distance say for instance from Paris to Mexico City, it yields bigger numbers (quite bigger than it is suppossed) on all the calculator-sites referenced in this article as well as in other sites. While when measuring a distance from Paris to a city of the southern hemisphere it yields smaller numbers than in reality; quite smaller actually.

Now, either something is wrong with the algorithms of the sites, leading to a snowball effect, as all the other sites are just copies of the same field; or either Vincenty's formula is wrong. Yes, there are no proves of this formula being accurate.

In aviation or other fields it is not used yet; GPS did not implement it yet; it is only used on certain sites of the net and some organizations and institutions which based their calculators on those sites or on the papers of T. Vincenty.

But the distance results it yields are far from credible as I mentioned before.

In air navigation the haversine is still the only formula used and they don't fail when travelling, imagine travelling from London to New York and landing, 20 kms away from JFK airport.

Every suppossed proof of the credibility of this formula is based on the claims of Vincenty and of other people who just believe him and use it for home or online tasks. I mean it is not used neither by NASA, nor by airlines, the army or scientists; well maybe on geodesy, but still no one proved it true. All the proves are just a few sites and other tens which copy those few sites.

So, my recommendation is this fromula not to be used for professional reasons in real life; it is just as real as the 11 dimensions theory; very nice in theory but never tested in real life. — Preceding unsigned comment added by Tucson749 (talk • contribs) 04:24, 21 January 2011 (UTC)
 * Have you looked at Rapp's Geometric Geodesy, pt.II ,which explains the concepts and equations of geodetic formulation, as well as provides several different presentations, including Vincenty's? Unless you use Sodano's adjustment for antipodal events, All of the different formulae——including Vincenty's——will diverge in such cases (in terms of calculating the auxiliary longitude difference).  Furthermore, his formulation (as Rapp's GG illustrates) is an approximation of the integrals' binomial series expansions, though——like most of the others——he needlessly complicates by using cosine multiple expansions instead of just the direct, higher multiples (e.g., "$$\scriptstyle{\sin(\sigma)(-3+4\sin^2(\sigma))\cos(2\sigma_m)(-3+4 \cos^2(2\sigma_m))}\,\!$$" instead of just "$$\scriptstyle{-\sin(3\sigma)\cos(6\sigma_m)}\,\!$$").  First of all, though, do your results match those of Vincenty's examples found in Table II of section 5 of his paper?  ~ Kaimbridge ~  (talk) 16:26, 21 January 2011 (UTC)


 * "I´ve also made thousands (literally) of distance tests from one place of the earth to the other, to an obsessive level I could never imagine."


 * Give us a couple of examples. What pairs of points did you test, and how? Tim Zukas (talk) 18:04, 24 January 2011 (UTC)


 * It's not true that all formulas diverge for nearly antipodal points. GeographicLib uses a method which converges for any pair of points.  See the online calculator Geod. Cffk (talk) 21:19, 28 July 2011 (UTC)


 * I've checked the truncation (as opposed to round-off) error in Vincenty's formulas comparing them against series of much higher order with high-precision arithmetic. The conclusion is that if Vincenty's algorithms are carried out with exact arithmetic and if they converge then the results are accurate to 0.1mm for WGS84 and 1.5mm for f = 1/150.  For details see http://arxiv.org/abs/1102.1215 Cffk (talk) 18:56, 28 July 2011 (UTC)

Fixes to notation
I corrected various errors in the notation section: Cffk (talk) —Preceding undated comment added 14:00, 31 July 2011 (UTC).
 * λ was incorrectly defined as the longitude instead of the longitude on the auxiliary sphere,
 * α2 was incorrectly called the reverse azimuth instead of the forward azimuth at point 2,
 * I placed the defintion of b after f and removed the aggressively rounded numerical value given to it,
 * I added a definition of σ and described U as the latitude on the auxiliary sphere.

New Sections
I added two new sections, cffk (talk) 20:04, 1 August 2011 (UTC)
 * "Background" which describes where Vincenty's formulas come from and why he put them in this form.
 * "Nearly antipodal points" which describes the problems of failure to converge or slow convergence for the inverse method. This includes pointers to Vincenty's efforts to correct these problems.  I also include a plug for my method of solving the inverse problem via Newton's method because
 * it's a significant improvement (in terms of robustness) over Vincenty;
 * I've seen incorrect claims in Wikipedia that there may be no solution in such cases (!);
 * I've seen claims in Wikipedia that all methods diverge in such cases.

L and λ in the Direct Method
L and λ in the Direct Method appear to be defining the longitude and auxiliary longitude (respectively) of the second location. If that is the case, should they not be L2 and λ2? IrishCowboy (talk) 17:03, 28 February 2012 (UTC)

They're longitude differences, not longitudes-- in other words longitude at the starting point is taken as zero. Tim Zukas (talk) 00:51, 29 February 2012 (UTC)

worked example
It would be useful to back up the formulae with a worked example, giving the expected numerical values at each step. Doing this can help the editors avoid formula errors. It can also help the user or reader avoid any confusion. If not included within the article, a reference to where such step-by-step examples can be found would help. G1cmz (talk) 16:47, 3 September 2012 (UTC)

explanation of formulae
It would be nice to have a section explaining the formula (or even algorithm)...perhaps taking some of the detail from background. If anybody has the answers, Some things I'd like to see explained are - how constant are the constants a, b and f? Or are they parameters? - i.e. is this applicable to any ellipsoid, or just the Earth? - what are all the "magic numbers"? — Preceding unsigned comment added by G1cmz (talk • contribs) 19:28, 3 September 2012 (UTC)

Formula ambiguity
These formulas are severely ambiguous

does sin a[b+c]  mean  (sin(a))*[b+c]  or  sin( a*[b+c] ) ?


 * Which formula in the article are you saying is ambiguous? Tim Zukas (talk) 22:07, 13 March 2013 (UTC)


 * $$C = \frac{f}{16} \cos^2 \alpha \big[4 + f(4-3 \cos^2 \alpha) \big] \,$$
 * $$C = \frac{f}{16} \cos^2 \alpha \big[4 + f(4-3 \cos^2 \alpha) \big] \,$$


 * $$\lambda = L + (1-C) f \sin \alpha \left\{ \sigma + C \sin \sigma \left[\cos (2 \sigma_m) + C \cos \sigma (-1 + 2 \cos^2 (2 \sigma_m)) \right]\right\} \, $$


 * These two. In the formula for C,  is the argument of the cosine function, just alpha,  or is the argument of the cosine function the product of alpha and the expression in square brackets ?


 * And in the formula for lambda, is the argument of the sin function,  just alpha,  or is the argument of the sin function the product of alpha and the whole expression in curly brackets ?   There are several similar formulas with basically the same issue further along.Eregli bob (talk) 08:36, 15 March 2013 (UTC)


 * Go ahead and put parentheses around cosine-squared-alpha and sine alpha if you like. In each case the argument is alpha. Tim Zukas (talk) 22:11, 17 March 2013 (UTC)

Trig functions in Radians or Degrees
For those of us who are blindly typing the formula, are the sin, cos, arctan, etc inputs and results in radians or degrees? The programming math libraries I'm using want radians and return radians. For example, there are values that look like they should be expressed in degrees, such as the calculation for $$\sigma$$ which results from using arctan. The libraries return radians from atan and atan2 and I'm wondering if I should convert that to degrees. maturin (talk) 06:32, 19 May 2013 (UTC)
 * Right. So when calculating, let rf = π/180, then (e.g.) tan(φ) = tan(φ°×rf) and φ° = arctan(tan(φ))/rf.  ~ Kaimbridge ~  (talk) 18:34, 20 May 2013 (UTC)
 * You notice $$\sigma$$ mostly doesn't appear by itself-- it's usually cos $$\sigma$$ or sin $$\sigma$$, in which case it can be grads or degrees or whatever you want. But if it is by itself then it (and $$\Delta \sigma$$) has to be in radians. Tim Zukas (talk) 20:04, 20 May 2013 (UTC)

July 2013 suggestions for merging articles
This section is for discussing Fgnievinski's tags suggesting moving articles. cffk (talk) 10:35, 30 July 2013 (UTC)

I recommend against including this material into a new article on geodesic on an ellipsoid. Certainly, such an article is a good idea see my outline at User:Cffk/sandbox/Geodesics on an ellipsoid. But a lengthy listing of Vincenty's method is best left in its own page with merely a pointer from the other article. — Preceding unsigned comment added by Cffk (talk • contribs) 22:00, 29 July 2013 (UTC)

The article on geodesics on an ellipsoid has now been created. cffk (talk) 21:30, 19 August 2013 (UTC)


 * I Oppose merging, the article is compact in its present form, it accomplishes a clear goal: how to solve the calculation. And already lengthy Gaianauta (talk) 16:27, 24 November 2013 (UTC)

Note on accuracy
The accuracy claims in the article seem to be made in the context of the Earth, where the oblateness is mild. I recently tried using this measure oblateness on much more oblate ellipsoid (f ≅ 1/4). As it turns out I was getting errors of 1-3% percent on the inverse problem which is actually too high for my application. If there are sources that discuss the accuracy of this formula in contexts other than the Earth, that would be worth adding. Dragons flight (talk) 13:46, 30 July 2013 (UTC)


 * Since the method retains terms to order f^3, the errors are of order f^4.  So the errors for f = 1/4 will be 30 million times greater than for f = 1/300.  For f this big you shouldn't be using a method based on a series.  The GeodSolve utility (included with GeographicLib) accepts a -E flag which solves the geodesic problem in terms of elliptic integrals.  This gives accurate results for 1/100 < b/a < 100. cffk (talk) 14:05, 30 July 2013 (UTC)

phi vs varphi
There have been a couple of edits and reversions changing phi (straight in math mode) to varphi (curly in math mode) and vice versa. It is unfortunate that&mdash;typically&mdash;phi displays differently in "math" mode, $$\phi$$, compared to HTML, &phi;. Unfortunately, I'm not sure that you can rely on the HTML version displaying as the curly variant. In which case it seems to be a mistake to junk up the markup source with varphi and phi, if it's only going to solve the problem in a subset of cases. So my recommendation would be to avoid making any distinction of meaning between the two varieties (as in this article) and consistently spell the Greek letter as phi; and not to worry about the slightly different appearance. (Note that there are similar "problems" with some Roman letters a, f, g, which display distinctly math and HTML equations; no-one seems to worry about these.) cffk (talk) 18:19, 11 December 2013 (UTC)

λ
What value does λ converge to? Also where is λ1 and λ2 used?SUPERGOD6 (talk) 15:00, 30 September 2014 (UTC)


 * λ converges to the longitude difference on the auxiliary sphere; the quantities λ1 and λ2 are not directly used in this formulation. For a description of the auxiliary sphere see Geodesics on an ellipsoid; however, in that article, λ12 signifies the difference on the geographical longitude (instead of L) and &omega;12 signifies the longitude difference on the auxiliary sphere (instead of λ). cffk (talk) 19:34, 30 September 2014 (UTC)


 * Thank you, but is there a simple way to calculate the longitude of the points on the auxiliary sphere, or the difference of that, like the U1 = arctan[(1 − ƒ) tan φ1], U2 = arctan[(1 − ƒ) tan φ2] for latitude?SUPERGOD6 (talk) 12:21, 1 October 2014 (UTC)


 * Wait nevermind, I figured out a way to compute it and to end the iteration loop.SUPERGOD6 (talk) 12:37, 1 October 2014 (UTC)

Don't use WGS-84 semi-major axis (a), ignoring axis (b), take the "mean"
In this example (https://en.wikipedia.org/wiki/Vincenty%27s_formulae#Notation) the WGS-84 semi-major axis (a) is taken alone, ignoring the semi-major axis (b), but most times I found earth coordinate calculations on the web, both axis were taken into account, by taking the mean radius. Look at the values at https://en.wikipedia.org/wiki/Earth_radius#Published_values. I think this example should be changed to use the mean radius. --88.71.202.65 (talk) 08:08, 2 August 2019 (UTC).
 * The ellipsoid is specified by the major axis a and the flattening f. The minor axis is given by b = a (1 &minus; f) and so it is not ignored. cffk (talk) 08:55, 2 August 2019 (UTC)
 * Thanks. Now I see it. I was coming from the Haversine formula (https://en.wikipedia.org/wiki/Haversine_formula), were the mean is taken as only radius parameter. --StackOverflows (talk) 12:43, 2 August 2019 (UTC)

Incorrect equation for Direct Problem
I was recently implementing the Vincenty Formulae for solving the direct problem and this equation was wrong:
 * $$\begin{align}

\sigma &= \frac{s}{bA} + \Delta\sigma \end{align}$$

This gave a distance over several kilometers no matter the tolerance inputted.

I managed to get it correct by changing the fraction to the previous sigma.
 * $$\begin{align}

\sigma &= \sigma + \Delta\sigma \end{align}$$

I validated this by running the indirect problem to get the distance of the two points and it had approached an acceptable distance of a couple meters at most. — Preceding unsigned comment added by Dukester25 (talk • contribs) 16:11, 15 December 2021 (UTC)

The value of $$\cos\left(2\sigma_\text{m}\right)$$ for indirect problem
Should $$\cos\left(2\sigma_\text{m}\right) = 0$$ or $$ = -1$$ when $$\cos\alpha = 0$$? Is it the limiting value of $$\cos\left(2\sigma_\text{m}\right) = \cos\sigma - \frac{2\sin U_1 \sin U_2}{\cos^2\alpha}$$? Thank you for your cooperation. — Preceding unsigned comment added by 240D:1A:7FC:9200:2D1D:2739:B1CD:615A (talk) 15:29, 25 December 2023 (UTC)