Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » Extra libraries, Code snippets, applications etc. » Applications created with U++ » Distance - geodesic - Vincenty - very accurate
Re: Distance - geodesic - Vincenty - very accurate [message #26057 is a reply to message #26056] Sat, 27 March 2010 08:05 Go to previous messageGo to previous message
nlneilson is currently offline  nlneilson
Messages: 644
Registered: January 2010
Location: U.S. California. Mojave &...
Contributor
Dumb mistake, I really mess up sometimes.
When I port from one language to another I copy and paste and if
several lines are nearly the same I paste that in more than once
and then change what is necessary.

In Java I used dLat for a double and sLat for a String.
In Upp I used lat for a double and Lat for a String.

In the parse decimal degrees loop:
if (lon<=180 && lat>=-180)
should be lon
if (lon<=180 && lon>=-180)

This catches most error that would be caused by more than one space.

If I ever get an error caused by multiple spaces, or a report of one
I will count the spaces in the code and kick it out.
In Java this took care of it: .replaceAll("\\s+", " ");

I uploaded the file with FileZilla, downloaded and tried it, works OK.

[Updated on: Sat, 27 March 2010 08:22]

Report message to a moderator

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Google Translator
Next Topic: How to load dll
Goto Forum:
  


Current Time: Sat Apr 27 11:09:07 CEST 2024

Total time taken to generate the page: 0.03878 seconds