]> gitweb.fperrin.net Git - GpsPrune.git/blobdiff - tim/prune/data/Coordinate.java
Version 11, August 2010
[GpsPrune.git] / tim / prune / data / Coordinate.java
index 44ab779ab6c1a0d66f1254c3df6fb82391a955fb..556bd892797cac3834f89d316dadbb6a726d0fab 100644 (file)
@@ -263,11 +263,7 @@ public abstract class Coordinate
         */
        public boolean equals(Coordinate inOther)
        {
-               return (inOther != null && _cardinal == inOther._cardinal
-                       && _degrees == inOther._degrees
-                       && _minutes == inOther._minutes
-                       && _seconds == inOther._seconds
-                       && _fracs == inOther._fracs);
+               return (_asDouble == inOther._asDouble);
        }
 
 
@@ -304,8 +300,12 @@ public abstract class Coordinate
                                }
                                case FORMAT_DEG_WHOLE_MIN:
                                {
-                                       answer = "" + PRINTABLE_CARDINALS[_cardinal] + threeDigitString(_degrees) + "\u00B0"
-                                               + (int) Math.floor(_minutes + _seconds / 60.0 + _fracs / 60.0 / _fracDenom + 0.5) + "'";
+                                       int deg = _degrees;
+                                       int min = (int) Math.floor(_minutes + _seconds / 60.0 + _fracs / 60.0 / _fracDenom + 0.5);
+                                       if (min == 60) {
+                                               min = 0; deg++;
+                                       }
+                                       answer = "" + PRINTABLE_CARDINALS[_cardinal] + threeDigitString(deg) + "\u00B0" + min + "'";
                                        break;
                                }
                                case FORMAT_DEG: