[change]修改点云解析
This commit is contained in:
@@ -5,7 +5,7 @@ import rule_segement.PointCloud;
|
||||
|
||||
/**
|
||||
* 点云数据解码器
|
||||
* 时间戳,lon,lat,alt,yaw,roll,patch,新增数据大小,id,x,y,z,强度,……,删除数据大小,id,x,y,z,强度,……
|
||||
* 时间戳,lon,lat,alt,yaw,roll,patch,新增数据大小,id,x,y,z,强度,……,删除数据大小,id,……
|
||||
* 如果add_data 没有数据 新增数据大小用-1表示
|
||||
* 如果del_data 没有数据 删除数据大小用-2表示
|
||||
* 如果又不存在的数会使用0.0补位
|
||||
@@ -58,7 +58,7 @@ public class PointCloudDecoder {
|
||||
}
|
||||
builder.append(d).append(",");
|
||||
int addSize = pointCloud.getAddDataCount() / NUMBER_OF_DATA;
|
||||
int delSize = pointCloud.getDelDataCount() / NUMBER_OF_DATA;
|
||||
int delSize = pointCloud.getDelDataCount();
|
||||
if (addSize == 0 && delSize == 0) {
|
||||
builder.append(-1).append(",").append(-2);
|
||||
} else {
|
||||
@@ -66,8 +66,8 @@ public class PointCloudDecoder {
|
||||
StringBuilder del = new StringBuilder();
|
||||
int i = 0;
|
||||
while (i < delSize || i < addSize) {
|
||||
int temp = i * NUMBER_OF_DATA;
|
||||
if (i < addSize) {
|
||||
int temp = i * NUMBER_OF_DATA;
|
||||
//目前没有id 默认插入0
|
||||
add.append(pointCloud.getAddData(temp++)).append(",");
|
||||
add.append(pointCloud.getAddData(temp++)).append(",");
|
||||
@@ -76,12 +76,7 @@ public class PointCloudDecoder {
|
||||
add.append(pointCloud.getAddData(temp)).append(",");
|
||||
}
|
||||
if (i < delSize) {
|
||||
temp = i * NUMBER_OF_DATA;
|
||||
del.append(pointCloud.getDelData(temp++)).append(",");
|
||||
del.append(pointCloud.getDelData(temp++)).append(",");
|
||||
del.append(pointCloud.getDelData(temp++)).append(",");
|
||||
del.append(pointCloud.getDelData(temp++)).append(",");
|
||||
del.append(pointCloud.getDelData(temp)).append(",");
|
||||
del.append(pointCloud.getDelData(i)).append(",");
|
||||
}
|
||||
i++;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user