|
|
|
@ -3,12 +3,13 @@
|
|
|
|
|
|
|
|
|
|
<div class="title">
|
|
|
|
|
<LeftOutlined @click="backPage" />
|
|
|
|
|
<div>面状航线</div>
|
|
|
|
|
<SaveOutlined @click="saveAirLine" />
|
|
|
|
|
|
|
|
|
|
<div style="flex:1;">
|
|
|
|
|
<a-input v-model:value="props.airLineForm.airLineName" size="middle" placeholder="航线名称" />
|
|
|
|
|
</div>
|
|
|
|
|
<!-- <div>面状航线</div> -->
|
|
|
|
|
<SaveOutlined @click="saveAirLine" style="font-size:20px;" />
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<!-- 数据统计 -->
|
|
|
|
@ -39,14 +40,14 @@
|
|
|
|
|
<div class="area-options" >
|
|
|
|
|
|
|
|
|
|
<div class="item">
|
|
|
|
|
<div class="label">参考起飞点
|
|
|
|
|
<div class="label">选择机场
|
|
|
|
|
<br/>
|
|
|
|
|
<span style="font-size:12px;color:#ccc;">( {{props.templateKmlConfig?.missionConfig.takeOffRefPoint}} )</span>
|
|
|
|
|
<span style="font-size:12px;color:#ccc;"> {{props.templateKmlConfig?.missionConfig.takeOffRefPoint}} </span>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="content">
|
|
|
|
|
<a-button type="link" style="color:#408eff" @click="setTakeOffPoint()">
|
|
|
|
|
<img src="./start-fly.png" style="width:24px;height:24px;position:relative;left:-2px;top:-2px;" alt="">
|
|
|
|
|
设置起飞点
|
|
|
|
|
选择机场
|
|
|
|
|
</a-button>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
@ -257,7 +258,7 @@ import JSZip from "jszip";
|
|
|
|
|
import { saveAs } from "file-saver";
|
|
|
|
|
import {templateStr} from '../waylineConfig/template'
|
|
|
|
|
// 航线计算
|
|
|
|
|
import {uavModel,calculateHeight,calculateGsd,calculateSpacing} from '../lib/calculateAirLine'
|
|
|
|
|
import {uavModel,calculateHeight,calculateGsd,calculateSpacing,calculateInterval} from '../lib/calculateAirLine'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const emits = defineEmits(["setTakeOffPoint","exitDraw","calculatParamChange"])
|
|
|
|
@ -328,12 +329,23 @@ watch(
|
|
|
|
|
{deep:true}
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 判断创建和编辑模式设置高度
|
|
|
|
|
if(props.editModel == 'edit'){
|
|
|
|
|
|
|
|
|
|
calculatParam.value.gsd = calculateGsd(props.templateKmlConfig.Folder.Placemark.height,uavModel['m4td']);
|
|
|
|
|
|
|
|
|
|
calculatParam.value.overlapAngle = props.templateKmlConfig.Folder.Placemark.direction;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 根据gsd 计算 航线高度
|
|
|
|
|
calculatParam.value.height = calculateHeight(calculatParam.value.gsd,uavModel['m4td']);
|
|
|
|
|
|
|
|
|
|
// 根据旁向重叠率就计算航线间距
|
|
|
|
|
calculatParam.value.spacing = calculateSpacing(calculatParam.value.gsd,calculatParam.value.overlapY/100,uavModel['m4td'])
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 监听gsd改变
|
|
|
|
|
const onGsdChange = ()=>{
|
|
|
|
|
calculatParam.value.height = calculateHeight(calculatParam.value.gsd,uavModel['m4td']);
|
|
|
|
@ -677,8 +689,8 @@ const handlerPointInfo = ()=>{
|
|
|
|
|
}
|
|
|
|
|
placemarkArray.push(point);
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
folder.value.Placemark = placemarkArray;
|
|
|
|
|
props.waylineWpmlConfig.Folder.Placemark = placemarkArray;
|
|
|
|
|
// folder.value.Placemark = placemarkArray;
|
|
|
|
|
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
@ -835,7 +847,8 @@ const convertXmlToKmz =async (templateXml,waylineXml)=>{
|
|
|
|
|
// 3. 生成 KMZ (ZIP) 文件
|
|
|
|
|
const kmzBlob = await zip.generateAsync({ type: "blob" });
|
|
|
|
|
|
|
|
|
|
saveAs(kmzBlob, "output.kmz");
|
|
|
|
|
// 下载航线文件
|
|
|
|
|
// saveAs(kmzBlob, "output.kmz");
|
|
|
|
|
|
|
|
|
|
return kmzBlob;
|
|
|
|
|
}
|
|
|
|
@ -921,8 +934,11 @@ const handlerHeightMode = () => {
|
|
|
|
|
};
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
handlerHeightMode();
|
|
|
|
|
|
|
|
|
|
// 获取地形数据
|
|
|
|
|
const getDEMData = () => {
|
|
|
|
|
|
|
|
|
@ -1009,7 +1025,10 @@ const handelrAirPoint = () => {
|
|
|
|
|
|
|
|
|
|
// 根据高度模式 设置高度
|
|
|
|
|
let height = 0;
|
|
|
|
|
// 设置速度
|
|
|
|
|
|
|
|
|
|
// 计算间隔时间
|
|
|
|
|
let spaceTime = (calculateInterval(calculatParam.value.gsd,calculatParam.value.overlapX/100,uavModel['m4td']) / props.templateKmlConfig.Folder.autoFlightSpeed)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 处理第1个航点
|
|
|
|
|
if(index == 0){
|
|
|
|
@ -1071,7 +1090,7 @@ const handelrAirPoint = () => {
|
|
|
|
|
"payloadPositionIndex": 0,
|
|
|
|
|
"useGlobalPayloadLensIndex": 0,
|
|
|
|
|
"payloadLensIndex": "visable",
|
|
|
|
|
"minShootInterval": 1.52472746372223
|
|
|
|
|
"minShootInterval":spaceTime
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
]
|
|
|
|
@ -1256,7 +1275,7 @@ const handelrAirPoint = () => {
|
|
|
|
|
"payloadPositionIndex": 0,
|
|
|
|
|
"useGlobalPayloadLensIndex": 0,
|
|
|
|
|
"payloadLensIndex": "visable",
|
|
|
|
|
"minShootInterval": 1.52472746372223
|
|
|
|
|
"minShootInterval": spaceTime
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
]
|
|
|
|
|