GPSBabel / gpsbabel

GPSBabel: convert, manipulate, and transfer data from GPS programs or GPS receivers. Open Source and supported on MacOS, Windows, Linux, and more. Pointy clicky GUI or a command line version...
https://www.gpsbabel.org
GNU General Public License v2.0
477 stars 127 forks source link

adjust greatcircle conversion factors, kill gcgeodist cheat. #1156

Closed tsteven4 closed 1 year ago

tsteven4 commented 1 year ago

The conversions between radians and degrees are constructed such that only one multiply is necessary instead of a multiply and a divide. Because no good deed goes unpunished, there was a machine dependent change of one nanodegree in some of the test case coordinates. To work around this the output was changed from gpx (nanodegrees) to unicsv (microdegrees). Note that the arc filter modifies the waypoints, not the routes or tracks, so the unicsv output captures the relevant data.

gcgeodist used to throw away any distances less than 0.1m, supposedly because of a difference in 32 and 64 bit hosts. This cheat has been removed. Note that these distances can be summed as in the garmin_txt test case. This resulted in the change of the accumulated distance on one route point. The trailing white space in the modified reference file is actually produced by the garmin_txt writer, the reference file is exactly what we produce.