1、广西新发展增加倾角推送

This commit is contained in:
weidong 2025-08-15 10:51:03 +08:00
parent 74f50e47ba
commit 4aec3ec815
3 changed files with 32 additions and 1 deletions

View File

@ -47,4 +47,7 @@ public class GnssDeviceJoin {
Double latitude;
Double longitude;
Double roll;
Double pitch;
Double yaw;
}

View File

@ -117,6 +117,9 @@ public class Forwarder {
.selectAll(GnssDevice.class)
.select("d.latitude as latitude")
.select("d.longitude as longitude")
.select("d.roll as roll")
.select("d.pitch as pitch")
.select("d.yaw as yaw")
.leftJoin("gnssstatus d on t.deviceid = d.deviceid")
.and(warpper->warpper.eq("fwd_group_id", fwdGroupId)
.or()
@ -128,6 +131,9 @@ public class Forwarder {
.selectAll(GnssDevice.class)
.select("d.latitude as latitude")
.select("d.longitude as longitude")
.select("d.roll as roll")
.select("d.pitch as pitch")
.select("d.yaw as yaw")
.leftJoin("gnssstatus d on t.deviceid = d.deviceid")
.and(warpper->warpper.eq("fwd_group_id", fwdGroupId)
.or()
@ -141,6 +147,9 @@ public class Forwarder {
.selectAll(GnssDevice.class)
.select("d.latitude as latitude")
.select("d.longitude as longitude")
.select("d.roll as roll")
.select("d.pitch as pitch")
.select("d.yaw as yaw")
.leftJoin("gnssstatus d on t.deviceid = d.deviceid")
.and(warpper->warpper.eq("fwd_group_id", fwdGroupId)
.or()
@ -214,7 +223,11 @@ public class Forwarder {
// 用r9250来传设备经纬度
record.setR9250e(device.getLongitude());
record.setR9250n(device.getLatitude());
// 用aux来传基站经纬度
// 用aux来传xyz
record.setAuxe(device.getRoll());
record.setAuxn(device.getPitch());
record.setAuxd(device.getYaw());
recordsToSend.add(record);
break;
}

View File

@ -68,6 +68,21 @@ public class GXXfzForwarder extends Forwarder{
// 经纬度
data.setDevLng(locationRecord.getR9250e());
data.setDevLat(locationRecord.getR9250n());
//倾角
XFZData.Data data2 = new XFZData.Data();
dataList.add(data2);
data2.setDataTime(locationRecord.getCreatetime().format(formatter));
data2.setDevNum(locationRecord.getDeviceid());
data2.setDevtype("InclinoMeter");
// 角度
data2.setX(NumberUtils.scale(locationRecord.getAuxe(), 3));
data2.setY(NumberUtils.scale(locationRecord.getAuxn(), 3));
data2.setZ(NumberUtils.scale(locationRecord.getAuxd(), 3));
// 经纬度
data2.setDevLng(locationRecord.getR9250e());
data2.setDevLat(locationRecord.getR9250n());
// 发送
batchNum++;