Documentations mistakes or code issues ?
See original GitHub issuedistance unit
Your documentation say distances are in kilometers. I tried your library but distance seems not to be kilometers. What is it ? Is it meters ?
var nantes = new LatLon(47.238222,-1.5600561);
var saintNazaire = new LatLon(47.2769351, -2.3091714);
nantes.distanceTo(nazaire); // return 56697.95954334959 - distance in kilometer is approximately 50km
function parameters
Further more your readme give latlon.destinationPoint(distance, bearing[, radius])
But your documentation give destinationPoint(brng, dist)
Which one should we trust ?
strange results
(new LatLon(0, 0)).destinationPoint(100000, 0); // return LatLon { lat: 0.8993216059187306, lon: 0 }
(new LatLon(0, 0)).destinationPoint(100000, 90); // return LatLon { lat: 5.506530518221826e-17, lon: 0.8993216059187716 }
(new LatLon(0, 0)).destinationPoint(100000, 180); // return LatLon { lat: -0.8993216059187306, lon: 0 }
(new LatLon(0, 0)).destinationPoint(100000, 270); // return LatLon { lat: -1.6519591554665477e-16, lon: -0.8993216059187716 }
why results give changes on latitude with a bearing of 90° and 270° ?
Issue Analytics
- State:
- Created 6 years ago
- Reactions:2
- Comments:12 (2 by maintainers)
Top Results From Across the Web
Importance of Documenting Frequently Encountered Errors
How important is it to document some of the frequently encountered errors? Here are some common areas where issues are seen and a...
Read more >The 10 Most Common Mistakes in Documentation
Here are Fentin's top 10 documentation mistakes: · 1. Using labels without behavioral examples · 2. Using words that could be interpreted as...
Read more >Common documentation errors - Today's Hospitalist
Here are some common documentation errors “and some tips for fixes. Probably the trickiest area for hospitalists is the history component for both...
Read more >6 Process Documentation Mistakes Developers Should Avoid
Not following formatting standards · Using code snippets without code syntax highlighter · Not complying with business standards · Failing to ...
Read more >How to document web errors - The MDN Web Docs project
Step 1 – Determine the error to document · Step 2 – Check the existing error documentation · Step 3 – Create the...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@thorinisme About your strange results: in theory I would expect that assuming
var p=(new LatLon(0, 0)).destinationPoint(100000, 90)
thenp.lat
should be zero. Assumingvar p=(new LatLon(0, 0)).destinationPoint(100000, 270)
thenp.lat
should be zero too.Now, with https://raw.githubusercontent.com/chrisveness/geodesy/v1.1.2/latlon-spherical.js we have that the absolute value of
p.lat
is less than 2e-16 degree; sinceLatLon(0, 0)
is a point lying on the Equator that means that the destination point is not on the Equator (as expected) but it lies 22 picometers northern (or southern) of the Equator.Would it be worth getting rid of the documentation in the README and instead just linking directly to the JS Docs? That way you only have to maintain the JS Doc.