Update OsMoTracker.java
This commit is contained in:
parent
b7896547ed
commit
524bcf0d58
1 changed files with 4 additions and 4 deletions
|
@ -91,16 +91,16 @@ public class OsMoTracker implements OsMoReactor {
|
||||||
StringBuilder cmd = new StringBuilder();
|
StringBuilder cmd = new StringBuilder();
|
||||||
cmd.append("L").append((float)loc.getLatitude()).append(":").append((float)loc.getLongitude());
|
cmd.append("L").append((float)loc.getLatitude()).append(":").append((float)loc.getLongitude());
|
||||||
if(loc.hasAccuracy()) {
|
if(loc.hasAccuracy()) {
|
||||||
cmd.append("H").append((float)loc.getAccuracy());
|
cmd.append("H").append((int)loc.getAccuracy());
|
||||||
}
|
}
|
||||||
if(loc.hasAltitude()) {
|
if(loc.hasAltitude()) {
|
||||||
cmd.append("A").append((float)loc.getAltitude());
|
cmd.append("A").append((int)loc.getAltitude());
|
||||||
}
|
}
|
||||||
if(loc.hasSpeed()) {
|
if(loc.hasSpeed()) {
|
||||||
cmd.append("S").append((float)loc.getSpeed());
|
cmd.append("S").append(((int)loc.getSpeed()*100)/100f);
|
||||||
}
|
}
|
||||||
if(loc.hasBearing()) {
|
if(loc.hasBearing()) {
|
||||||
cmd.append("C").append((float)loc.getBearing());
|
cmd.append("C").append((int)loc.getBearing());
|
||||||
}
|
}
|
||||||
if((System.currentTimeMillis() - loc.getTime()) > 30000 && loc.getTime() != 0) {
|
if((System.currentTimeMillis() - loc.getTime()) > 30000 && loc.getTime() != 0) {
|
||||||
cmd.append("T").append(loc.getTime());
|
cmd.append("T").append(loc.getTime());
|
||||||
|
|
Loading…
Reference in a new issue