> Subject: [Viking-devel] Confusion about convert_dms_to_dec()
NB There is already some test code for this in the test directory: degrees_convertor.c + check_degrees_convertors.sh Although the test script itself is not very robust. I don't think trying to input "120.20.30" is a good idea (I don't think this is common angle format description), so if you get back a slightly unexpected result then so be it. The dms format is meant to have separators like spaces and quotes and so forth, like E120°12'18.0000 It could check the string to see if there are multiple '.' or ',' and try to interpret it better, but it's more effort to write code to try and best guess more input format options (e.g. hello regexps!). The idea behind convert_dms_to_dec() is that it accepts both "E120°12'18.0000" and normal "N.N" decimals, for the kinds of text angle input one might write (or copy in from elsewhere) Perhaps the function name and (the lack of) comments don't communicate this very well. One needs to dig into the source code history to get that extra understanding. HTH. -- Be Seeing You - Rob. If at first you don't succeed, then skydiving isn't for you. _______________________________________________ Viking-devel mailing list Viking-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/viking-devel Viking home page: http://viking.sf.net/