0
0
Drone Programmingprogramming~30 mins

Indian drone regulations (DGCA rules) in Drone Programming - Mini Project: Build & Apply

Choose your learning style9 modes available
Indian Drone Regulations (DGCA Rules) Checker
📖 Scenario: You are building a simple program to check if a drone flight plan follows the Indian DGCA (Directorate General of Civil Aviation) drone regulations. The DGCA has rules about drone weight, maximum altitude, and no-fly zones.This program will help drone operators quickly verify if their drone flight plan is allowed under the rules.
🎯 Goal: Create a program that stores drone flight details, sets regulation limits, checks if the flight plan follows the DGCA rules, and then outputs whether the flight is allowed or not.
📋 What You'll Learn
Create a dictionary with drone flight details: weight in kg, altitude in meters, and location coordinates (latitude and longitude).
Create variables for DGCA regulation limits: maximum allowed weight, maximum allowed altitude, and a list of no-fly zone coordinates.
Write code to check if the drone's weight and altitude are within limits and if the location is outside all no-fly zones.
Print the final result: 'Flight Allowed' or 'Flight Not Allowed' based on the checks.
💡 Why This Matters
🌍 Real World
Drone operators in India must follow DGCA rules to fly drones safely and legally. This program helps quickly check if a flight plan is allowed.
💼 Career
Understanding how to apply regulations in code is useful for drone software developers, aviation safety engineers, and regulatory compliance specialists.
Progress0 / 4 steps
1
DATA SETUP: Create the drone flight details dictionary
Create a dictionary called drone_flight with these exact entries: 'weight_kg': 2.5, 'altitude_m': 120, 'location': (28.6139, 77.2090) (latitude and longitude of New Delhi).
Drone Programming
Need a hint?

Use curly braces {} to create a dictionary. The location is a tuple with latitude and longitude.

2
CONFIGURATION: Set DGCA regulation limits
Create three variables: max_weight_kg set to 5, max_altitude_m set to 120, and no_fly_zones set to a list containing one tuple (28.6139, 77.2090) representing a no-fly zone at New Delhi.
Drone Programming
Need a hint?

Use a list with one tuple for no_fly_zones. Variables are simple assignments.

3
CORE LOGIC: Check if the flight plan follows DGCA rules
Write code to check if drone_flight['weight_kg'] is less than or equal to max_weight_kg, drone_flight['altitude_m'] is less than or equal to max_altitude_m, and drone_flight['location'] is NOT in no_fly_zones. Store the result (True or False) in a variable called flight_allowed.
Drone Programming
Need a hint?

Use the and operator to combine all conditions. Use not in to check location.

4
OUTPUT: Print if the flight is allowed or not
Write a print statement that outputs 'Flight Allowed' if flight_allowed is True, otherwise print 'Flight Not Allowed'.
Drone Programming
Need a hint?

Use an if-else statement to print the correct message based on flight_allowed.