Fly Zone Manager gives information about nearby fly zones, and APIs to unlock zones that can be unlocked. Depending on location, there are three types of fly zones possible:
CIRCLE: Cylinder or truncated cone volume with four levels of restriction:
Warning Zones : no restriction
Enhanced warning zones : Flight restricted, can be unlocked for
flight when the user logs into their DJI account
Authorization zones : Flight restricted, can be unlocked for
flight when the user logs into their DJI account and the account
has been authorized to unlock authorization zones.
Restricted zones : Flight restricted
POLY: Fly zone that consists of one or more sub fly zones that are cylinders or complex volumes with different height limitations. A height limitation of 0 means flight is completely restricted. This is used by Spark, Mavic, Phantom 4 Series, Inspire 2 and Matrice 200 series.
On the Phantom 3, Inspire 1, M100, M600, A3/N3 series of products, there can also be a buffer area with radius about 23 km around a restricted fly zone where flight height is limited to 120m.
voidgetFlyZonesInSurroundingArea( @NonNull final CompletionCallbackWith<ArrayList<FlyZoneInformation>> callback)
Package:
dji.sdk.flightcontroller
Description:
Gets all the fly zones within 20km of the aircraft. During simulation, this method is available only when the aircraft location is within 50km of (37.460484, -122.115312) or within 50km of (22.5726, 113.8124499). Use of the geographic information provided by DJIFlyZoneManager is restricted. Refer to the DJI Developer Policy.
Input Parameters:
@NonNull final CompletionCallbackWith<ArrayList<FlyZoneInformation>> callback
The execution callback with the returned value(s).
voidgetUnlockedFlyZonesForAircraft(@NonNull final CompletionCallbackWith<List<FlyZoneInformation>> callback)
Package:
dji.sdk.flightcontroller
Description:
Gets a list of authorization fly zones unlocked by the account for the connected aircraft. It includes fly zones unlocked by the Flight Planner (http://www.dji.com/flysafe/geo-system#planner), and the ones unlocked during flight using DJI Go or any DJI Mobile SDK based application. This list does NOT include fly zones unlocked by custom unlocking. For Inspire 1 and Phantom 3 series, the list is fetched from the server. If the internet is not accessible, the cached local data will be used. For the other products, the list is fetched from the aircraft.
Input Parameters:
@NonNull final CompletionCallbackWith<List<FlyZoneInformation>> callback
The execution callback with the returned value(s).
voidunlockFlyZones(@Size(min = 1)final ArrayList<Integer> ids, @Nullable final CompletionCallback callback)
Package:
dji.sdk.flightcontroller
Description:
Unlocks the selected fly zones. This method can be used to unlock authorization zones. After unlocking the zones, flight will be unrestricted in those zones until the unlock expires. The unlocking record will be linked to the user's account and will be accessible to DJI Go and other DJI Mobile SDK based applications. Data Protection Notes - Calling this method will send the following protected data to DJI server: - User account information - The serial number of the connected aircraft.
voidunlockAuthorizationFlyZone(@Size(min = 1)finalint id, @Nullable final CompletionCallback<DJIError> callback)
Package:
dji.sdk.flightcontroller
Description:
Unlock the authorization fly zone. After unlocking the authorization fly zone, the aircraft will be able to take off normally in the authorization fly zone, and the authorization fly zone will continue to be banned after reboot the aircraft.
Reloads the unlocked zone groups unlocked by the current user's account from the server. For all products besides Phantom 3 and Inspire 1 series this includes both self unlocked and custom unlocked zones. Each unlocked zone group corresponds to one aircraft serial number. After launch, SDK will call this method once. It will call this method again when either the network connection or the current account state changes (e.g. when a new user successfully logs in). Call this method any other time to trigger the reloading manually. Calling this method will NOT synchronize the loaded zone groups onto the aircraft. To get a list of groups currently loaded from the server, call getLoadedUnlockedZoneGroups. User will need to manually call syncUnlockedZoneGroupToAircraft to synchronize the unlocked group to the connected aircraft after the unlocked zone groups are reloaded. This feature is not supported by Inspire 1 or Phantom 3 series. For the other products, it can be used when isCustomUnlockZoneSupported returns true.
Gets the unlocked zone groups loaded from the server. Each zone group corresponds to one aircraft. The loaded zone groups will NOT be synchronized to the aircraft automatically. User need to manually invoke syncUnlockedZoneGroupToAircraft to synchronize the unlocked zone group to the connected aircraft. Invoke reloadUnlockedZoneGroupsFromServer to trigger the reloading of unlocked zone groups manually. This feature is not supported by Inspire 1 or Phantom 3 series. For the other products, it can be used when isCustomUnlockZoneSupported returns true.
Synchronizes the unlocked zone group to the connected aircraft. SDK will select the unlocked zone group that matches the serial number of the connected aircraft. After the unlocked zone group is synchronized to the aircraft successfully, the latest unlocked fly zones and the custom unlock zones on the aircraft can be checked by the follow methods:
voidenableCustomUnlockZone(@Nullable CustomUnlockZone zone, @Nullable final CompletionCallback callback)
Package:
dji.sdk.flightcontroller
Description:
Enables an Custom Unlock Zones that is on the aircraft. All Custom Unlock Zones on the aircraft can be retrieved with getCustomUnlockZonesFromAircraft. At any time, only one Custom Unlock Zone can be enabled. Enabling an Custom Unlock Zone will disable the previously enabled zone. This method can only be used when isCustomUnlockZoneSupported is true.
true if an aircraft is connected with flight controller firmware that supports Custom Unlock Zones. Aircraft that support Custom Unlock zones are also able to disable unlocked fly zones temporarily.
Return:
boolean
A boolean value to check if Custom Unlock Zone supported.
voidgetPreciseDatabaseVersion(@NonNull final CompletionCallbackWith<String> callback)
Package:
dji.sdk.flightcontroller
Description:
The version of the precise fly zone database in the firmware of the aircraft. It is null if getPreciseDatabaseState is INITIALIZING. The precise database is supported by Phantom 4 series, Inspire 2, M200 series, Mavic and Spark.
Input Parameters:
@NonNull final CompletionCallbackWith<String> callback
voidgetPreciseDatabaseState(@NonNull final CompletionCallbackWith<FlyZoneDatabaseState> callback)
Package:
dji.sdk.flightcontroller
Description:
The fly zone database state in the firmware of the aircraft. The SDK will compare the version of the database on the aircraft against the latest one online. When the aircraft database is out-of-date, the user should use DJI Go or Assistant 2 to update the firmware. This database is supported by Phantom 4 series, Inspire 2, M200 series, Mavic and Spark.
voidgetBasicDatabaseState(@NonNull final CompletionCallbackWith<FlyZoneDatabaseState> callback)
Package:
dji.sdk.flightcontroller
Description:
Get the state of the basic fly zone database on the mobile device. The SDK will compare the version of the local database against the latest one online. When the local database is out-of-date, call startBasicDatabaseUpgrade to start updating the database. If the update is compulsory (for safety reasons), SDK will start the update automatically. The basic database is used by DJI aircraft that do not support the precise database (e.g. Phantom 3 series, Inspire 1 series).
voidgetBasicDatabaseVersion(@NonNull final CompletionCallbackWith<String> callback)
Package:
dji.sdk.flightcontroller
Description:
The version of the basic fly zone database on the mobile device. It is null if the local file cannot be parsed by SDK. The basic database is used by DJI aircraft that do not support the precise database (e.g. Phantom 3 series, Inspire 1 series).
Input Parameters:
@NonNull final CompletionCallbackWith<String> callback
The execution callback with the returned String value.
The state of the fly zone database on the aircraft.
Enum Members:
INITIALIZING
SDK is fetching the information of the database.
NO_INTERNET_CONNECTION
SDK cannot access the Internet, so it cannot compare the database version with the latest one on the Internet.
OUT_OF_DATE
Aircraft's database version is older than the latest one. User should use DJI Go or Assistant 2 to upgrade the firmware in order to keep the database up to date.