Please select Into the mobile phone version | Continue to access the computer ver.
Flying an Offline designed mission with Spark (and other DJI drones)
4757 20 2017-11-17
Uploading and Loding Picture ...(0/1)
o(^-^)o
Matioupi
First Officer
Flight distance : 922569 ft
France
Offline

Hello,

after digging on the subject for quite a while, I managed to understand and test designing a flight mission offline, and flying it with DJI GO 4 on the field.
For all DJI drones that allow Waypoint mode, that will only require a rooted android device. For Spark, it requires a rooted android device and the modded 4.1.9 version with Mavic modes enabled.

You have to have used the waypoint mode on the field at least once so that DJI GO 4 databases are created.

Mission data is stored in dji_pilot_dji_groundstation_controller_DataMgr_DJIWPCollectionItem database within /data/data/dji.go.v4/dji.db file (the first / really refer to the rooted android device / and not the fake one that you can see on non rooted devices : those databases are the private DJI GO 4 databases)

Each record has the following format :

Id : integer start to 1 and increment for each record
distance : flight plan length stored with 3 digits after dot e.g. : 175.561
pointsJsonStr : the actual flight plan : example :
{"points":[{"craftYaw":91,"gimbalPitch":0,"gimbalYaw":0,"height":12.199999809265137,"lat":45.79081293135456,"lng":2.8854028055682677},{"craftYaw":92,"gimbalPitch":0,"gimbalYaw":0,"height":14.40000057220459,"lat":45.79079626314489,"lng":2.8860285703542408},{"craftYaw":-128,"gimbalPitch":0,"gimbalYaw":0,"height":25.0,"lat":45.79050350040998,"lng":2.8860265170747117},{"craftYaw":-45,"gimbalPitch":0,"gimbalYaw":0,"height":25.0,"lat":45.790401616042686,"lng":2.8857248074387702},{"craftYaw":-82,"gimbalPitch":0,"gimbalYaw":0,"height":20.399999618530273,"lat":45.790523865365834,"lng":2.8855512560565972},{"craftYaw":-46,"gimbalPitch":0,"gimbalYaw":0,"height":20.399999618530273,"lat":45.79060532031695,"lng":2.8853148006888967},{"craftYaw":98,"gimbalPitch":0,"gimbalYaw":0,"height":20.399999618530273,"lat":45.790834350748256,"lng":2.8854142315025153}]}
location is empty on the flight plan I created from DJI GO 4
autoAddFlag is an integer, I do not really know what it is coding for

createdDate is the Unix timestamp of the mission creation in milliseconds (can check and convert with this : https://www.epochconverter.com/ )

Then I followed the process described here :

  • I designed a fligh path from Google Earth and saved it to kml (I attached my test example)
  • I opened the kml file with notepad++ and extracted the coordinates data
  • pasted that in a spreadsheet
  • completed other columns (height, craft yaw etc.)
  • saved it as csv
  • reopenned the csv with notepad++ and removed all spaces, end of line and carriage return, add missing brackets so that it matches the pointJsonStr format
  • Transfered that to the rooted android device and put it in clipboard
  • Openned /data/data/dji.go.v4/dji.db with SQLite Editor app (version 2.2.1) which handles root access
  • go to dji_pilot_dji_groundstation_controller_DataMgr_DJIWPCollectionItem subDatabase
  • Create a new record (button +)
  • Fill in "basic field" and paste the pointsJsonStr  from previoulsy created data
  • save
  • go to the field and open DJI GO 4... After taking off and switching  to waypoint mode, you'll be able to load the mission from the saved  mission list

Most of those steps could be done though a simple little app or script...

I played the planned mission twice, choosing the "heading consistent with course setting before uploading the mission to aircraft from DJI GO 4

Fligh logs :

http://app.airdata.com/main?share=wCkDpP&page_id=GENERAL

http://app.airdata.com/main?share=oVVtsX&page_id=GENERAL

That being said and tested, I really hope that DJI will enable waypoint mode on Spark, and I would also really suggest that this flight plan database is moved to non root storage so that offline DJI or third party apps can help designing missions !

DJI_test_flightplan.zip

1.64 KB, Down times: 12

2017-11-17
Use props
Krrisstoff
Captain
Flight distance : 1238307 ft
Poland
Offline


Very good suggestion for dj support. Can you do a video tutorial? ;)
2017-11-17
Use props
Matioupi
First Officer
Flight distance : 922569 ft
France
Offline

I'll try to make a small kml to json utility and can add screenshots, but i will not do a video tutorial (no skill for that format of tutorial)
2017-11-17
Use props
Krrisstoff
Captain
Flight distance : 1238307 ft
Poland
Offline

Matioupi Posted at 2017-11-17 11:35
I'll try to make a small kml to json utility and can add screenshots, but i will not do a video tutorial (no skill for that format of tutorial)

Just text and screenshots: Step by step. Thank you
2017-11-20
Use props
DJI Elektra
Administrator
China
Offline

Thanks for your attention and hard work. We will take it as reference.
2017-11-21
Use props
Wachtberger
Captain
Flight distance : 261509 ft
Germany
Offline

Amazing, great work and thank you for sharing!
2017-11-21
Use props
Matioupi
First Officer
Flight distance : 922569 ft
France
Offline

You'll find the tutorial here :

PDF link :

https://www.dropbox.com/s/ne4rk6 ... th%20Spark.pdf?dl=0

doc link if someone wants to improve the document
https://www.dropbox.com/s/k0awh8apgwmkwaf/Tutorial%20DJI%20Waypoints%20with%20Spark.docx?dl=0

it does not requires a rooted device anymore...
2017-11-21
Use props
Wachtberger
Captain
Flight distance : 261509 ft
Germany
Offline

Excellent, thank you very much!
2017-11-21
Use props
Krrisstoff
Captain
Flight distance : 1238307 ft
Poland
Offline

Very good tutorial but for me it's too complicated procedure I will wait for the finished application.


I found another application unfortunately only on IOS. The name Autopilot is reportedly a function of the route planning function.
It is sad that other applications are more than the original Dji
2017-11-22
Use props
Montfrooij
Captain
Flight distance : 1934915 ft
Netherlands
Offline

Great work.
Hope it will be released someday!
2017-11-22
Use props
Gunship9
Captain
United States
Offline

Krrisstoff Posted at 2017-11-22 04:44
Very good tutorial but for me it's too complicated procedure  I will wait for the finished application.

The airspace governing bodies do not think it is sad that DJI doesn't provide a method to autonomously fly a drone to distant points.  That is a specific hazard the governments are trying to avoid.  They only allow businesses with waivers, insurance, and lots of pilot certificates to fly like that.  

Normally those businesses are working with the government when they launch autonomous aircraft that follow pre-programmed way points.

Why do hobbyist who fly models want aircraft that will leave, do a task at a remote location, and then return?  It is not a fun way to fly.  Perhaps they are not aircraft hobbyists but instead businesses/ photographers.  Paparazzi in the guise of RC airplane hobbyists?
2017-11-22
Use props
Krrisstoff
Captain
Flight distance : 1238307 ft
Poland
Offline


I understand what you mean, but I still think it's a useful feature. It would be enough for me to reach a mile. This feature allows you to shoot smoothly, which may not be possible manually. Dji's drones are really flying videographers.
2017-11-22
Use props
nottuppaware
First Officer
Flight distance : 70745 ft
Australia
Offline

You could just use the Autopilot app which lets you set waypoint missions on the spark. But to be honest the flight time is too short on the spark for me to do that.
2017-11-22
Use props
Matioupi
First Officer
Flight distance : 922569 ft
France
Offline

Gunship9 Posted at 2017-11-22 11:41
The airspace governing bodies do not think it is sad that DJI doesn't provide a method to autonomously fly a drone to distant points.  That is a specific hazard the governments are trying to avoid.  They only allow businesses with waivers, insurance, and lots of pilot certificates to fly like that.  

Normally those businesses are working with the government when they launch autonomous aircraft that follow pre-programmed way points.

I agree with you that full autonomous flight is a capafeature that :
- is not fun to fly
- could be use for malicious / dangerous usage (but has of course many full civilian/professionnal use cases like mapping purposes : e.g. this 3D point cloud is made from Spark : http://matioupi.free.fr/gaec/gaec.html )

on the other hand :
- it has already been released on all other DJI drones that are able to fly longuer, carry heavier etc..
- it is implemented inside the Spark
- it's not (yet) illegal using full autonomous flight mode as long as you still have manual control of the drone, and according to countries are in LOS etc.
2017-11-23
Use props
Gunship9
Captain
United States
Offline

Matioupi Posted at 2017-11-23 00:08
I agree with you that full autonomous flight is a capafeature that :
- is not fun to fly
- could be use for malicious / dangerous usage (but has of course many full civilian/professionnal use cases like mapping purposes : e.g. this 3D point cloud is made from Spark : http://matioupi.free.fr/gaec/gaec.html )

Yeah, governments don't care how you fly by yourself.  Flying close enough that you can see it.  However, this capability is right up there with live video transmissions with its encouragement of flying over the horizon.  Furthermore, it goes even farther in putting aircraft flight in the hands of people who have no ability to fly one.  

Now monkeys can do it along with monkey intelligence levels on how to fly safe.  If the monkey can do the press and hold start up for the spark, my dog can select the launch icon and swipe.  Now the dog just needs an icon for "fly to max height and max distance" she can nose.  

Used to be that you had to have some interest and knowledge of flight, and building models, before jumping in with air traffic.
2017-11-23
Use props
Gunship9
Captain
United States
Offline

Matioupi Posted at 2017-11-23 00:08
I agree with you that full autonomous flight is a capafeature that :
- is not fun to fly
- could be use for malicious / dangerous usage (but has of course many full civilian/professionnal use cases like mapping purposes : e.g. this 3D point cloud is made from Spark : http://matioupi.free.fr/gaec/gaec.html )

Looking into the intelligent flight modes where it will follow waypoints, it looks like you first have to fly there manually to set each point.  Then it can return to each point sequentially while you operate the camera.  

That is different from the OP setting waypoints on his computer, uploading them to the aircraft, then sending it on its way while you leave the area to go grab a lunch.  Claiming ignorance if it runs into a helicopter.  The OP's way means you don't have to be able to fly the mission yourself.
2017-11-23
Use props
Ace_In_Sunriver
lvl.2
United States
Offline

Matioupi Posted at 2017-11-23 00:08
I agree with you that full autonomous flight is a capafeature that :
- is not fun to fly
- could be use for malicious / dangerous usage (but has of course many full civilian/professionnal use cases like mapping purposes : e.g. this 3D point cloud is made from Spark : http://matioupi.free.fr/gaec/gaec.html )

Hi Matioupi,

This is very interesting and you did a great job. I'm particularly interested in this point cloud model. Could you elaborate a little on how this was created?

It looks like data generated from a LIDAR survey, but that seems beyond the reach of a Spark drone. Is this done with just a camera?

I'd love to find out more.

Thanks, Bill~
2017-11-28
Use props
Matioupi
First Officer
Flight distance : 922569 ft
France
Offline

Ace_In_Sunriver Posted at 2017-11-28 15:54
Hi Matioupi,

This is very interesting and you did a great job. I'm particularly interested in this point cloud model. Could you elaborate a little on how this was created?

Hello, its only photogrammetry, no lidar, there are no device that Spark could carry  (you would have point under trees...)

I used demo version of agisoft photoscan, but there are plenty of other tools (3DF Zephyr, Pix4D, photomodeler).
There is even a very good (but quite hard to use) open source software developped by French mapping agency : http://logiciels.ign.fr/?Micmac

Please keep in mind that without RTK GPS, having exact scaling and georeferencing for this kind of data will require a little of ground surveying (not done on the example  point cloud I gave link above).
2017-11-29
Use props
Ace_In_Sunriver
lvl.2
United States
Offline

Matioupi Posted at 2017-11-29 01:22
Hello, its only photogrammetry, no lidar, there are no device that Spark could carry  (you would have point under trees...)

I used demo version of agisoft photoscan, but there are plenty of other tools (3DF Zephyr, Pix4D, photomodeler).

Wow that's very interesting. I'm guessing you had to do a mod in order to mount an RTK GPS receiver to the Spark then. Or could it be done just knowing the precise location of the controller?

I"m curious how several things (you don't have to answer, I'm just curious)
How much flight time was required to do this survey?
Size of land covered (looks like about 3-5 acres to me)?
How much time needed for mission planning?
How much time for post processing was done?
Was any other software needed to publish the results onto the web?
How much total time from start to finish?

This is a very interesting process for me, as surveying is my background. I'm also curious if this pre-flight planning could be done (plan on laptop, load mission into Inspire 2) with a Crystal Sky display, as that's what I have.

Thanks again for sharing!
Bill~
2017-11-29
Use props
eYeSkYeYe
Captain

United States
Offline

Is it possible to trigger the camera as well?
I have really simple mission I would like to do... fly between 20 points, each 10m apart and take a photo.
Thing is that camera heading and position needs to be pretty precise so although it could be done manually I guess mission would be far more time efficient.
2018-1-12
Use props
zalomskij
lvl.2
Flight distance : 2145020 ft
Russia
Offline

Hi! I wrote a special application for this
https://play.google.com/store/ap ... u.zalomskij.mission
2018-5-21
Use props
Advanced
You need to log in before you can reply Login | Register now

Credit Rules