Instructional Material: Fly a Grid 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.

 

Material Type: 
Lab Activity
Education Level: 
Middle School
High School
Focus Subject: 
Computing / Computer Science
Robotics Software
HW Platform: 
DJI Tello
SW Platform: 
Java
Interactivity Style: 
Mixed
Audience: 
Learner