Mobile-SDK-Android-V5 icon indicating copy to clipboard operation
Mobile-SDK-Android-V5 copied to clipboard

SEARCH RESTRICTED ZONE BY LOCATION

Open GiangGiang11051999 opened this issue 10 months ago • 9 comments

Dear DJI team,

I use DJI SDK your team to handle restricted zone for aircraft. I was get list restricted zone from aircraft but I can't search restricted zone by location. For example, I am in Da Nang, Vietnam but I want to search for restricted zone in Ho Chi Minh, Vietnam. I see your app has solved this problem. Specifically as attached image below: IMG_1743 IMG_1744

Please offer for us function to handle this feature.

Thank you team very much!

GiangGiang11051999 avatar Apr 23 '24 07:04 GiangGiang11051999

Agent comment from yating.liao in Zendesk ticket #105780:

If you are using MSDK V5, it already provides the function to query nearby flight zones based on latitude and longitude coordinates. The interface is getFlyZonesInSurroundingArea.

°°°

dji-dev avatar Apr 24 '24 07:04 dji-dev

I try use getFlyZonesInSurroundingArea and pass params latitude and longitude but I don't see any callback data. I check app DJI Fly on Store, your app not connected aircraft still search restricted zone. If My app not connected aircraft, callback return message error. Please check again and offer document help me. Thank team very much.

GiangGiang11051999 avatar Apr 24 '24 07:04 GiangGiang11051999

Could you please provide the model of the drone you are using? I have tested the getFlyZonesInSurroundingArea interface on RC PRO and found that it is possible to retrieve surrounding flight zones without connecting to the aircraft. You can directly test the functionality of this interface using the sample code. image

dji-lyt avatar Apr 24 '24 11:04 dji-lyt

I run example follow link github: https://github.com/DJI-Mobile-SDK-Tutorials/Android-GEODemo. But I couldn't find any surrounding flight zones. I use DJI Air 2S model to get it. What is class contain getFlyZonesInSurroundingArea interface that you use? I use function as bellow to get restricted zone at RC location. If my app connected with aircraft, I received data from callback but data incorrect as hope. Else, I couldn't find any data from it, it return error message " Not connect aircraft ".

Screenshot 2024-04-25 at 09 33 06

And I use function getFlyZonesInSurroundingArea(latitude, longitude, callback) to get data that want to search. Follow image as bellow to see all my code for this issue. I tried pass params latitude and longitude but I couldn't get any data.

Screenshot 2024-04-25 at 09 38 35

Please check my code and offers all issue in it. I hope I will resolve this issue by your instruction.

GiangGiang11051999 avatar Apr 25 '24 02:04 GiangGiang11051999

Agent comment from yating.liao in Zendesk ticket #105780:

My previous test was conducted on MSDK V5, which supports this feature.However, the AIR 2S you are using does not support MSDK V5, it only supports MSDK V4. Unfortunately, MSDK V4 cannot retrieve flight zone information without being connected to the aircraft. You can check the flight zone on the flight zone website, here is the URL:https://fly-safe.dji.com/nfz/nfz-query

In addition, if you are using MSDK V4, you can submit issues under this repository so that I can know the MSDK version you are using promptly:https://github.com/dji-sdk/Mobile-SDK-Android Thank you.

°°°

dji-dev avatar Apr 25 '24 08:04 dji-dev

When I connected AIR 2S with my app. My app retrieve flight zone information with list size = 1. However, I check flight zone information on https://fly-safe.dji.com/nfz/nfz-query with this location. I found many flight zone information at here. I receive data incorrect with DJI geo map on website.Please confirm this issue help me.

GiangGiang11051999 avatar Apr 25 '24 08:04 GiangGiang11051999

The SDK interface can only retrieve flight zone information within a radius of 20 kilometers centered on the aircraft's position. The website allows you to freely query flight zones. The point has been clearly explained in the API documentation. image

dji-lyt avatar Apr 26 '24 03:04 dji-lyt

Yes, I do know this. However, sometimes my app returns the same data as on the web, but other times it only returns a list with size = 1. Although, I stand at a constant position. Can you help me clarify what this is?

GiangGiang11051999 avatar Apr 26 '24 04:04 GiangGiang11051999

Agent comment from yating.liao in Zendesk ticket #105780:

Could you confirm if I understand correctly that the position of your aircraft has not changed, but the information retrieved from multiple calls to getFlyZonesInSurroundingArea is different? Would you be able to record a video for us to confirm this issue? Currently, we have not encountered the same problem in our testing. Here is the address for uploading files:https://pan-sec.djicorp.com/s/JTQYJJtany59S73 password:dji123

°°°

dji-dev avatar Apr 26 '24 11:04 dji-dev

Thank you team supported

GiangGiang11051999 avatar May 29 '24 01:05 GiangGiang11051999