Servers by jDrones

Can I create "micro-missions" by simply text-editing? [macro-mode]

(David N) #1

I want to fly a drone on what I’ll call “micro-missions” for which QGC’s standard finger-pointing planning approach is somewhat ponderous. As an example, I want to photograph an 8-footW by 24-footL x 6-footH volume sitting on the surface. Something like using a camera’s macro mode for extreme closeups.

If I try to do this on my smartphone’s interface, the most extreme zoom setting still does not show enough detail, and my finger obscures the whole volume.

I’m hoping for something more precise.

I’m guessing that I could take any similar mission’s .plan file, edit its parameters to smaller values, save it out as my new micro-mission into the same folder/directory where the original was found, open it in QGC and load it into the quad and fly it.

I would appreciate comments. Thank you.

(David N) #2

Here’s an excerpt from a .plan that called for loitering after moving up from 25-ft to 30-ft AGL about a point at an 8-foot radius. (I’m guessing this is the particular waypoint in the plan for that task based on the numbers, 7.62 (7.62m/.3048m/ft =25ft), 9.144m (30ft), and 2.384 (8 ft.)

Can someone point me to a document explaining the syntax of the .plan file?
Can someone point me to the meaning of ‘“command”: 18’?
{
“AMSLAltAboveTerrain”: 7.62,
“Altitude”: 9.144,
“AltitudeMode”: 1,
“autoContinue”: true,
“command”: 18,
“doJumpId”: 6,
“frame”: 3,
“params”: [
1,
0,
2.4384,
null,
43.206298610001056,
-89.6957112935941,
9.144
],
“type”: “SimpleItem”
},

(David N) #3

…alternatively, is it possible to define a new “Pattern” which could be added as a waypoint in a mission?

(David N) #4

Well, of course, QGC has got the subject covered with “Structure Scans”, which I discovered can be changed from the initial square shape to circle of settable radius and arbitrary polygons of settable vertices. (In QGC, I defined an 8’ tall cylinder of 3’ radius.)

There is still the documentation to read to understand how to fly it, but I am still interested in learning how to understand the .plan file, with the goal of creating one from scratch in a text editor…

(David N) #5

And of course the .plan file format (which is what I was asking to be explained) is laid out for QGC developers:

https://dev.qgroundcontrol.com/en/file_formats/plan.html

However… it’s pretty sparse, with the descriptions of many of the Keys being simple "?"s.

For example: I’m interested in the “Layers” key ("?") in the “Structure Scan” item. In particular, I haven’t found a way to set its value in the Planner, so am guessing that it is computed.

Another: in the SimpleMission item, there’s a key “doJumpId” with this description:

  • The target id for the current mission item in DO_JUMP commands. These are auto-numbered from 1.

In a simple QGC-created .plan of take-off, structural circle scan, fly back to near takeoff, and land, there were only two "doJumpID"s, but they are numbered ‘“doJumpId”: 1’ in the first “SimpleItem” and ‘“doJumpId”: 96’ in the last “SimpleItem”, and there are only three items, with the 2nd, middle, one being the Structure Scan “ComplexItem”.

The “Circle” called-for in the Planner is implemented as a 16-sided polygon in the .plan file, it’s hard to conceive how “doJumpId” is counted.

(Kikislater) #6

It’s a json format. Command rely on Mavlink

(David N) #7

@kikislater Thank you for that.

(DonLakeFlyer) #8

As described in the Doc for SimpleItem “command” refers to the command id for the command as specified by mavlink: https://mavlink.io/en/messages/common.html. The params for the command are also defined by the mavlink spec.

The GPS locations for the Structure Scan polygon vertices can be edited manually by clicking on the and selecting Edit Position. This way you can make the polygon match your surface. Being that small though I’m not sure you are going to get the resolution you want out of GPS coords or even from the vehicle GPS flight path (unless maybe you are using RTK).