GPS Coordinate System (latitude, longitude, altitude)
📖 Scenario: You are programming a drone to record its GPS position. The drone uses three values: latitude, longitude, and altitude to know where it is in the sky.Latitude and longitude tell the drone where it is on the Earth's surface. Altitude tells how high it is above the ground.
🎯 Goal: You will create a program that stores a GPS coordinate with latitude, longitude, and altitude. Then you will set a limit for altitude, check if the drone is flying too high, and finally print a message with the drone's position and altitude status.
📋 What You'll Learn
Create a dictionary called
gps_coordinate with keys 'latitude', 'longitude', and 'altitude' and exact values 37.7749, -122.4194, and 120 respectively.Create a variable called
max_altitude and set it to 100.Create a variable called
altitude_status that is 'Too High' if the altitude is greater than max_altitude, otherwise 'Safe'.Print a message showing the latitude, longitude, altitude, and altitude status in this exact format:
"Drone position: (37.7749, -122.4194), Altitude: 120m - Status: Too High".💡 Why This Matters
🌍 Real World
Drones use GPS coordinates to navigate and maintain safe flying heights. This program helps monitor if the drone is flying within safe altitude limits.
💼 Career
Understanding GPS data and conditional checks is important for drone programming, robotics, and any job involving location tracking and safety monitoring.
Progress0 / 4 steps