Walkthrough of the DJI Mobile SDK tutorials that we converted from Java to Kotlin. See https://youtu.be/f5fWvFD5rwc for recording of the Drone Software SDK meetup
The tutorials are taken from the original DJI Tutorials that are in Java, you can find them at developer.dji.com
Still haven’t completed the Android Video Stream Decoding Sample, that should be done by the next meetup
Also the Mapview and Waypoint example uses Mapbox not GoogleMap or the Chinese version
I also added a Registration do nothing app that just shows how to get the DJI SDK into an app
Everything is up on a public repo which you can find at https://github.com/godfreynolan/DJITutorialsKotlin
Each of the tutorials has a step by step tutorial to help you recreate the apps
Some apps won’t work with some drones or work differently with other drones.
Do nothing app, just make sure you know how to get the API key and add the DJI SDK library to a project
Go to URL and show readme and all the notes
Step by step walkthrough
Step by step walkthrough in the tutorial
This tutorial is designed for you to gain a basic understanding of the DJI Mobile SDK. It will implement the FPV view and two basic camera functionalities: Take Photo and Record video.
GO TO THE README AND SHOW THE CONTENTS
We use MediaManager to preview photos, play videos, download or delete files, you also learn how to get and show the video playback status info. By using the MediaManager, the users can get the metadata for all the multimedia files and has access to each individual multimedia file.
See if you can find better images or videos on the DJI developer site
In this tutorial, you will learn how to implement the DJIWaypoint Mission feature and get familiar with the usages of MissionControl.
Also you will know how to test the Waypoint Mission API, Mapbox and the DJI Assistant 2 Simulator
connect your android device to the remote controller using USB cable and run the application. Go back to the DJI Assistant 2 Simulator on your PC or Mac and press the Start Simulating button. A tiny red aircraft will appear on the map in your application, if you press the LOCATE button, the map view will zoom in to the region you are in and will center the aircraft:
Next, press the Add button and tap on the Map where you want to add waypoints, as shown below:
If upload mission success, press the START button to start the waypoint mission execution.
Now you should see the aircraft move towards the waypoints you set previously on the map view,
At the same time, you are able to see the Mavic Pro take off and start to fly in the DJI Assistant 2 Simulator.
In this tutorial, you will learn how to use the TapFly and ActiveTrack Missions using calls to ActiveTrackOperator and TapFlyMissionOperator
Given a coordinate in the live video stream (which can come from a user tap), the aircraft will calculate and fly towards the coordinate's direction in the real world. During a flight, the aircraft will automatically detect and avoid obstacles. Also, the aircraft will stop flying in the direction if it reaches its radius limitation, the mission is stopped, the user pulls back on the pitch stick or if it comes to an obstacle it cannot bypass. During the mission, you can use the remote controller's yaw stick to adjust the heading of the aircraft, which also adjusts the direction of flight to the new yaw.
An ActiveTrack Mission allows an aircraft to track a moving subject using the vision system and without a GPS tracker on the subject. To use an ActiveTrack mission:
The main camera is used to track the target, so the gimbal cannot be adjusted during an ActiveTrack mission. During the mission, the aircraft can be manually flown with pitch, roll and throttle to move around the subject being tracked.
See if you can find better images or videos on the DJI developer site
DJISimulator is used to control the aircraft in a simulated environment based on the virtual stick input. The simulated aircraft state information will also be displayed on the screen.
You can use the Simulator class in FlightController to control the simulation. It allows both manual and automated flights to be simulated without actually flying the aircraft.
Some drones don’t support the waypoint missions we looked at earlier and you have to use a thing called visual sticks.
In this app we can see the two black circles which are our manual virtual sticks, looking at the code will also help you with the automated missions
Waypoints are limited to 79 points. But some apps use multiple missions to get over this restriction.
Finally looking at the GEO demo app.
This shows how to use the FlyZoneManager and FlyZoneInformation of DJI Mobile SDK to get the fly zone information, and unlock authorization fly zones.
Unlock Authorization Fly Zone Workflow
Login your verified DJI account, if it's a new account, you need to complete the verification process.
Open the Simulator of DJI Assistant 2 or DJI PC Simulator and enter the coordinate data (37.4613697, -122.1237315) (Near Palo Alto Airport) to start simulating the aircraft's coordinate to the authorization area.
Press UPDATE LOCATION and GET SURROUNDING NFZ buttons to update the aircraft location on the map and update the fly zone information around the aircraft on the right textView.
Get the authorization fly zone ID you want to unlock from the textView, the category of it should be Authorization.
Press UNLOCK NFZS button and enter the fly zone ID to unlock it.
If you unlock the fly zone successfully, you can press the GET SURROUNDING NFZ button to refresh the fly zone infos on the right textView, you may notice that one of the yellow circle will disappear in the map. And you can take off the aircraft in the simulator now.
Note: Limited Simulation Area. Currently, you can only test the GEO feature within 50km of (37.453671, -122.118101), which is the location of Palo Alto Airport in California, United States.
1. Login DJI Account
Press the LOGIN button and a login view will pop up as shown below:
If it's a new DJI account, it will show a verification view as shown below:
Logout DJI Account
Press the LOGOUT button to logout your DJI account.
On the upper right corner of the screenshot, you can check the loginStatusTv's info for the user account status as shown below:
Use DJISimulator to Simulate Aircraft Location
We will use the DJISimulator to simulate the test environment to locate the aircraft to specific latitude and longitude coordinate.
If you are using Phantom 4 for testing, please check DJI Assistant 2 Simulator tutorial for details, otherwise, if you are using Phantom 3 Professional, Inspire 1, etc, please check DJI PC Simulator tutorial for details.
Open the Simulator of DJI Assistant 2 or DJI PC Simulator and enter the coordinate data (37.4613697, -122.1237315) (Near Palo Alto Airport) to start simulating the aircraft's coordinate to the authorization area.
Press UPDATE LOCATION and GET SURROUNDING NFZ buttons to update the aircraft's location on the map and update the fly zone information around the aircraft on the right textView.
Wait for a while, you may see there a red aircraft placed inside the yellow circle, which is an authorization fly zone you can unlock as shown below:
Also the textView on the right side will show the FlyZoneInformation info, includes the fly zone name, fly zone id (required in the unlock process), fly zone category, type, etc.
Here are the explanation of the three fly zone circles:
Green Circle
It represents the warning fly zones, which do not restrict flight and are informational to alert the user. In a warning fly zone, users should be prompted with a warning message describing the zone.
Yellow Circle
It represents the authorization fly zone, which will restrict the flight by default, it can be unlocked by a GEO verified user.
Red Circle
It represents the restricted fly zone, it will restrict the flight by default and cannot be unlocked by a GEO verified user.
Unlock Fly Zone
After you login with your DJI account and locate the aircraft to the coordinate of (37.4613697, -122.1237315), you can press the UNLOCK NFZS button and type in the fly zone ID to unlock it.
If you unlock the fly zone successfully, you can press the GET SURROUNDING NFZ button to refresh the fly zone infos on the right textView, and one of the yellow circle will disappear in the map as shown in the following gif animation:
Get Unlock Fly Zone List
You can press the GET SURROUNDING NFZ button to get the fly zone you have unlocked before on the right textView as shown below:
In this tutorial, you've learned how to use the FlyZoneManager and FlyZoneInformation of DJI Mobile SDK to get the fly zone information, how to unlock authorization fly zones and how to add aircraft annotation and draw fly zone circle overlays on the map view to represent the fly zones. Moreover, you've learned how to use the DJISimulator to simulate the aircraft's coordinate and test the GEO System feature indoor without flying outside.