Jump into concepts and practice - no test required
or
Recommended
Test this pattern10 questions across easy, medium, and hard to know if this pattern is strong
Mission upload and execution
📖 Scenario: You are programming a drone to perform a simple mission. The drone needs to fly to specific GPS coordinates in order, hover for a moment, and then move to the next point. This project will guide you through uploading a mission with waypoints and executing it step-by-step.
🎯 Goal: Build a program that uploads a list of GPS waypoints as a mission to the drone and then executes the mission by flying to each waypoint in order.
📋 What You'll Learn
Create a list of GPS waypoints with exact coordinates
Set a mission name variable
Write a loop to upload each waypoint to the drone
Print the mission execution status after flying all waypoints
💡 Why This Matters
🌍 Real World
Drones often need to fly specific routes for tasks like surveying, delivery, or inspection. Programming missions with waypoints is a common real-world task.
💼 Career
Understanding how to upload and execute missions is important for drone operators, robotics programmers, and automation engineers.
Progress0 / 4 steps
1
Create the mission waypoints list
Create a list called mission_waypoints with these exact GPS coordinates as tuples: (34.0001, -117.0001), (34.0002, -117.0002), (34.0003, -117.0003).
Drone Programming
Hint
Use a list with tuples for each GPS coordinate.
2
Set the mission name
Create a string variable called mission_name and set it to "Test Flight 1".
Drone Programming
Hint
Use a simple string assignment.
3
Upload each waypoint to the drone
Use a for loop with variable waypoint to iterate over mission_waypoints and call upload_waypoint(waypoint) inside the loop.
Drone Programming
Hint
Use a for loop to send each waypoint to the drone.
4
Execute the mission and print status
Call execute_mission() and then print exactly "Mission Test Flight 1 completed successfully." using the mission_name variable.
Drone Programming
Hint
Call the execute function and print the message using an f-string.
Practice
(1/5)
1. What does uploading a mission to a drone usually do?
easy
A. It immediately starts the drone's engines.
B. It charges the drone's battery.
C. It returns the drone to its home location.
D. It sends the flight plan to the drone for automatic flying.
Solution
Step 1: Understand mission upload meaning
Uploading a mission means sending the flight plan to the drone's system.
Step 2: Identify what happens after upload
The drone receives the plan but does not start flying until commanded.
Final Answer:
It sends the flight plan to the drone for automatic flying. -> Option D
Quick Check:
Uploading mission = send flight plan [OK]
Hint: Uploading means sending the flight plan, not starting flight [OK]
Common Mistakes:
Confusing upload with starting the drone
Thinking upload charges the battery
Assuming upload returns drone home
2. Which of the following is the correct syntax to start a mission after uploading it in drone programming?
easy
A. drone.startMission()
B. drone.uploadMission()
C. drone.beginFlight()
D. drone.executePlan()
Solution
Step 1: Identify method to start mission
The method to start flying the uploaded mission is usually named startMission().
Step 2: Differentiate from upload method
uploadMission() uploads the plan but does not start flight.
Final Answer:
drone.startMission() -> Option A
Quick Check:
Start mission method = startMission() [OK]
Hint: Start mission uses startMission(), not uploadMission() [OK]
Common Mistakes:
Using uploadMission() to start flight
Confusing method names like beginFlight() which is invalid