0
0
Drone Programmingprogramming~10 mins

Failsafe actions (RTL, Land, SmartRTL) in Drone Programming - Interactive Code Practice

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

Complete the code to set the drone's failsafe action to Return To Launch (RTL).

Drone Programming
drone.setFailsafeAction([1])
Drag options to blanks, or click blank then click option'
AFailsafeAction.SMART_RTL
BFailsafeAction.LAND
CFailsafeAction.RTL
DFailsafeAction.HOVER
Attempts:
3 left
💡 Hint
Common Mistakes
Choosing LAND instead of RTL will make the drone land immediately instead of returning.
SMART_RTL is a different mode that may not be supported everywhere.
2fill in blank
medium

Complete the code to make the drone land immediately as a failsafe action.

Drone Programming
drone.setFailsafeAction([1])
Drag options to blanks, or click blank then click option'
AFailsafeAction.LAND
BFailsafeAction.HOVER
CFailsafeAction.SMART_RTL
DFailsafeAction.RTL
Attempts:
3 left
💡 Hint
Common Mistakes
Using RTL will make the drone fly back instead of landing.
SMART_RTL is a smarter return mode, not immediate landing.
3fill in blank
hard

Fix the error in the code to set the failsafe action to Smart Return To Launch (SmartRTL).

Drone Programming
drone.setFailsafeAction([1])
Drag options to blanks, or click blank then click option'
AFailsafeAction.SMART_RTL
BFailsafeAction.LAND
CFailsafeAction.RTL
DFailsafeAction.HOVER
Attempts:
3 left
💡 Hint
Common Mistakes
Using RTL instead of SMART_RTL misses the smart features.
LAND will cause the drone to land immediately, not return.
4fill in blank
hard

Fill both blanks to check if the failsafe action is set to RTL or Land.

Drone Programming
if drone.getFailsafeAction() == [1] or drone.getFailsafeAction() == [2]:
    drone.alertPilot()
Drag options to blanks, or click blank then click option'
AFailsafeAction.RTL
BFailsafeAction.LAND
CFailsafeAction.SMART_RTL
DFailsafeAction.HOVER
Attempts:
3 left
💡 Hint
Common Mistakes
Checking for SMART_RTL instead of RTL or LAND.
Using HOVER which is not a failsafe action here.
5fill in blank
hard

Fill all three blanks to create a dictionary mapping failsafe actions to their descriptions.

Drone Programming
failsafe_descriptions = {
    [1]: "Return To Launch",
    [2]: "Land Immediately",
    [3]: "Smart Return To Launch"
}
Drag options to blanks, or click blank then click option'
AFailsafeAction.RTL
BFailsafeAction.LAND
CFailsafeAction.SMART_RTL
DFailsafeAction.HOVER
Attempts:
3 left
💡 Hint
Common Mistakes
Mixing up the constants and descriptions.
Including HOVER which is not part of the failsafe descriptions here.