|
|
@@ -423,6 +423,15 @@ public class SDKDeviceService extends AbstractDeviceService {
|
|
|
flightTaskService.addHomePoint(flightTrackEntity);
|
|
|
}
|
|
|
|
|
|
+ int showPoint = 0;
|
|
|
+ if(lastPoint.isPresent()
|
|
|
+ && 0 == lastPoint.get().getShowPoint()
|
|
|
+ && lastPoint.get().getAttitudeHead() != null
|
|
|
+ && data.getAttitudeHead() != null
|
|
|
+ && Math.abs(data.getAttitudeHead() - lastPoint.get().getAttitudeHead()) >= 30) {
|
|
|
+ showPoint = 1;
|
|
|
+ }
|
|
|
+
|
|
|
//添加轨迹信息
|
|
|
FlightTrackEntity flightTrackEntity = FlightTrackEntity.builder()
|
|
|
.taskId(task.getId())
|
|
|
@@ -431,6 +440,8 @@ public class SDKDeviceService extends AbstractDeviceService {
|
|
|
.latitude(data.getLatitude().doubleValue())
|
|
|
.altitude(data.getHeight().doubleValue())
|
|
|
.elevation(data.getElevation().doubleValue())
|
|
|
+ .attitudeHead(data.getAttitudeHead().intValue())
|
|
|
+ .showPoint(showPoint)
|
|
|
.type(FlightPointTypeEnum.HAND.getType())
|
|
|
.createTime(System.currentTimeMillis()).build();
|
|
|
flightTaskService.addFlightPoint(flightTrackEntity);
|