Matioupi
lvl.4
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 !
|
|