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:
DJIFlyZoneTypeCircle: 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
DJIFlyZoneTypePoly: 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.
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.
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.
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.
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 getLoadedUnlockedZoneGroupsWithCompletion. User will need to manually call syncUnlockedZoneGroupToAircraftWithCompletion 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 YES.
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 YES.
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 syncUnlockedZoneGroupToAircraftWithCompletion to synchronize the unlocked zone group to the connected aircraft. Invoke reloadUnlockedZoneGroupsFromServerWithCompletion 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 YES.
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:
YES 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.
The version of the precise fly zone database in the firmware of the aircraft. It is nil if preciseDatabaseState is DJIFlyZoneDatabaseStateInitializing. The precise database is supported by Phantom 4 series, Inspire 2, M200 series, Mavic and Spark.
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. For older products, use basicDatabaseState.
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 startBasicDatabaseUpgradeWithCompletion 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).
The version of the basic fly zone database on the mobile device. It is nil 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).
The state of the fly zone database on the aircraft.
Enum Members:
DJIFlyZoneDatabaseStateInitializing
SDK is fetching the information of the database.
DJIFlyZoneDatabaseStateNoInternetConnection
SDK cannot access the Internet, so it cannot compare the database version with the latest one on the Internet.
DJIFlyZoneDatabaseStateOutOfDate
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.