1. 航线管理
无人机私有化平台
  • 设备管理
    • 设备列表
      GET
    • 设备实时推送详情信息字段说明
      GET
    • 动作日志列表(无分页)
      POST
  • 媒体库
    • 获取不同无人机媒体文件
      GET
    • fileId获取文件url
      GET
    • 获取目录
      GET
    • 获取bucketName
      GET
    • 获取文件url
      GET
  • 远程调试
    • 开启远程调试
      POST
    • 关闭远程调试
      POST
    • 机场重启
      POST
  • 航线管理
    • 取消任务
      DELETE
    • 暂停或恢复航线任务
      PUT
    • 修改航线任务
      POST
    • 上传航线文件
      POST
    • 派发/执行无人机任务
      POST
    • 航线文件列表
      GET
    • 航线任务列表
      GET
    • 取消航线任务
      DELETE
    • 生成航线文件
      POST
    • 编辑航线文件
      POST
    • 解析航线文件
      POST
    • 媒体文件列表
      GET
    • 获取单个文件url
      GET
  • 飞控
    • 负载控制-设置录像保存格式
      POST
    • 负载控制-设置拍照保存格式
      POST
    • 负载控制—画面拖动控制
      POST
    • 3.一键起飞
      POST
    • 飞行控制权抢夺
      POST
    • 1.进入指令飞行控制模式
      POST
    • 1.负载设备控制权抢夺
      POST
    • 2.获取Drc模式MqttBroker
      POST
    • 负载设备控制-开始拍照
      POST
    • 负载控制-框选变焦
      POST
    • 2.负载控制—切换相机模式
      POST
    • 负载控制—开始录像
      POST
    • 负载控制—停止录像
      POST
    • 负载控制—双击成为 AIM
      POST
    • 负载控制—变焦
      POST
    • 负载控制—重置云台
      POST
    • 一键返航
      GET
    • 取消返航
      POST
    • 退出指令飞行控制模式
      POST
    • 飞向目标点
      POST
  • 远程日志
    • 获取指定设备的日志文件列表
  • 固件升级
    • 固件升级
  • HMS 管理
  • 直播视频
    • 1.验证直播能力
    • 2.开始直播
    • 3.停止直播
    • 设置直播清晰度
    • 设置直播镜头
    • 回放视频文件分页列表
  • AI预警
    • AI预警分页列表
    • 上传视频文件测试AI功能
  • 海康摄像头对接
    • 摄像头树状列表
    • 云台控制
    • 获取视频流url
    • 获取回放视频流
    • 获取对讲url
  • 取用水管理
    • 新增计划
    • 查询详情
    • 获取工程列表
    • 工程实际对比
    • 取用水统计
  • 喊话器
    • 上传MP3文件
    • 喊话器mp3文件列表
    • 喊话器-开始播放音频
    • psdk-设置控件值
    • psdk-发送文本框内容
    • 喊话器-开始播放TTS文本
    • 喊话器-重新播放
    • 喊话器-停止播放
    • 喊话器-设置播放模式
    • 喊话器-设置音量
  • AI识别
    • ai视频流识别
    • ai mp4识别
  • 登录
    POST
  • 查询直播状态
    GET
  1. 航线管理

编辑航线文件

开发中
POST
/control/api/v1/kmz/updateKmz

请求参数

Body 参数application/json

示例
{
    //航线文件名称
  "routeName":"",
  //航线文件ID
  "wayLineFileId":"18",
  //航线类型
  "templateType": "mapping2d",
  //参考起飞点
  "takeOffRefPoint": "22.581115,113.940282,16.035026",
  //无人机类型
  "droneType": 91,
  //无人机子类型
  "subDroneType": 1,
  //负载类型
  "payloadType": 81,
  //负载挂载位置
  "payloadPosition": 0,
  /**
    负载图片存储类型
    wide:存储广角镜头照片
    zoom:存储变焦镜头照片
    ir:存储红外镜头照片
    narrow_band: 存储窄带镜头拍摄照片
    visable:可见光照片
    字典:image_format_type
  */
  "imageFormat": "visable,ir",
  /**
  航线结束动作
  goHome:飞行器完成航线任务后,退出航线模式并返航。noAction:飞行器完成航线任务后,退出航线模式。
  autoLand:飞行器完成航线任务后,退出航线模式并原地降落。
  gotoFirstWaypoint:飞行器完成航线任务后,立即飞向航线起始点,到达后退出航线模式。* 注:以上动作执行过程,若飞行器退出了航线模式且进入失控状态,则会优先执行失控动作。
  字典:finish_action_type
  */
  "finishAction": "autoLand",
  /**
  失控动作
  goBack:返航。飞行器从失控位置飞向起飞点
  landing:降落。飞行器从失控位置原地降落
  hover:悬停。飞行器从失控位置悬停
  字典:exit_on_rc_lost_action_type
  */
  "exitOnRcLostAction": "goBack",
  //全局航线高度
  "globalHeight": 100,
  //全局航线飞行速度
  "autoFlightSpeed": 10,
  //全局偏航角模式(默认值)
  "waypointHeadingReq": {
    "waypointHeadingMode": "followWayline"
  },
  //全局航点转弯模式
  "waypointTurnReq": {
    /**
    coordinateTurn:协调转弯,不过点,提前转弯
    toPointAndStopWithDiscontinuityCurvature:直线飞行,飞行器到点停
    toPointAndStopWithContinuityCurvature:曲线飞行,飞行器到点停
    toPointAndPassWithContinuityCurvature:曲线飞行,飞行器过点不停
    字典:waypoint_turn_mode_type
    */
    "waypointTurnMode": "toPointAndStopWithDiscontinuityCurvature"
  },
  /**
  云台俯仰角控制模式
  manual:手动控制。飞行器从一个航点飞向下一个航点的过程中,支持用户手动控制云台的俯仰角度。若无用户控制,则保持飞离航点时的云台俯仰角度。
  usePointSetting:依照每个航点设置。飞行器从一个航点飞向下一个航点的过程中,云台俯仰角均匀过渡至下一个航点的俯仰角。
  字典:gimbal_pitch_mode_type
  */
  "gimbalPitchMode": "usePointSetting",
  //建图航拍、倾斜摄影、航带飞行模板参数
  "mappingTypeReq": {
    //采集方式
    "collectionMethod": "camera",
    //镜头类型
    "lensType": "ortho",
    //航向重叠率
    "overlapH": 80,
    //旁向重叠率
    "overlapW": 70,
    //是否开启高程优化
    "elevationOptimizeEnable": 1,
    //拍照模式  字典:shoot_type * 注:建议使用“time”等时间拍照。在template.kml文件中定义“拍照模式”、“重叠率”和“飞行速度”,计算后得出间隔时间或间隔距离距离写入waylines.wpml中。
    "shootType": "time",
    //航线方向
    //[0, 360]
    "direction": 89,
    //测区外扩距离
    "margin": 0,
    //测区多边形坐标  经度,纬度,高度
    "coordinates": [
      {
        //经度
        "longitude": 113.940334790292,
        //纬度
        "latitude": 22.5798256945836,
        //高度
        "height": 0
      },
      {
        "longitude": 113.943015351291,
        "latitude": 22.5798490554135,
        "height": 0
      },
      {
        "longitude": 113.942911397786,
        "latitude": 22.5816299613237,
        "height": 0
      },
      {
        "longitude": 113.940344598963,
        "latitude": 22.5816387784883,
        "height": 0
      }
    ]
  },
  //航线初始动作列表
  "startActionList": [
    {
        //动作编号
      "actionIndex": 0,
      //云台偏航角
      "gimbalYawRotateAngle": -90
    },
    {
        // //动作编号
      "actionIndex": 1,
      //飞行器悬停等待时间
      "hoverTime": 0.5
    }
  ],
  //航点列表
  "routePointList": [
    {
        //航点编号
      "routePointIndex": 0,
      //经度
      "longitude": 113.940343144377,
      //纬度
      "latitude": 22.5813699888658,
      //等时拍照间隔时间 单位s
      "timeInterval": 2,
      //停止间隔拍照航点编号
      "endIntervalRouteIndex": 10,
      //航点动作列表
      "actions": [
        {
            //动作编号
          "actionIndex": 0,
          //普通拍照:0,全景拍照:1 字典:take_photo_type
          "takePhotoType": 0,
          //是否使用全局拍照模式 0:不使用 1:使用  字典:use_global_image_format
          "useGlobalImageFormat": 1
        }
      ]
    },
    {
      "routePointIndex": 1,
      "longitude": 113.942924142576,
      "latitude": 22.5814115656784
    },
    {
      "routePointIndex": 2,
      "longitude": 113.942943025065,
      "latitude": 22.5810880647388
    },
    {
      "routePointIndex": 3,
      "longitude": 113.940341392538,
      "latitude": 22.5810461555712
    },
    {
      "routePointIndex": 4,
      "longitude": 113.940339640707,
      "latitude": 22.5807223222765
    },
    {
      "routePointIndex": 5,
      "longitude": 113.942961907465,
      "latitude": 22.5807645637969
    },
    {
      "routePointIndex": 6,
      "longitude": 113.942980789776,
      "latitude": 22.5804410628529
    },
    {
      "routePointIndex": 7,
      "longitude": 113.940337888885,
      "latitude": 22.5803984889819
    },
    {
      "routePointIndex": 8,
      "longitude": 113.940336137071,
      "latitude": 22.5800746556873
    },
    {
      "routePointIndex": 9,
      "longitude": 113.942997724328,
      "latitude": 22.5801175305482
    },
    {
      "routePointIndex": 10,
      "longitude": 113.942999671999,
      "latitude": 22.5801175619067
    },
    {
      "routePointIndex": 11,
      "longitude": 113.941647829558,
      "latitude": 22.580729324342
    }
  ]
}

请求示例代码

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location '/control/api/v1/kmz/updateKmz' \
--header 'Content-Type: application/json' \
--data '{
    //航线文件名称
  "routeName":"",
  //航线文件ID
  "wayLineFileId":"18",
  //航线类型
  "templateType": "mapping2d",
  //参考起飞点
  "takeOffRefPoint": "22.581115,113.940282,16.035026",
  //无人机类型
  "droneType": 91,
  //无人机子类型
  "subDroneType": 1,
  //负载类型
  "payloadType": 81,
  //负载挂载位置
  "payloadPosition": 0,
  /**
    负载图片存储类型
    wide:存储广角镜头照片
    zoom:存储变焦镜头照片
    ir:存储红外镜头照片
    narrow_band: 存储窄带镜头拍摄照片
    visable:可见光照片
    字典:image_format_type
  */
  "imageFormat": "visable,ir",
  /**
  航线结束动作
  goHome:飞行器完成航线任务后,退出航线模式并返航。noAction:飞行器完成航线任务后,退出航线模式。
  autoLand:飞行器完成航线任务后,退出航线模式并原地降落。
  gotoFirstWaypoint:飞行器完成航线任务后,立即飞向航线起始点,到达后退出航线模式。* 注:以上动作执行过程,若飞行器退出了航线模式且进入失控状态,则会优先执行失控动作。
  字典:finish_action_type
  */
  "finishAction": "autoLand",
  /**
  失控动作
  goBack:返航。飞行器从失控位置飞向起飞点
  landing:降落。飞行器从失控位置原地降落
  hover:悬停。飞行器从失控位置悬停
  字典:exit_on_rc_lost_action_type
  */
  "exitOnRcLostAction": "goBack",
  //全局航线高度
  "globalHeight": 100,
  //全局航线飞行速度
  "autoFlightSpeed": 10,
  //全局偏航角模式(默认值)
  "waypointHeadingReq": {
    "waypointHeadingMode": "followWayline"
  },
  //全局航点转弯模式
  "waypointTurnReq": {
    /**
    coordinateTurn:协调转弯,不过点,提前转弯
    toPointAndStopWithDiscontinuityCurvature:直线飞行,飞行器到点停
    toPointAndStopWithContinuityCurvature:曲线飞行,飞行器到点停
    toPointAndPassWithContinuityCurvature:曲线飞行,飞行器过点不停
    字典:waypoint_turn_mode_type
    */
    "waypointTurnMode": "toPointAndStopWithDiscontinuityCurvature"
  },
  /**
  云台俯仰角控制模式
  manual:手动控制。飞行器从一个航点飞向下一个航点的过程中,支持用户手动控制云台的俯仰角度。若无用户控制,则保持飞离航点时的云台俯仰角度。
  usePointSetting:依照每个航点设置。飞行器从一个航点飞向下一个航点的过程中,云台俯仰角均匀过渡至下一个航点的俯仰角。
  字典:gimbal_pitch_mode_type
  */
  "gimbalPitchMode": "usePointSetting",
  //建图航拍、倾斜摄影、航带飞行模板参数
  "mappingTypeReq": {
    //采集方式
    "collectionMethod": "camera",
    //镜头类型
    "lensType": "ortho",
    //航向重叠率
    "overlapH": 80,
    //旁向重叠率
    "overlapW": 70,
    //是否开启高程优化
    "elevationOptimizeEnable": 1,
    //拍照模式  字典:shoot_type * 注:建议使用“time”等时间拍照。在template.kml文件中定义“拍照模式”、“重叠率”和“飞行速度”,计算后得出间隔时间或间隔距离距离写入waylines.wpml中。
    "shootType": "time",
    //航线方向
    //[0, 360]
    "direction": 89,
    //测区外扩距离
    "margin": 0,
    //测区多边形坐标  经度,纬度,高度
    "coordinates": [
      {
        //经度
        "longitude": 113.940334790292,
        //纬度
        "latitude": 22.5798256945836,
        //高度
        "height": 0
      },
      {
        "longitude": 113.943015351291,
        "latitude": 22.5798490554135,
        "height": 0
      },
      {
        "longitude": 113.942911397786,
        "latitude": 22.5816299613237,
        "height": 0
      },
      {
        "longitude": 113.940344598963,
        "latitude": 22.5816387784883,
        "height": 0
      }
    ]
  },
  //航线初始动作列表
  "startActionList": [
    {
        //动作编号
      "actionIndex": 0,
      //云台偏航角
      "gimbalYawRotateAngle": -90
    },
    {
        // //动作编号
      "actionIndex": 1,
      //飞行器悬停等待时间
      "hoverTime": 0.5
    }
  ],
  //航点列表
  "routePointList": [
    {
        //航点编号
      "routePointIndex": 0,
      //经度
      "longitude": 113.940343144377,
      //纬度
      "latitude": 22.5813699888658,
      //等时拍照间隔时间 单位s
      "timeInterval": 2,
      //停止间隔拍照航点编号
      "endIntervalRouteIndex": 10,
      //航点动作列表
      "actions": [
        {
            //动作编号
          "actionIndex": 0,
          //普通拍照:0,全景拍照:1 字典:take_photo_type
          "takePhotoType": 0,
          //是否使用全局拍照模式 0:不使用 1:使用  字典:use_global_image_format
          "useGlobalImageFormat": 1
        }
      ]
    },
    {
      "routePointIndex": 1,
      "longitude": 113.942924142576,
      "latitude": 22.5814115656784
    },
    {
      "routePointIndex": 2,
      "longitude": 113.942943025065,
      "latitude": 22.5810880647388
    },
    {
      "routePointIndex": 3,
      "longitude": 113.940341392538,
      "latitude": 22.5810461555712
    },
    {
      "routePointIndex": 4,
      "longitude": 113.940339640707,
      "latitude": 22.5807223222765
    },
    {
      "routePointIndex": 5,
      "longitude": 113.942961907465,
      "latitude": 22.5807645637969
    },
    {
      "routePointIndex": 6,
      "longitude": 113.942980789776,
      "latitude": 22.5804410628529
    },
    {
      "routePointIndex": 7,
      "longitude": 113.940337888885,
      "latitude": 22.5803984889819
    },
    {
      "routePointIndex": 8,
      "longitude": 113.940336137071,
      "latitude": 22.5800746556873
    },
    {
      "routePointIndex": 9,
      "longitude": 113.942997724328,
      "latitude": 22.5801175305482
    },
    {
      "routePointIndex": 10,
      "longitude": 113.942999671999,
      "latitude": 22.5801175619067
    },
    {
      "routePointIndex": 11,
      "longitude": 113.941647829558,
      "latitude": 22.580729324342
    }
  ]
}'

返回响应

🟢200成功
application/json
Bodyapplication/json

示例
{}
🟠404失败
修改于 2025-12-22 07:13:47
上一页
生成航线文件
下一页
解析航线文件
Built with