Vaibhav Project
Vaibhav Project
Vaibhav Singh
B. Roll No-
FLIGHT MANAGEMENT SYSTEM
Flight Planning: It allows for the pre-programming of routes and the modification
of the flight plan in-flight
Trajectory Prediction: The FMS can predict the aircraft's trajectory based on the
programmed flight plan and performance data
In-flight Guidance: The FMS generates steering commands or visual cues to advise
the flight crew on how to follow the programmed flight plan
In order to implement these functions, the FMS interfaces with a variety of other
avionics systems and comprises components such as the Flight Management
Computer (FMC), Automatic Flight Control System (AFCS), Aircraft Navigation
System, and Electronic Flight Instrument System (EFIS)
SOURCE CODE IN PYTHON
import csv
import os
FLIGHTS_FILE = 'flights.csv'
def load_flights():
try:
with open(FLIGHTS_FILE, 'r') as file:
reader = csv.DictReader(file)
flights = list(reader)
return flights
except FileNotFoundError:
return []
def save_flights(flights):
with open(FLIGHTS_FILE, 'w', newline='') as file:
fieldnames = ['FlightNumber', 'DepartureCity', 'DestinationCity', 'DepartureTime']
writer = csv.DictWriter(file, fieldnames=fieldnames)
writer.writeheader()
writer.writerows(flights)
def add_flight():
flight_number = input("Enter Flight Number: ")
departure_city = input("Enter Departure City: ")
destination_city = input("Enter Destination City: ")
departure_time = input("Enter Departure Time: ")
new_flight = {
'FlightNumber': flight_number,
'DepartureCity': departure_city,
'DestinationCity': destination_city,
'DepartureTime': departure_time
}
flights.append(new_flight)
save_flights(flights)
print("Flight added successfully!")
def view_flights():
if flights:
for flight in flights:
print(flight)
else:
print("No flights available.")
def search_flight_by_destination():
destination = input("Enter Destination City to search: ")
matching_flights = [flight for flight in flights if flight['DestinationCity'] ==
destination]
if matching_flights:
print("Matching Flights:")
for flight in matching_flights:
print(flight)
else:
print("No matching flights found.")
def update_flight():
flight_number = input("Enter Flight Number to update: ")
for flight in flights:
if flight['FlightNumber'] == flight_number:
print("Flight found. Enter new details:")
flight['DepartureCity'] = input("Enter new Departure City: ")
flight['DestinationCity'] = input("Enter new Destination City: ")
flight['DepartureTime'] = input("Enter new Departure Time: ")
save_flights(flights)
print("Flight updated successfully!")
return
print("Flight not found.")
def delete_flight():
flight_number = input("Enter Flight Number to delete: ")
for flight in flights:
if flight['FlightNumber'] == flight_number:
flights.remove(flight)
save_flights(flights)
print("Flight deleted successfully!")
return
print("Flight not found.")
def main():
while True:
print("\nFlight Management System")
print("1. Add Flight")
print("2. View Flights")
print("3. Search Flights by Destination")
print("4. Update Flight")
print("5. Delete Flight")
print("6. Exit")
choice = input("Enter your choice: ")
if choice == '1':
add_flight()
elif choice == '2':
view_flights()
elif choice == '3':
search_flight_by_destination()
elif choice == '4':
update_flight()
elif choice == '5':
delete_flight()
elif choice == '6':
print("Exiting program. Goodbye!")
break
else:
print("Invalid choice. Please enter a valid option.")
if __name__ == "__main__":
flights = load_flights()
main()
SCREENSHOTS
1.MAIN MENU
2. ADDING FLIGHT
3. VIEWING FLIGHT
4. SEARCHING FLIGHTS BY DESTINATION
5. UPDATING FLIGHT
6. DELETING FLIGHT
7. EXITING FLIGHT
SCREENSHOT OF CSV DATABASE
LIMITATION OF FMS
The Flight Management System (FMS) has several limitations that can affect its
performance, including:
Compatibility issues: FMS may not be compatible with all air traffic
control systems, which can limit its effectiveness in certain regions or
airports
www.wikipedia.org
www.w3resource.com