Receiving telemetry data
📖 Scenario: You are programming a drone that sends telemetry data about its position and battery level. You want to receive this data and process it step-by-step.
🎯 Goal: Build a program that receives telemetry data as a dictionary, sets a battery warning threshold, filters the telemetry data to find values below the threshold, and then prints the warnings.
📋 What You'll Learn
Create a dictionary called
telemetry_data with keys 'altitude', 'speed', and 'battery' and values 120, 45, and 15 respectively.Create a variable called
battery_warning_level and set it to 20.Use a dictionary comprehension called
warnings to include only telemetry items where the value is less than battery_warning_level.Print the
warnings dictionary.💡 Why This Matters
🌍 Real World
Drones send telemetry data to ground stations to monitor flight status and safety.
💼 Career
Understanding how to receive and filter telemetry data is important for drone software developers and engineers working with real-time sensor data.
Progress0 / 4 steps