Fly Zone Handler 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
Polygon: 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.
Information of fly zones around the aircraft if the operation has no error. The information may be null when there is no fly zones around the aircraft.
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/Windows SDK based application. This list does NOT include fly zones unlocked by custom unlocking.
Information of unlocked fly zones on the aircraft if the operation has no error. The information may be null when there is no unlocked fly zones on 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/Windows 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.
Set the enabled state to the selected authorization fly zone on the aircraft. This method can be used to set the enabled state for specific authorization fly zone currently on the aircraft. All authorization fly zones on the aircraft can be retrieved with GetUnlockedFlyZonesForAircraft.
Get the enabled state of the selected authorization fly zone on the aircraft. All authorization fly zones on the aircraft can be retrieved with GetUnlockedFlyZonesForAircraft.
Get the enabled state of the selected authorization fly zone on the aircraft.
Return:
async Task<ResultValue<bool>>
The enabled state of the selected authorization fly zone on the aircraft. If the selected authorization fly zone could not be found on the aircraft, an unknown error code of the operation will be returned.
Reloads the unlocked zone groups unlocked by the current user's account from the server. For all products 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.
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.
Disables the custom unlock zone currently on the aircraft if there is. The currently enabled custom unlock zone can be retrieved with GetEnabledCustomUnlockZone.
The currently enabled custom unlock zone on the aircraft. The result will be null when this is some error or there is no enabled custom unlock zone on the aircraft.
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.
Unlocked zone groups loaded from the server associated to the logged-in account. The result will be null when this is some error or there is no unlocked zone group associated to the logged-in account.
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: