Changeset 14083 in josm for trunk/src/org/openstreetmap/josm


Ignore:
Timestamp:
2018-08-04T19:25:42+02:00 (11 months ago)
Author:
Don-vip
Message:

fix #16554 - read NMEA speeds in km/h

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/io/nmea/NmeaReader.java

    r14067 r14083  
    432432                    if (!accu.isEmpty() && currentwp != null) {
    433433                        double speed = Double.parseDouble(accu);
    434                         speed /= 3.6; // speed in m/s
    435                         currentwp.put("speed", Double.toString(speed));
     434                        currentwp.put("speed", Double.toString(speed)); // speed in km/h
    436435                    }
    437436                }
     
    481480                if (!accu.isEmpty() && !currentwp.attr.containsKey("speed")) {
    482481                    double speed = Double.parseDouble(accu);
    483                     speed *= 0.514444444; // to m/s
     482                    speed *= 0.514444444 * 3.6; // to km/h
    484483                    currentwp.put("speed", Double.toString(speed));
    485484                }
Note: See TracChangeset for help on using the changeset viewer.