0
0
Drone Programmingprogramming~10 mins

Why waypoint navigation enables autonomous missions in Drone Programming - Test Your Understanding

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to define a waypoint with latitude.

Drone Programming
waypoint = {'latitude': [1], 'longitude': -122.084}
Drag options to blanks, or click blank then click option'
A37.422
B'37.422'
Clatitude
Dlongitude
Attempts:
3 left
💡 Hint
Common Mistakes
Using quotes around the number, making it a string instead of a number.
2fill in blank
medium

Complete the code to add a waypoint to the mission list.

Drone Programming
mission = []
mission.append([1])
Drag options to blanks, or click blank then click option'
Alatitude
B{'latitude': 37.422, 'longitude': -122.084}
Cmission
Dwaypoint
Attempts:
3 left
💡 Hint
Common Mistakes
Appending a variable name that is not defined.
3fill in blank
hard

Fix the error in the code to loop through waypoints correctly.

Drone Programming
for [1] in mission:
    print(f"Flying to {waypoint['latitude']}, {waypoint['longitude']}")
Drag options to blanks, or click blank then click option'
Awp
Bmission
Cwaypoint
Dpoint
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'mission' as loop variable, which is the list, not an item.
4fill in blank
hard

Fill both blanks to check if the drone reached the waypoint.

Drone Programming
if current_location['latitude'] [1] waypoint['latitude'] and current_location['longitude'] [2] waypoint['longitude']:
    print('Waypoint reached')
Drag options to blanks, or click blank then click option'
A==
B>
C<
D!=
Attempts:
3 left
💡 Hint
Common Mistakes
Using greater than or less than operators which do not confirm exact location.
5fill in blank
hard

Fill both blanks to create a dictionary comprehension for waypoints above altitude 100.

Drone Programming
high_altitude_waypoints = {wp['name']: wp['altitude'] for wp in waypoints if wp['altitude'] [1] [2]
Drag options to blanks, or click blank then click option'
A>
B100
C<
D==
Attempts:
3 left
💡 Hint
Common Mistakes
Using '<' or '==' which do not select waypoints above 100.