Challenge - 5 Problems
Flight Controller Mastery
Get all challenges correct to earn this badge!
Test your skills under time pressure!
❓ Predict Output
intermediateOutput of ArduPilot mode selection code
What is the output of this Python code simulating ArduPilot flight mode selection?
Drone Programming
modes = {0: 'Stabilize', 1: 'AltHold', 2: 'Loiter', 3: 'Auto'}
selected_mode = 2
print(f"Selected mode: {modes[selected_mode]}")Attempts:
2 left
💡 Hint
Look up the value for key 2 in the dictionary.
✗ Incorrect
The dictionary maps 2 to 'Loiter', so the print statement outputs 'Selected mode: Loiter'.
🧠 Conceptual
intermediateUnderstanding PX4 parameter update behavior
In PX4 flight controller, which statement best describes how parameters are updated during flight?
Attempts:
2 left
💡 Hint
PX4 supports dynamic parameter updates.
✗ Incorrect
PX4 allows live parameter updates that apply immediately without rebooting, enabling in-flight tuning.
❓ Predict Output
advancedBetaflight PID tuning output
What is the output of this Python snippet simulating Betaflight PID tuning adjustments?
Drone Programming
pid = {'P': 40, 'I': 30, 'D': 23}
pid['P'] += 5
pid['I'] -= 10
print(pid)Attempts:
2 left
💡 Hint
Check how the dictionary values change after the increments and decrements.
✗ Incorrect
P is increased by 5 (40+5=45), I is decreased by 10 (30-10=20), D remains 23.
🔧 Debug
advancedIdentify error in PX4 parameter code
What error does this Python code produce when simulating PX4 parameter access?
Drone Programming
params = {'SYS_AUTOSTART': 1001, 'COM_RC_IN_MODE': 1}
print(params['SYS_BAUDRATE'])Attempts:
2 left
💡 Hint
Check if the key 'SYS_BAUDRATE' exists in the dictionary.
✗ Incorrect
The key 'SYS_BAUDRATE' is not in the dictionary, so accessing it raises a KeyError.
🚀 Application
expertCalculate total flight time from ArduPilot battery data
Given this Python code simulating battery voltage readings from ArduPilot, what is the total flight time in minutes?
Drone Programming
voltages = [12.6, 12.4, 12.1, 11.8, 11.5] interval_seconds = 60 flight_time = (len(voltages) - 1) * interval_seconds / 60 print(flight_time)
Attempts:
2 left
💡 Hint
The total time spans (number of readings - 1) intervals. Multiply by interval and convert seconds to minutes.
✗ Incorrect
There are 5 readings taken 60 seconds apart, covering 4 intervals: (5-1)*60 = 240 seconds = 4 minutes.
