A. vehicle.mode should be set using a Mode object, not a string
B. connect function is missing required parameters
C. vehicle.armed cannot be set to True
D. The IP address format is incorrect
Solution
Step 1: Review how to set flight mode in DroneKit
Flight mode must be set using a Mode object, e.g., vehicle.mode = VehicleMode('GUIDED'), not a plain string.
Step 2: Check other lines for errors
connect usage and IP format are correct; arming with True is allowed.
Final Answer:
vehicle.mode should be set using a Mode object, not a string -> Option A
Quick Check:
Set mode with VehicleMode('GUIDED') [OK]
Hint: Use VehicleMode() to set mode, not plain strings [OK]
Common Mistakes:
Assigning mode as a string directly
Thinking connect needs more parameters
Believing arming is disallowed by assignment
5. You want to write a DroneKit script that connects to a drone, changes its mode to 'GUIDED', arms it, and then takes off to 10 meters altitude. Which sequence of commands is correct?
Step 1: Understand the correct order of drone commands
First, connect to the drone, then set the mode to 'GUIDED', arm the drone, and finally command takeoff.
Step 2: Check each option's sequence
connect -> vehicle.mode = VehicleMode('GUIDED') -> vehicle.armed = True -> vehicle.simple_takeoff(10) follows the correct logical order. Others set mode or arm before connecting or call takeoff too early.