diff --git a/src/main/java/com/iot/transport/jt808/service/codec/DataDecoder.java b/src/main/java/com/iot/transport/jt808/service/codec/DataDecoder.java index 2856f32..38c6b01 100644 --- a/src/main/java/com/iot/transport/jt808/service/codec/DataDecoder.java +++ b/src/main/java/com/iot/transport/jt808/service/codec/DataDecoder.java @@ -239,9 +239,9 @@ public class DataDecoder { // 2. byte[4-7] 状态(DWORD(32)) ret.setStatusField(this.parseIntFromBytes(data, 4, 4)); // 3. byte[8-11] 纬度(DWORD(32)) 以度为单位的纬度值乘以10^6,精确到百万分之一度 - ret.setLatitude(this.parseFloatFromBytes(data, 8, 4)); + ret.setLatitude(this.parseIntFromBytes(data, 8, 4) / 1000000.0f); // 4. byte[12-15] 经度(DWORD(32)) 以度为单位的经度值乘以10^6,精确到百万分之一度 - ret.setLongitude(this.parseFloatFromBytes(data, 12, 4)); + ret.setLongitude(this.parseIntFromBytes(data, 12, 4) / 1000000.0f); // 5. byte[16-17] 高程(WORD(16)) 海拔高度,单位为米( m) ret.setElevation(this.parseIntFromBytes(data, 16, 2)); // byte[18-19] 速度(WORD) 1/10km/h diff --git a/src/main/resources/static/index.html b/src/main/resources/static/index.html index e12ccba..89a240b 100644 --- a/src/main/resources/static/index.html +++ b/src/main/resources/static/index.html @@ -278,7 +278,7 @@
- {{ badge.location.lat.toFixed(4) }}, {{ badge.location.lon.toFixed(4) }} + {{ badge.location.lat.toFixed(6) }}, {{ badge.location.lon.toFixed(6) }}
-
GPS坐标
@@ -288,12 +288,12 @@
-
+
MAC: {{ ble.mac }} - RSSI: {{ ble.rssi }} + RSSI: {{ ble.rssi }} dBm
-
- +{{ badge.bluetooth.length - 2 }} 更多... +
+ +{{ badge.bluetooth.length - 4 }} 更多...