okopanja / SharkPlanner

SharkPlanner is a mod for entry of waypoints into ABRIS and PVI-800
GNU General Public License v3.0
5 stars 2 forks source link

Coords displayed in DD MM SS may end up being rounded to 60 #56

Closed okopanja closed 11 months ago

okopanja commented 1 year ago

The coordinates specified in DD MM SS may get rounded up to 60.

E.g. 24 32 59.7 will easily be rounded to 24 32 60. Instead this should be 24 33 00

okopanja commented 1 year ago

Affected by this are practically all modules, in their functions that produce the digit for entry. Main issue here is that string formatting is being used to create the digits and at the same time round them. Apparently this needs to be split, so the more significant digit can be rounded and +1 added to next component. Again in this case it must be evaluated if the spillover occurred again.