9 ms·
Indeed, I added a couple of paragraphs in the end explaining the difference and the actual results. As a side note, I actually got slightly different numbers, b
by piotrjaw 4y ago
Indeed, I added a couple of paragraphs in the end explaining the difference and the actual results. As a side note, I actually got slightly different numbers, but maybe that's because of the lower quality of data that I used.
- bunabhucan 4y agoCan you tell us what the both line solutions measure to using the first approach and the second approach? I'm curious about the effect of the curvature on the calculation. Thanks!
- piotrjaw 4y agoSure! It's pretty straightforward actually. The first approach (which is a simplification) uses the usual way to calculate a distance between two points on a FLAT plane, which using is the Pythagorean Theorem. So d = √((y1 - y2)^2 + (x1 - x2)^2). The second approach uses the haversine formula: https://en.wikipedia.org/wiki/Haversine_formula https://en.wikipedia.org/wiki/Haversine_formula which takes the curvature of the Earth into account, and also the fact that one degree in longitude is a different distance depending on the latitude.
- bunabhucan 4y agoSorry, I was asking for the numeric answers, I'm genuinely curious about the distance values of the two pairs of numbers using the two formula.