|
@@ -39,7 +39,50 @@ public class AircraftLandSJ : AircraftEntity
|
|
|
{
|
|
|
Velocitys = new double[5] { 220, 220, 60, 110, 0 }; // 速度
|
|
|
|
|
|
- List<double[]> route = ContourSearch.ContourSearch1(SearchMissionMode.Poly, SearchMissionMode.interval,SearchMissionMode.MinLength, SearchMissionMode.TrueH, SearchMissionMode.JG, ContourSearch.DemHelper());
|
|
|
+
|
|
|
+ List<double[]> route = new List<double[]>();
|
|
|
+
|
|
|
+ if (SearchMissionMode.SearchMode == "扇形搜索")
|
|
|
+ {
|
|
|
+ List<double[]> trajectory = new List<double[]>();
|
|
|
+ foreach (var item in SearchMissionMode.Poly)
|
|
|
+ {
|
|
|
+ trajectory.Add(new double[]
|
|
|
+ {
|
|
|
+ item[1],item[0]
|
|
|
+ }) ;
|
|
|
+ }
|
|
|
+
|
|
|
+ var points = SeaSJ.getminEnclosingRect(trajectory);
|
|
|
+ var startPoint1 = new Point
|
|
|
+ {
|
|
|
+ lat = points[0][0] / 2 + points[1][0] / 2,
|
|
|
+ lon = points[0][1] / 2 + points[1][1] / 2
|
|
|
+ };
|
|
|
+ var startPoint2 = new Point
|
|
|
+ {
|
|
|
+ lat = points[2][0] / 2 + points[3][0] / 2,
|
|
|
+ lon = points[2][1] / 2 + points[3][1] / 2
|
|
|
+ };
|
|
|
+
|
|
|
+ var centerPoint = new Point
|
|
|
+ {
|
|
|
+ lat = startPoint1.lat / 2 + startPoint2.lat / 2,
|
|
|
+ lon = startPoint1.lon / 2 + startPoint2.lon / 2
|
|
|
+ };
|
|
|
+ List<Point> temp = SectorSearch.sectorSearch(centerPoint, 30, SearchMissionMode.SearchWidth);
|
|
|
+ foreach (Point point in temp)
|
|
|
+ {
|
|
|
+ route.Add(new double[]
|
|
|
+ {
|
|
|
+ point.lat, point.lon,
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }
|
|
|
+ else if (SearchMissionMode.SearchMode == "等高线搜索")
|
|
|
+ {
|
|
|
+ route = ContourSearch.ContourSearch1(SearchMissionMode.Poly, SearchMissionMode.interval, SearchMissionMode.MinLength, SearchMissionMode.TrueH, SearchMissionMode.JG, ContourSearch.DemHelper());
|
|
|
+ }
|
|
|
|
|
|
// route 转成 List<AirRoute>
|
|
|
List<AirRoute> airRoutes = new List<AirRoute>();
|