Skip to main content

限飞禁飞区管理

interface IFlyZoneManager​

描述: 限飞禁飞区管理器:周边禁飞区查询与监听、授权区下载/上传/删除、电子围栏导入与推送、可飞区国家码与刷新、热区、龙鱼固定/临时/导入禁飞区及上传等。适用于 MSDK 3.0。

method getFlyZonesInSurroundingArea​

fun getFlyZonesInSurroundingArea(location: LocationCoordinate2D, callback)

描述: 获取距离中心位置约 100 公里范围内的禁飞区(固定、临时、电子围栏)

输入参数: location 中心位置,callback 返回 FlyZoneInformation 列表可空

输出参数: 无

method addFlyZoneListener / removeFlyZoneListener / clearFlyZoneListener​

fun addFlyZoneListener(callback)
fun removeFlyZoneListener(callback)
fun clearFlyZoneListener()

描述: 添加/移除/清空禁飞区监听

输入参数: callback

输出参数: 无

method downloadAuthFlyZoneFromServer​

fun downloadAuthFlyZoneFromServer(aircraftSN: String, location: LocationCoordinate2D, callback)
fun downloadAuthFlyZoneFromServer(aircraftSN: String, token: String, location: LocationCoordinate2D, callback)

描述: 从服务器获取指定飞机授权区信息

输入参数: aircraftSN、location、可选 token、callback

输出参数: 无

method pushAuthFlyZoneToAircraft / getAuthFlyZone / deleteAuthFlyZoneFromAircraft​

fun pushAuthFlyZoneToAircraft(drone: IAutelDroneDevice, callback)
fun getAuthFlyZone(aircraftSN: String, callback)
fun deleteAuthFlyZoneFromAircraft(drone: IAutelDroneDevice, callback)

描述: 将授权区上传至飞行器、获取授权区、删除飞行器授权信息

输入参数: drone 或 aircraftSN、callback

输出参数: 无

method importFlySafeDynamicDatabaseToMSDK / getFlySafeDynamicDataVersion / pushFlySafeDynamicDatabaseToAircraft​

fun importFlySafeDynamicDatabaseToMSDK(filePath: String, callback)
fun getFlySafeDynamicDataVersion(): String
fun pushFlySafeDynamicDatabaseToAircraft(callback)

描述: 将地理感知数据库导入 MSDK(当前支持欧盟)、获取数据库版本、推送至飞控

输入参数: filePath(导入时)、callback

输出参数: getFlySafeDynamicDataVersion 返回 String

method getAircraftFlyZoneCountryCode / refreshFlyZone​

fun getAircraftFlyZoneCountryCode(aircraftSN: String, callback)
fun refreshFlyZone()

描述: 获取飞行器可飞区国家码;飞机激活后需调用 refreshFlyZone 刷新可飞区

输入参数: aircraftSN、callback(前者)

输出参数: 无

method getHotZoneCountryCode / isHotZoneCountry​

fun getHotZoneCountryCode(callback)
fun isHotZoneCountry(countryCode: String): Boolean

描述: 获取热区国家码列表;判断当前国家码是否为热区

输入参数: callback 或 countryCode

输出参数: isHotZoneCountry 返回 Boolean

method getFixedNoFlyZone / getTempNoFlyZone / getImportNoFlyZone​

fun getFixedNoFlyZone(location, callback)
fun getTempNoFlyZone(location, callback)
fun getImportNoFlyZone(callback)

描述: 龙鱼:获取周边固定禁飞区、临时禁飞区、已导入电子围栏

输入参数: location(前两个)、callback

输出参数: 无

method writeNoFlyZoneFile / uploadNoFlyZoneToAircraft​

fun writeNoFlyZoneFile(filePath, fileType, flyZoneInformation, authZoneInformation, callback)
fun uploadNoFlyZoneToAircraft(filePath, aircraftSN, fileType, callback)

描述: 上传禁飞区到飞机(写文件/按路径上传)

输入参数: filePath、fileType、flyZoneInformation/authZoneInformation 或 aircraftSN、callback

输出参数: 无