Ticket #23613: 23613.patch
| File 23613.patch, 1.0 KB (added by , 21 months ago) |
|---|
-
src/main/java/org/openstreetmap/josm/plugins/fit/lib/global/HeartRateCadenceDistanceSpeed.java
99 99 // Assume that the equation doesn't have fractions and no additions (0, 0) 100 100 // 56.7421794 = 676960569 / 180 * x => x = 56.7421794 * 180 / 676960569 = 1.5087e-5 (inverse -> 66280.359) 101 101 // 56.7421794 = 676960569 * 180 * x => x = 56.7421794 / (180 * 676960569) = 3.56e-8 (inverse -> 2.1474836E9, or Integer.MAX_VALUE) 102 return original * 180d / Integer.MAX_VALUE; 102 var raw = original * 180d / Integer.MAX_VALUE; 103 while (raw >= 180d) { 104 raw -= 360d; 105 } 106 return raw; 103 107 } 104 108 105 109 private static double decodeElevation(long original) {
