feat:航线编辑接口新的航点动作保存
This commit is contained in:
parent
7d3d36eb0f
commit
b3cd8d8965
|
|
@ -173,20 +173,24 @@ public class WayPointUitls {
|
|||
case 5000: // 开始等时间隔拍照
|
||||
return String.format(Locale.US,
|
||||
"%d\t0\t3\t5000\t%s\t0\t%s\t0\t0\t0\t0.000000\t1",
|
||||
index, point.getPhotoTime(), point.getPhotoType());
|
||||
index,
|
||||
point.getPhotoTime() != null ? String.valueOf(point.getPhotoTime()) : "0",
|
||||
point.getPhotoType() != null ? String.valueOf(point.getPhotoType()) : "0");
|
||||
|
||||
case 6000: // 开始等间距隔拍照
|
||||
return String.format(Locale.US,
|
||||
"%d\t0\t3\t6000\t%s\t0\t%s\t0\t0\t0\t0.000000\t1",
|
||||
index, point.getPhotoDistance(), point.getPhotoType());
|
||||
index,
|
||||
point.getPhotoDistance() != null ? String.valueOf(point.getPhotoDistance()) : "0",
|
||||
point.getPhotoType() != null ? String.valueOf(point.getPhotoType()) : "0");
|
||||
|
||||
case 7000: // 结束间隔拍照
|
||||
return String.format(Locale.US,
|
||||
"%d\t0\t3\t7000\t0\t0\t0\t0\t0\t0\t0.000000\t1", index);
|
||||
"%d\t0\t3\t2501\t0\t0\t0\t0\t0\t0\t0.000000\t1", index);
|
||||
|
||||
case 8000: // 全景拍照
|
||||
return String.format(Locale.US,
|
||||
"%d\t0\t3\t8000\t0\t0\t0\t0\t0\t0\t0.000000\t1", index);
|
||||
"%d\t0\t3\t2501\t0\t0\t0\t0\t0\t0\t0.000000\t1", index);
|
||||
|
||||
default:
|
||||
throw new IllegalArgumentException("未知命令: " + point.getCommand());
|
||||
|
|
@ -314,9 +318,9 @@ public class WayPointUitls {
|
|||
"0", "0", 0,
|
||||
"0", "0", "0", "0",
|
||||
0, 0, 0,
|
||||
actionActuatorFuncParam.getPhotoTime(),
|
||||
actionActuatorFuncParam.getPhotoTime() != null ? Integer.parseInt(actionActuatorFuncParam.getPhotoTime()) : null,
|
||||
null,
|
||||
actionActuatorFuncParam.getPhotoType(),
|
||||
actionActuatorFuncParam.getPhotoType() != null ? Integer.parseInt(actionActuatorFuncParam.getPhotoType()) : null,
|
||||
null
|
||||
));
|
||||
break;
|
||||
|
|
@ -329,8 +333,8 @@ public class WayPointUitls {
|
|||
"0", "0", "0", "0",
|
||||
0, 0, 0,
|
||||
null,
|
||||
actionActuatorFuncParam.getPhotoDistance(),
|
||||
actionActuatorFuncParam.getPhotoType(),
|
||||
actionActuatorFuncParam.getPhotoDistance() != null ? Integer.parseInt(actionActuatorFuncParam.getPhotoDistance()) : null,
|
||||
actionActuatorFuncParam.getPhotoType() != null ? Integer.parseInt(actionActuatorFuncParam.getPhotoType()) : null,
|
||||
null
|
||||
));
|
||||
break;
|
||||
|
|
@ -386,7 +390,7 @@ public class WayPointUitls {
|
|||
public static AirLinePointDTO buildPoint(int command, String lat, String lon, int alt,
|
||||
String loiterTime, String cameraPitch, String cameraRoll, String cameraYaw,
|
||||
int sessionControl, int zoomAbsolute, int rotateDirection,
|
||||
String photoTime, String photoDistance, String photoType, String droneYaw) {
|
||||
Integer photoTime, Integer photoDistance, Integer photoType, String droneYaw) {
|
||||
AirLinePointDTO point = buildPoint(command, lat, lon, alt, loiterTime, cameraPitch, cameraRoll, cameraYaw,
|
||||
sessionControl, zoomAbsolute, rotateDirection);
|
||||
point.setPhotoTime(photoTime);
|
||||
|
|
|
|||
|
|
@ -79,17 +79,17 @@ public class AirLinePointDTO implements Serializable {
|
|||
/**
|
||||
* 间隔拍照时间(秒)- 命令5000
|
||||
*/
|
||||
private String photoTime;
|
||||
private Integer photoTime;
|
||||
|
||||
/**
|
||||
* 间隔拍照距离(米)- 命令6000
|
||||
*/
|
||||
private String photoDistance;
|
||||
private Integer photoDistance;
|
||||
|
||||
/**
|
||||
* 照片类型(数组1,2,3)- 命令5000/6000
|
||||
*/
|
||||
private String photoType;
|
||||
private Integer photoType;
|
||||
|
||||
/**
|
||||
* 飞行器偏航角 - 命令4000
|
||||
|
|
|
|||
Loading…
Reference in New Issue