... the user friendly GPS tool


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Track length accuracy
#1
I must do some verifications of the length on some roads in Romania.
I made the track of the roads and a program to read the track saved as gpx by RouteConverter.
I need the distances between the track points and their elevation.
Since the copy feature in the PositionList of RouteConverter copy to clipboard only Long, Lat and Description (should copy also dist & elevation), I must calculate distances from the gpx file.
My problem is:
-distances calculated by me with various methods ARE DIFFERENT from the distances shown by RouteConverter in the PositionList.
The differences seem random(generally smaller but NOT always).
I get differences of hundred meters on tracks of hundred Kilometers.
On small tracks, I don't have differences.
In the cosine and haversine formulas, I use the earth radius for Romania, and I add also the elevation difference to the length distance calculations.
I do something wrong, I miss something or this is some "glitch" on RouteConverter?

If the RouteConverter formulas are proven accurate, can you manage to be copied to clipboard all the enabled columns in the PositionList ? This way, I don't need to re-calculate them and get the differences mentioned.
Can the accuracy of calculations be verified somehow?

Also the autocomplete elevation on new/modified points should be very useful. Or some pop-up asking on save?

Edit:
For example, 2 road tracks(different directions), with total length calculated by 3 programs:
RouteConverter EasyGPS MyProgram (R=6378137m)(should be smaller since Romania is not at Ecuator)
a) 642151m 642377.96m 641999.9m
b) 637646m 637746.13m 637418.8m
226.96m -151.1m
100.13m -227.2m
What (I do)/(is) wrong?
I can't give results with +/- 100m (every meter of a road cost about 1000$)
Thank you in advance for your patience and help!
Reply
#2
(25.11.2011, 08:48)TeDDy Wrote: My problem is:
-distances calculated by me with various methods ARE DIFFERENT from the distances shown by RouteConverter in the PositionList.

I guess that's normal when two implementations differ. They use different constants, algorithms, rounding accuracies.

(25.11.2011, 08:48)TeDDy Wrote: In the cosine and haversine formulas, I use the earth radius for Romania, and I add also the elevation difference to the length distance calculations.
I do something wrong, I miss something or this is some "glitch" on RouteConverter?

I don't know. My algorithm is based on an algorithm from the Unidata Development Team. Start at BaseRoute#getDistance(int startIndex, int endIndex) to find it in the code base.

(25.11.2011, 08:48)TeDDy Wrote: If the RouteConverter formulas are proven accurate, can you manage to be copied to clipboard all the enabled columns in the PositionList ?

I'm using the Navigating POI-Warner (.asc) when copying positions to the clipboard. Since a long time, I have a generic CSV format on my todo list that could include the distance and make the export via clipboard- and Excel-interaction easier.

(25.11.2011, 08:48)TeDDy Wrote: Can the accuracy of calculations be verified somehow?

Certainly, but I don't know of any reference algorithm. Did you find some reference values or algorithms?

(25.11.2011, 08:48)TeDDy Wrote: Also the autocomplete elevation on new/modified points should be very useful. Or some pop-up asking on save?

I prefer to leave this step to the user since completing the elevation might be very time consuming. There is a proposal in the forum to make completing the GPS data easier.

(25.11.2011, 08:48)TeDDy Wrote: For example, 2 road tracks(different directions), with total length calculated by 3 programs:
RouteConverter EasyGPS MyProgram (R=6378137m)(should be smaller since Romania is not at Ecuator)
a) 642151m 642377.96m 641999.9m
b) 637646m 637746.13m 637418.8m
226.96m -151.1m
100.13m -227.2m
What (I do)/(is) wrong?

I don't know but I'm glad to see that RouteConverter calculates distances in the middle between EasyGPS and your program. The error is below 0,035% and so far that accuracy was enough for the users.

(25.11.2011, 08:48)TeDDy Wrote: I can't give results with +/- 100m (every meter of a road cost about 1000$)

And then you're satisified with RouteConverter's results if put into the clipboard Big Grin
--
Christian
Reply
#3

.zip   LengthCalculations.zip (Size: 4.4 KB / Downloads: 586)
Quote:And then you're satisified with RouteConverter's results if put into the clipboard Big Grin
Nope, since I can't copy/paste distances and elevation. I must read elevations from saved 'gpx' and calculate the distances myself.
Quote:I don't know but I'm glad to see that RouteConverter calculates distances in the middle between EasyGPS and your program. The error is below 0,035% and so far that accuracy was enough for the users.
I use the formulas from http://mathforum.org/library/drmath/view/51879.html
I put them on excel to be reviewed by someone with more knowledge.
In the same EXCEL I have also the distances calculated by RouteConverter, using the Radius=6371000
Since Romania is at 45deg lat and R=6378137..6356752m I should use the average.
In the attached rep I have used 6378137m and you can see I am far below RouteConverter but in line with EXCEL.
I attach a zip with EXCEL, the gpx and my rep.

I should/must get results as close as possible as Route converter calculates them since some time ago I have made some reports by hand copy the lenghts. Overtime the reports number has grown and I don't want to go in some inconsistency.

Please, can you help me to fix my issue?
Other formulas I should use, whatever modifications in EXCEL, allow copy dist+elev from RouteConverter...you name it.

Thank you!
Reply
#4
(28.11.2011, 13:37)TeDDy Wrote: Please, can you help me to fix my issue?

I can point you to my algorithm, but you have to compare it:
https://github.com/cpesch/RouteConverter...aring.java
--
Christian
Reply
#5
Quote:I can point you to my algorithm, but you have to compare it:
https://github.com/cpesch/RouteConverter...aring.java
First look, I see you use the maximum radius too(somewhere in the sources founded 6371000m), and the file pointed differ from the same file founded on zip source, perhaps my mistake.
Can you test against the haversine form my EXCEL?

I will digg to see what results I get and I came back.

Thank you again.



Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)