Lesson: Fly a Grid Pattern

Explore how to program the Tello to fly a search grid.

Understand how to program the movements to fly a grid search pattern.


Now lets extend the last exercise by programming the drone to fly a search grid. When flying a grid, we move forward some distance, turn 90 degrees, move laterally a short distance, turn 90 again, then fly back the same distance. Then we turn the opposite way 90 degrees, fly forward a short distance, then turn another 90 the same way, then repeat the movements. This results in flying a pattern that covers a rectangular area. Search grids are used to examine an area looking for some target or perhaps for mapping the area.

Examine the FlyGrid class to see how this is done. You can change the distances and the number of times the for loop repeats the pattern to adjust the area covered.

Modify the Main class to execute the FlyGrid class.