| | |
| | | package com.ard.route.util; |
| | | |
| | | import com.ard.route.domain.djuav.UavRouteReq; |
| | | |
| | | import java.io.*; |
| | | import java.time.LocalDateTime; |
| | | import java.time.format.DateTimeFormatter; |
| | |
| | | return Integer.valueOf(parts[1]); |
| | | } |
| | | |
| | | /** |
| | | * 截取字符串 |
| | | * 获取经纬度 |
| | | */ |
| | | public static Double getDoublePoint(String str,String type) { |
| | | String[] parts = str.split(","); |
| | | if ("lon".equals(type)) { |
| | |
| | | return null; |
| | | } |
| | | |
| | | /** |
| | | * 获取航线类型方法 |
| | | */ |
| | | public static String templateTypeData(UavRouteReq uavRouteReq) { |
| | | if ("waypoint".equals(uavRouteReq.getTemplateType())){ |
| | | return "0"; |
| | | } |
| | | return "1"; |
| | | } |
| | | |
| | | /** |
| | | * 获取无人机类型方法 |
| | | */ |
| | | public static String droneTypeData(UavRouteReq uavRouteReq) { |
| | | return "0-" + uavRouteReq.getDroneType() + "-0"; |
| | | } |
| | | |
| | | } |