rain
2024-07-15 638408723ebbf884f59ecaafcaab1c29f69bc689
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
package com.dji.sample.patches.xml.mode.share.action.utils;
 
import com.dji.sample.patches.xml.mode.Folder;
import com.dji.sample.patches.xml.mode.WaylineCoordinateSysParam;
import com.dji.sample.patches.xml.mode.share.GlobalWaypointHeadingParam;
 
/**
 * @PROJECT_NAME: drone
 * @DESCRIPTION: 设置模板信息
 * @USER: aix
 * @DATE: 2024/3/29 10:25
 */
public class FolderUtils {
 
    public static Folder setFloder() {
        Folder folder = new Folder();
        folder.setPayloadParam(PayloadParamUtils.setPayloadParam());
        folder.setWaylineCoordinateSysParam(new WaylineCoordinateSysParam());
        folder.setTemplateType("waypoint");//航点模式
        folder.setTemplateId("0");
 
        WaylineCoordinateSysParam wcs = new WaylineCoordinateSysParam();
        wcs.setCoordinateMode("WGS84");
        wcs.setHeightMode("relativeToStartPoint");
 
        folder.setWaylineCoordinateSysParam(wcs);
        folder.setAutoFlightSpeed(10D);//全局航线飞行速度
        folder.setGlobalHeight(100D); //全局航线高度(相对起飞点高度)
        folder.setCaliFlightEnable(0);// 是否开启标定飞行
        folder.setGimbalPitchMode("manual");//云台俯仰角控制模式manual:手动控制。飞行器从一个航点飞向下一个航点的过程中,支持用户手动控制云台的俯仰角度。若无用户控制,则保持飞离航点时的云台俯仰角度。 usePointSetting:依照每个航点设置。飞行器从一个航点飞向下一个航点的过程中,云台俯仰角均匀过渡至下一个航点的俯仰角。
 
        //
        GlobalWaypointHeadingParam gwhp = new GlobalWaypointHeadingParam();
        gwhp.setWaypointHeadingMode("followWayline");
        gwhp.setWaypointHeadingAngle(0);
        gwhp.setWaypointPoiPoint("0.000000,0.000000,0.000000");
        gwhp.setWaypointHeadingPathMode("followBadArc");
        gwhp.setWaypointHeadingPoiIndex("0");
 
        folder.setGlobalWaypointHeadingParam(gwhp);
        folder.setGlobalWaypointTurnMode("toPointAndStopWithDiscontinuityCurvature");
        folder.setGlobalUseStraightLine(1);
 
        return folder;
    }
 
}