Description
The Coordinate Converter tool gives wrong results. For example, the input "N 59.99999 E 12.99999" gives
DDM: N05 10.000 E001 03.000
DMS: N05° 09' 60.00" E001° 02' 60.00"
DD: 5.16667, 1.05000
Not only is the degrees wrong, but the output also allows the value 60 for the seconds. I had a look at src/opensak/coords.py, and several functions return rounded values directly. However, after rounding, the rounded value should be checked to see if it has the value 60. Of course, when the rounded value for seconds is 60, the seconds should be set to 0, and the minutes should be incremented. Ditto for minutes and degrees.
Steps to Reproduce
- Click "Tools"
- Click "Coordinate Converter…"
- Paste "N 59.99999 E 12.99999"
Expected Behavior
I expect "N 59.99999 E 12.99999" to return
DDM: N59° 59.999' E012° 59.999'
DMS: N59° 59' 59.96" E012° 59' 59.96"
DD: 59.99999, 12.99999
And I expect "N 59.999999 E 12.999999" to return
DDM: N60° 00.000' E013° 00.000'
DMS: N60° 00' 00.00" E013° 00' 00.00"
DD: 60.00000, 13.00000
Environment
OS: Windows 11
OpenSAK version 1.17.0
Description
The Coordinate Converter tool gives wrong results. For example, the input "N 59.99999 E 12.99999" gives
DDM: N05 10.000 E001 03.000
DMS: N05° 09' 60.00" E001° 02' 60.00"
DD: 5.16667, 1.05000
Not only is the degrees wrong, but the output also allows the value 60 for the seconds. I had a look at
src/opensak/coords.py, and several functions return rounded values directly. However, after rounding, the rounded value should be checked to see if it has the value 60. Of course, when the rounded value for seconds is 60, the seconds should be set to 0, and the minutes should be incremented. Ditto for minutes and degrees.Steps to Reproduce
Expected Behavior
I expect "N 59.99999 E 12.99999" to return
DDM: N59° 59.999' E012° 59.999'
DMS: N59° 59' 59.96" E012° 59' 59.96"
DD: 59.99999, 12.99999
And I expect "N 59.999999 E 12.999999" to return
DDM: N60° 00.000' E013° 00.000'
DMS: N60° 00' 00.00" E013° 00' 00.00"
DD: 60.00000, 13.00000
Environment
OS: Windows 11
OpenSAK version 1.17.0