|
@@ -163,7 +163,7 @@ public class TGdbhGdServiceImpl implements ITGdbhGdService {
|
|
|
|
|
|
@Override
|
|
|
public List<TGdbhFlightBatchDto> uavQuery(TGdbhFlightBatchDto tGdbhFlightBatchDto) {
|
|
|
- List<TGdbhFlightBatchDto> bathDtos = tGdbhFlightBatchMapper.selectList();
|
|
|
+ List<TGdbhFlightBatchDto> bathDtos = tGdbhFlightBatchMapper.selectList(tGdbhFlightBatchDto);
|
|
|
for (TGdbhFlightBatchDto bathDto : bathDtos) {
|
|
|
if (StringUtils.isNotEmpty(bathDto.getBatch())) {
|
|
|
String fpfPath = "/gdbh/flight/batch_video/" + bathDto.getBatch().trim() + ".fpf";
|
|
@@ -222,40 +222,38 @@ public class TGdbhGdServiceImpl implements ITGdbhGdService {
|
|
|
writer.newLine(); // 写入换行
|
|
|
writer.write("</style>");
|
|
|
writer.newLine(); // 写入换行
|
|
|
+ int len = flightDtoList.size();
|
|
|
for (int i = 0; i < flightDtoList.size(); i++) {
|
|
|
TGdbhFlightDto dto = flightDtoList.get(i);
|
|
|
+ if (i > 0 && i + 1 < len) {
|
|
|
+ TGdbhFlightDto dto_qian = flightDtoList.get(i - 1);
|
|
|
+ TGdbhFlightDto dto_hou = flightDtoList.get(i + 1);
|
|
|
+ Double dr_qian = Double.valueOf(tGdbhFlightMapper.stAzimuth(dto.getLongitude(), dto.getLatitude(), dto_qian.getLongitude(), dto_qian.getLatitude()));
|
|
|
+ Double dr_hou = Double.valueOf(tGdbhFlightMapper.stAzimuth(dto_hou.getLongitude(), dto_hou.getLatitude(), dto.getLongitude(), dto.getLatitude()));
|
|
|
+// System.out.println("dr_qian:" + dr_qian);
|
|
|
+// System.out.println("dr_hou:" + dr_hou);
|
|
|
+ Double dr = Math.abs(dr_hou - dr_qian);
|
|
|
+ if (dr > 10) {
|
|
|
+ tilt = "0.100000000000000006";
|
|
|
+ }
|
|
|
+ if (i > 3) {
|
|
|
+ TGdbhFlightDto dto_pingxing2 = flightDtoList.get(i - 2);
|
|
|
+ TGdbhFlightDto dto_pingxing3 = flightDtoList.get(i - 3);
|
|
|
+ Double dr_pingxing = Double.valueOf(tGdbhFlightMapper.stAzimuth(dto_pingxing3.getLongitude(), dto_pingxing3.getLatitude(), dto_pingxing2.getLongitude(), dto_pingxing2.getLatitude()));
|
|
|
+ Double dr_px = Math.abs(dr_qian - dr_pingxing);
|
|
|
+ if (dr_px > 160) {
|
|
|
+ tilt = "0.100000000000000006";
|
|
|
+ heading = (360 - Double.parseDouble(heading)) + "";
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
String height = dto.getHeight();
|
|
|
if (null != tGdbhFlightBatchDto) {
|
|
|
if (StringUtils.isNotEmpty(tGdbhFlightBatchDto.getHeight())) {
|
|
|
height = tGdbhFlightBatchDto.getHeight();
|
|
|
}
|
|
|
}
|
|
|
- String fpf = "<routestop name=\"" + dto.getPhoto_name() + "\" speed=\"0\" excluded=\"False\" viewType=\"camera\">" +
|
|
|
- "<camera>" +
|
|
|
- "<longitude>" + dto.getLongitude() + "</longitude>" +
|
|
|
- "<latitude>" + dto.getLatitude() + "</latitude>" +
|
|
|
- "<altitude>" + height + "</altitude>" +
|
|
|
- "<heading>" + heading + "</heading>" +
|
|
|
- "<tilt>" + tilt + "</tilt>" +
|
|
|
- "<altitudeMode>Absolute</altitudeMode>" +
|
|
|
- "</camera>" +
|
|
|
- "<style>" +
|
|
|
- "<geostyle3d>" +
|
|
|
- "<icon/>" +
|
|
|
- "<markersize>4.8</markersize>" +
|
|
|
- "<markericonscale>1</markericonscale>" +
|
|
|
- "<markercolor>RGBA(255,255,255,255)</markercolor>" +
|
|
|
- "</geostyle3d>" +
|
|
|
- "</style>" +
|
|
|
- "<setting>" +
|
|
|
- "<turnTime>1.5</turnTime>" +
|
|
|
- "<turnSlowly>False</turnSlowly>" +
|
|
|
- "<stopPlayMode>StopPause</stopPlayMode>" +
|
|
|
- "<autoPlay>False</autoPlay>" +
|
|
|
- "<pauseTime>0</pauseTime>" +
|
|
|
- "<angularSpeed>1</angularSpeed>" +
|
|
|
- "</setting>" +
|
|
|
- "</routestop>";
|
|
|
+ String fpf = "<routestop name=\"" + dto.getPhoto_name() + "\" speed=\"0\" excluded=\"False\" viewType=\"camera\">" + "<camera>" + "<longitude>" + dto.getLongitude() + "</longitude>" + "<latitude>" + dto.getLatitude() + "</latitude>" + "<altitude>" + height + "</altitude>" + "<heading>" + heading + "</heading>" + "<tilt>" + tilt + "</tilt>" + "<altitudeMode>Absolute</altitudeMode>" + "</camera>" + "<style>" + "<geostyle3d>" + "<icon/>" + "<markersize>4.8</markersize>" + "<markericonscale>1</markericonscale>" + "<markercolor>RGBA(255,255,255,255)</markercolor>" + "</geostyle3d>" + "</style>" + "<setting>" + "<turnTime>1.5</turnTime>" + "<turnSlowly>False</turnSlowly>" + "<stopPlayMode>StopPause</stopPlayMode>" + "<autoPlay>False</autoPlay>" + "<pauseTime>0</pauseTime>" + "<angularSpeed>1</angularSpeed>" + "</setting>" + "</routestop>";
|
|
|
writer.write(fpf);
|
|
|
writer.newLine(); // 写入换行
|
|
|
}
|