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 #26045 is a reply to message #26022] Fri, 26 March 2010 20:07 Go to previous messageGo to previous message
koldo is currently offline  koldo
Messages: 3357
Registered: August 2008
Senior Veteran
Hello Nlneilson

nlneilson wrote on Fri, 26 March 2010 13:08

TrimBoth(); I will try that.

One thing I noticed that seemed odd in upp:
The character for the degree symbol ° as int = -80
I thought that should be 176

I am handling it in upp with:
//            if (ic>122 || ch=='°' || ch==''' || ch=='"') ic = 32;
            if (ic>122 || ic==-80 || ic==39 || ic==34) ic = 32;

That could have something to do with the problem.
Sometimes for ° ic = -62 AND ch = -62 rather than ch = '°'

With my code the ° should be replaced with a space.
To take care of some strange stuff I have:
if (ic < 0) continue;
I could change that to:
if (ic < 0) ic = 32;
and then a few lines of code in C++ to check/remove the consecutive space/s similar to .replaceAll("\\s+", " "); in Java.




I think the º problem does not come from Upp, but for the characters code used. Probably there is not only one option for º.



Best regards
Iñaki
 
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 10:37:03 CEST 2024

Total time taken to generate the page: 0.04008 seconds