Skip to main content

IFlyZoneManager

IFlyZoneManager

Description The drone fly zone management mainly includes no-fly zone management, authorized zone management, and flyable zone management. No-fly zones are further divided into global fixed no-fly zones, temporary no-fly zones, and geofences (currently only supports JSON files conforming to the ED-269 standard). The SDK implements functions related to fly zones and provides interfaces that comply with laws and regulations for external use.

method getFlyZonesInSurroundingArea

fun getFlyZonesInSurroundingArea(
location: LocationCoordinate2D,
callback: CommonCallbacks.CompletionCallbackWithParam<List<FlyZoneInformation>?>
)

Description: Get no-fly zones within a 100-kilometer radius from the center location, including fixed no-fly zones, temporary no-fly zones, and geofences.

Input Parameters: location Center location

Input Parameters: callback Result callback

Output Parameters: None

Related Parameters: LocationCoordinate2D, FlyZoneInformation, FlyZoneCategory, FlyZoneShape

/**
* Location coordinate class
*/
data class LocationCoordinate2D(
val latitude: Double, // Latitude
val longitude: Double // Longitude
)

/**
* Fly zone shape type. Includes circular and polygonal.
*/
enum class FlyZoneShape(val type: Int) {
UNKNOWN(-1),

/**
* Circular
*/
CIRCLE(0),

/**
* Polygonal
*/
POLYGON(1),
;
}

method downloadAuthFlyZoneFromServer

fun downloadAuthFlyZoneFromServer(
aircraftSN: String,
token: String,
location: LocationCoordinate2D,
callback: CommonCallbacks.CompletionCallbackWithParam<List<FlyZoneAuthInformation>?>
)

Description: Retrieve specified aircraft authorization zone information from the server.

Input Parameters: aircraftSN Aircraft serial number

Input Parameters: token Token, obtained from the server during login, can be left blank if not available

Input Parameters: location Center location

Input Parameters: callback Result callback

Output Parameters: None

Related Parameters: LocationCoordinate2D, FlyZoneAuthInformation

method importFlySafeDynamicDatabaseToMSDK

fun importFlySafeDynamicDatabaseToMSDK(
filePath: String,
callback: CommonCallbacks.CompletionCallbackWithParam<List<FlyZoneInformation>>
)

Description: Import the flight geofencing database into the MSDK. Currently, only EU geofencing data is supported. Geofencing data can be downloaded from the European Union Aviation Safety Agency website.

Input Parameters: filePath Data file path, the data file must be in JSON format and conform to the ED-269 standard.

Input Parameters: callback Result callback

Output Parameters: None

Related Parameters: FlyZoneInformation

method getFlySafeDynamicDataVersion

fun getFlySafeDynamicDataVersion(): String

Description: Get the version of the flight geofencing database. If not available, return empty.

Input Parameters: None

Output Parameters: Flight geofencing database version

Related Parameters: None

method getTempNoFlyZone

fun getTempNoFlyZone(
location: LocationCoordinate2D,
callback: CommonCallbacks.CompletionCallbackWithParam<List<FlyZoneInformation>>
)

Description: Get temporary no-fly zone information

Input Parameters: location Aircraft's latitude and longitude information

Input Parameters: callback Result callback

Output Parameters: None

Related Parameters: FlyZoneInformation

method getFixedNoFlyZone

fun getFixedNoFlyZone(
location: LocationCoordinate2D,
callback: CommonCallbacks.CompletionCallbackWithParam<List<FlyZoneInformation>>
)

Description: Get fixed no-fly zones within a 100-kilometer radius from the center location

Input Parameters: location Aircraft's latitude and longitude information

Input Parameters: callback Result callback

Output Parameters: None

Related Parameters: FlyZoneInformation

method getImportNoFlyZone

fun getFixedNoFlyZone(callback: CommonCallbacks.CompletionCallbackWithParam<List<FlyZoneInformation>>)

Description: Get imported geofence information

Input Parameters: callback Result callback

Output Parameters: None

Related Parameters: FlyZoneInformation

method writeNoFlyZoneFile

fun writeNoFlyZoneFile(
filePath: String,
fileType: FileTypeEnum,
flyZoneInformation: List<FlyZoneInformation>,
authZoneInformation: List<FlyZoneAuthInformation>,
callback: CommonCallbacks.CompletionCallback
)

Description: Convert no-fly zones and authorization zones to Autel format file

Input Parameters: filePath File relative path

Input Parameters: fileType File type

Input Parameters: flyZoneInformation No-fly zone information

Input Parameters: authZoneInformation Authorization zone information

Input Parameters: callback Result callback

Output Parameters: None

Related Parameters: FileTypeEnum, FlyZoneInformation, FlyZoneAuthInformation

enum class FileTypeEnum(var value: Int) {

/**
* Elevation file
*/
ELEVATION,

/**
* Fixed no-fly zone file
*/
FIXED_NO_FLY_ZONE,

/**
* Temporary no-fly zone file
*/
TEMP_NO_FLY_ZONE(3),

/**
* Authorized zone file
*/
AUTHORIZED_ZONE(4),

/**
* Geofence
*/
ELECTRIC_BARRIER(5),

/**
* Flyable zone file
*/
FLY_ZONE(14),

/**
* Unknown
*/
UNKNOWN(-1)
}

method uploadNoFlyZoneToAircraft

fun uploadNoFlyZoneToAircraft(
filePath: String,
aircraftSN: String,
fileType: FileTypeEnum,
callback: CommonCallbacks.UpLoadFileCallbackWithProgress<Int>
)

Description: Upload no-fly zone file to aircraft, Note:

  • Aircraft already has built-in fixed no-fly zones, no need to upload

  • Currently, Autel fixed-wing aircraft combines temporary no-fly zones, geofences, and authorized zones into one file for upload

  • Autel fixed-wing aircraft can only use FileTypeEnum.ELECTRIC_BARRIER type for upload

  • Uploading the same file type will overwrite the previous file

Input Parameters: filePath File relative path

Input Parameters: aircraftSN Aircraft serial number

Input Parameters: fileType File type

Input Parameters: callback Result callback

Output Parameters: None

Related Parameters: FileTypeEnum