Fixed OsMo location data format.

This commit is contained in:
GaidamakUA 2016-01-28 15:26:00 +02:00
parent bd0d9b2e67
commit 274ff122d5

View file

@ -103,7 +103,7 @@ public class OsMoTracker implements OsMoReactor {
if (loc.hasAltitude()) {
cmd.append("A").append((int) loc.getAltitude());
}
if (loc.hasSpeed()) {
if (loc.hasSpeed() && (int) (loc.getSpeed() * 100) != 0) {
cmd.append("S").append((float) ((int) (loc.getSpeed() * 100)) / 100f);
}
if (loc.hasBearing()) {