IT

Photogrammetry and drones · 23 January 2019

Drones: an automatic flight mission with Thopos and Litchi

Planning an automatic flight mission for drone photogrammetry with the Thopos surveying software and the Litchi app, including terrain following on sloping ground.

In this article I’ll talk about an automatic flight mission for drone aerial photogrammetry, using the Thopos software and the Litchi app.

If I were to tell you which is the best app for programming automatic drone flights and, ideally, doing photogrammetric surveys with them, this article would end here.

The very rapid development of remotely piloted flying machines and their many uses in technical (and other) fields drags along a whole train of accessories, apps, software, …
Among them are the tools to plan an automatic flight mission.

Pix4Dcapture, DroneDeploy, Drone Harmony, DJI GS Pro, Altizure, UgCS …
Each has its strengths and its “less-strengths”.
I’d love to tell you I’ve used them all, know them in detail and can recommend one for each operational need.
But, unfortunately, I can’t…

I can, however, tell you what I use.
Which doesn’t make it the best solution.
Litchi + Thopos (or Thopos + Litchi) is one of the two solutions I rely on to plan a flight mission.
The other is UgCS, which I might write about in another article.

I’ll close the introduction by saying that, given the settings I usually work in (areas of hydrogeological instability, quarries, steep slopes, …), I do eighty per cent of my surveys NOT with programmed flights but flying manually.

There are certainly other people much more expert in automatic flight than me.
This article isn’t an in-depth tutorial.
I just want to share some tools with you, hoping the information is useful in your work or in what you do with drones.

Automatic flight

When you fly a drone you have two options.

First:
You decide on the spot where to send it and what to make it do, using the sticks on the remote controller in your hands.
Up, down, forward, back, right, left, rotate, take a photo, record a video, tilt the camera, …

Second:
You program actions that you load into the drone’s “brain” (before take-off or even while it’s already flying), and it carries them out automatically, without you doing anything other than checking that all goes well.

In the first case you’re flying manually.
In the second you’re in automatic mode.

What happens in automatic flight?

When you prepare an automatic flight mission you choose:

  1. the drone’s flight height (usually the height above the ground, AGL, Above Ground Level);
  2. the cruising speed;
  3. the overlap between consecutive frames (which determines the interval between photos);
  4. the overlap between frames on adjacent strips (which determines the flight lines).

You also need to know the characteristics of the camera you’re using (sensor and resolution) and the lens’s field of view (FOV).

The geographic planning of the missions is based on the maps of the geoservers the mission planning apps or software connect to remotely.
It’s very common to use Google’s elevation model.
Although it isn’t the only one available.

After choosing the parameters above (there are others, such as heading and curve radius, but I won’t go into too much detail), virtual pins, the waypoints, are created, tracing a flight path, a snake.

The Litchi Mission Hub interface

Don’t think of these routes as surgically accurate paths!
The reference elevation model has uncertainties in the position of its points, even of a few metres.
The same goes for the GPS on board most commercial drones in use, at least for now (which isn’t true for those with precision positioning systems, RTK).
From this you can easily see how the position of each waypoint can “wobble” within a space of several metres.

On this point, though, I’d say that:

  • if you fly 70 m above the ground, an uncertainty of 3–5 metres in the position of the waypoints isn’t tragic or very significant;
  • working with a typical 80% overlap between photos, you still have redundant enough data for good photogrammetric processing, even if each waypoint isn’t accurate to the centimetre.

Why fly automatically?

If you do aerial photogrammetry, choosing the “flight mission” option has advantages.
These are the most obvious, at least for me:

  1. Planning at your desk the area the drone will cover in flight stops you surveying extra areas. You save time, batteries and photos, and work only on what’s really relevant;
  2. Covering an area with an automatic flight mission is faster than doing it manually. Again, you save time and batteries;
  3. The drone flies at a (more or less) constant speed (which you choose) and saves battery (again!) compared with the accelerate/decelerate pattern of manual flight (even if you’re a wizard with the sticks!);
  4. The drone follows the flight lines thanks to its on-board GPS, so it doesn’t pass over the same point three times 😛 (saving time and, once again, batteries);
  5. Setting a shooting interval (of a few seconds) between photos means that, barring gross programming errors, you’ll get back to the office with images that have a constant overlap. And there will probably be fewer of them than if you’d flown by hand. In manual flight, the fear of getting something wrong triggers compulsive clicking, and you end up with 20–30% more photos than needed, to process and store;
  6. An automatic flight mission lets you keep your eyes on the drone in flight at all times, rather than on the screen connected to the controller (which shows the camera’s images). You don’t have to worry about “move, frame, shoot” for every photo. It’s all safer: you always know where you’re flying and can step in immediately if needed.

Thopos + Litchi

Now I’ll tell you about the two tools I mentioned at the start and use for automatic flight.
Then I’ll explain how to program a mission.

Thopos

Thopos is surveying software.
It has a core, the Surveying and Cadastre module with built-in CAD, around which various modules revolve and attach, which you can choose to buy according to your needs.

It’s Italian software, developed by Fabio Guerra, and distributed both by Studio Guerra and by the software house Gec Software, under the name Topografo.

At the time, the main module and the add-on modules were sold with a one-off licence, plus an optional annual fee for updates and support.

Thopos is my surveying software.
Hmm, put like that it sounds a bit totalitarian!
It’s the software I use for surveying.
There, that’s better!
If you ask me whether it’s worth buying, I say: Yes!
But I also want to say that:

  • it isn’t the only surveying software;
  • it isn’t the best surveying software;
  • I don’t earn a cent from Studio Guerra, although I’ve recently been working with Fabio as a beta tester for new releases.

The Surveying and 3D Models module has tools that let you plan an automatic flight mission for a drone.

Litchi

Litchi is an app for Android and iOS smartphones and tablets that lets you fly a DJI drone (Spark, Mavic, Phantom, Inspire, …).

You connect the smartphone to the controller, launch the app and can control the drone in flight.
You take photos, record video, get the live stream of what the drone’s camera sees, read all the telemetry, …
And you can also create routes, through fixed points, to follow during the flight at a set speed.
Flying along routes is also useful for creative video shots.
But, above all, it’s useful for aerial photogrammetry.

Litchi, however, isn’t a photogrammetry app.
It doesn’t let you select an area and generate a flight mission in strips based on the overlaps.
It’s a flight control app.
But it works well with Thopos, because in Thopos you can plan and export a flight mission in a compatible format that Litchi can then read and fly.

Litchi is a paid app.
It isn’t cheap for an app, but if you use it often I think it’s worth it.

Programming a flight mission

Here are the steps I follow to program a flight mission with Thopos and load it into Litchi to fly it.

I start with Thopos.

Choose the area

The first thing to do is choose the area of operations.

Thopos lets you load Google or Bing maps into the workspace, on which to draw the boundary of the survey area or even a non-closed route for the drone to follow.

A Google map loaded in Thopos

Photogrammetric flight parameters

Using the CAD tools, I draw a polyline enclosing the whole area to be surveyed.
And a bit more…

In this article I’ll talk about a photogrammetric mission over a closed area.
It isn’t the only option, but I don’t want to complicate things…

Designing a flight mission in Thopos

In the Surveying module there’s a set of commands dedicated to photogrammetric applications with drones.

I choose Design Mission, Mission over an area with strips, and a new window opens where I set the design parameters.

Choosing the flight parameters for mission planning in Thopos

Here I tell the software:

  1. the field of view of the camera on the drone (FOV);
  2. the flight height, meaning the distance between drone and ground (it’s a relative value);
  3. the frame format, i.e. the ratio between the long and short sides;
  4. the overlap between adjacent strips.

I can also enter the sensor resolution.
It gives you the GSD (Ground Sampling Distance), but it isn’t needed for planning the routes.

Here I immediately see the ground coverage of each frame, i.e. how much ground fits in each image, and I also know the total area of the survey.

The result of the calculation is the strips, representing the flight lines the drone will follow.

Defining the area and calculating the flight strips in Thopos

Simulate the mission and generate the MIS file

The next step is to simulate the flight mission and generate the file to export to Litchi.

There’s a specific command in the same section of the surveying tools.
It’s Simulate Mission.

I can choose to simulate a mission over flat ground or over sloping ground.

Having sloping ground under the drone makes a big difference to a good photogrammetric acquisition!
For now, though, let’s stick to flat ground.

Simulating an automatic flight mission in Thopos

Here I choose:

  1. the drone’s cruising speed (km/h)
  2. the interval between photos (seconds)

These choices determine:

  1. the total duration of the mission (seconds);
  2. the total distance flown by the drone (metres);
  3. the number of photos;
  4. the overlap between consecutive frames.

From here I check whether the mission design is right.
If everything adds up, I save the mission file in .mis format, compatible with Litchi.

Saving a flight mission from Thopos in MIS format

Thopos can also save a mission in other formats, compatible with other flight control apps:

  • DJI Ultimate Flight – CSV
  • DJI GS 4 – AWM
  • Mission Planner – WAYPOINTS
  • UgCS – XML
  • Yuneec – CCC
  • Google Earth – KML
  • generic ASCII – TXT

Now I take the MIS file, load it onto the smartphone or tablet with Litchi installed, and I’m (almost) ready to fly.

Missions over sloping ground

The flight mission I generated in the previous step has the drone flying at a constant height.
All the waypoints lie on a horizontal plane.

But if you have to survey a sloping area, flying at a constant height isn’t right.
You’d have a different GSD across the photos in the dataset.
I won’t go into the details, but I’ll refer you to a couple of articles I wrote some time ago about the Ground Sampling Distance:

Thopos lets you generate flight missions that take into account the height of the ground below.

You load a DTM (which you can take from Google Earth’s model or from the SRTM, Shuttle Radar Topography Mission) and, with a couple of adjustments, set it as the reference surface for calculating heights.

Importing a DTM into Thopos

Now Thopos can simulate a flight mission over sloping ground.
The waypoints take heights relative to the ground below, keeping the distance chosen in the flight parameters constant.

I haven’t gone into the specifics of each step in Thopos.
That isn’t the aim of this article.
But I’d like to point you to Thopos’s YouTube channel, Thopos TV, where you’ll find lots of specific, detailed tutorials (in Italian).

Fly with Litchi

Once the mission file is ready, I move to Litchi.

Litchi Mission Hub

Before moving to the app on the mobile device, I use a useful and interesting companion tool from Litchi: the Mission Hub.

Litchi Mission Hub with a flight path adapted to the ground below

It works in the browser.
And it too is based on Google’s maps and models.

Here I can:

  • Load the flight mission file I created with Thopos;
  • Check or change the flight parameters (speed, heading, path at the curves, …);
  • Add new waypoints;
  • Change the height of the waypoints relative to the ground below (a bit like Thopos does in the mode I described earlier);
  • Import a DEM (Digital Elevation Model) and use it as the reference for ground heights;
  • Export the mission in 3D KML format, to view it in Google Earth;
  • Export the modified mission file, or save it to a personal account, ready to be launched in the app.

Adding a new waypoint in the Litchi Mission HubA 3D flight mission loaded into Google Earth from Litchi Mission Hub

If you sign up for a free account in the Mission Hub and in the mobile app, you can sync flight missions automatically without physically moving files.
It’s handy!
Especially for iOS devices.

Saving a modified flight mission in Litchi Mission Hub

The Litchi app

Litchi has these options for flying:

  • FPV
  • Waypoint
  • Orbit
  • Pano
  • Focus
  • Track

I choose Waypoint and load the flight mission, choosing it from the ones I’ve prepared and saved.

The mission is ready for the drone to fly.
I can start it with the drone on the ground (armed) or in flight.
And it flies it.

I just have to remember to choose “Interval” mode for taking photos and set the time between one photo and the next.

A flight mission loaded in the Litchi app

If something doesn’t add up, I can still change the waypoints and routes directly in the field, working in the app.

I won’t add anything else on programming automatic flights with Thopos and Litchi.
I hope I’ve given you an idea of how they work.

I understand it may not seem immediate or simple.
There are quite a few steps, you need two different tools and a not insignificant investment.
But they’re tools that give me a lot of control in every phase.
And with them I can customise the flight to the specifics of the survey area, at every step of the planning, and in the field too.

I certainly understand that it may not be easy to recommend Thopos as mission planning software if you don’t use it for anything else (read: surveying).
If you know you’ll use its other functions too, it’s worth considering.
Otherwise you could try other tools or work directly with a single app, and it would be great to hear from you, to share other tools for planning automatic flights for photogrammetry.

If you have doubts, questions or observations, get in touch: on Telegram, @paolocorradeghini, or from the contact page.

Thanks for your time and attention!

See you soon!

Paolo Corradeghini

I’d also point you to an article on Giampaolo Beretta’s blog about programming automatic flights with open source or low-cost tools (spreadsheets, QGIS and Litchi): you can read it at this link (in Italian).

← All articles