0
0
Drone Programmingprogramming~15 mins

goto() command for navigation in Drone Programming - Mini Project: Build & Apply

Choose your learning style9 modes available
Using the goto() Command for Navigation
📖 Scenario: You are programming a small drone to move to specific points in a room. The drone uses a goto() command to fly to exact coordinates.Coordinates are given as (x, y, z) values representing the drone's position in meters.
🎯 Goal: Build a simple program that sends the drone to three different points using the goto() command.You will create the points, set a speed limit, send the drone to each point, and finally print a message when done.
📋 What You'll Learn
Create a list of three coordinate points with exact values
Create a speed limit variable with a specific value
Use a for loop to send the drone to each point using goto()
Print a completion message after all moves
💡 Why This Matters
🌍 Real World
Drones often need to fly to specific GPS or room coordinates for tasks like delivery, inspection, or photography.
💼 Career
Understanding how to program drone navigation with commands like goto() is useful for drone operators, robotics engineers, and automation developers.
Progress0 / 4 steps
1
Create the list of points
Create a list called points with these exact coordinate tuples: (0, 0, 1), (2, 3, 1), and (-1, 4, 2).
Drone Programming
Need a hint?

Use square brackets [] to create a list and parentheses () for each coordinate tuple.

2
Set the speed limit
Create a variable called speed_limit and set it to 5.
Drone Programming
Need a hint?

Just assign the number 5 to the variable speed_limit.

3
Send the drone to each point
Use a for loop with variable point to go through points. Inside the loop, call goto(point, speed_limit) to move the drone.
Drone Programming
Need a hint?

Use a for loop to repeat the goto() command for each point.

4
Print completion message
Write a print() statement to display the exact message: "Drone has reached all points."
Drone Programming
Need a hint?

Use print() with the exact message inside quotes.