souvik0306 commited on
Commit
b6c80ee
·
1 Parent(s): 53ec97e

fuel calculation corrections

Browse files
Files changed (2) hide show
  1. aircraft.csv +4 -4
  2. flight_distance.py +3 -2
aircraft.csv CHANGED
@@ -7,7 +7,7 @@ Airbus A330-300,6350,11760.2,5700,490,907.48,12.96,73872
7
  Airbus A340-300,7300,13519.6,6500,488,903.78,14.96,97240
8
  Airbus A340-500,9000,16668,8000,488,903.78,18.44,147520
9
  Airbus A350-900,8100,15732,5800,470,903,17.23,165000
10
- Airbus A380,8000,14816,12280,470,903,17.35,256000
11
  Boeing 737-800,2935,5435.62,2530,455,842.66,6.45,16318.5
12
  Boeing 747-400,7260,13445.52,10230,488,903.78,14.88,152222.4
13
  Boeing 747-8,7730,14315.96,9600,470,870.44,16.45,157920
@@ -15,9 +15,9 @@ Boeing 757-200,3915,7250.58,3320,470,870.44,8.33,27655.6
15
  Boeing 767-200,3900,7222.8,4500,470,870.44,8.3,37350
16
  Boeing 767-300,4020,7445.04,4800,470,870.44,8.55,41040
17
  Boeing 767-300ER,5980,11074.96,4940,490,907.48,12.2,60268
18
- Boeing 777-200,5240,9704.48,6080,490,907.48,10.69,93872
19
  Boeing 777-200ER,7725,14306.7,6630,470,870.44,16.44,136936
20
  Boeing 777-200LR,8555,15843.86,6800,488,903.78,17.53,145024
21
  Boeing 777-300ER,7370,13649.24,7700,447,827.84,16.49,145024
22
- Boeing 787-8,7355,13621.46,4900,447,827.84,16.45,101343
23
- Boeing 787-9,7530,13945.56,5600,447,827.84,17.45,101522
 
7
  Airbus A340-300,7300,13519.6,6500,488,903.78,14.96,97240
8
  Airbus A340-500,9000,16668,8000,488,903.78,18.44,147520
9
  Airbus A350-900,8100,15732,5800,470,903,17.23,165000
10
+ Airbus A380-800,8000,14816,12280,470,903,17.35,256000
11
  Boeing 737-800,2935,5435.62,2530,455,842.66,6.45,16318.5
12
  Boeing 747-400,7260,13445.52,10230,488,903.78,14.88,152222.4
13
  Boeing 747-8,7730,14315.96,9600,470,870.44,16.45,157920
 
15
  Boeing 767-200,3900,7222.8,4500,470,870.44,8.3,37350
16
  Boeing 767-300,4020,7445.04,4800,470,870.44,8.55,41040
17
  Boeing 767-300ER,5980,11074.96,4940,490,907.48,12.2,60268
18
+ Boeing 777-200,5240,9704.48,6080,490,907.48,10.69,136936
19
  Boeing 777-200ER,7725,14306.7,6630,470,870.44,16.44,136936
20
  Boeing 777-200LR,8555,15843.86,6800,488,903.78,17.53,145024
21
  Boeing 777-300ER,7370,13649.24,7700,447,827.84,16.49,145024
22
+ Boeing 787-8,7355,13621.46,4900,447,903,16.45,101343
23
+ Boeing 787-9,7530,13945.56,5600,447,903,17.45,101522
flight_distance.py CHANGED
@@ -134,7 +134,7 @@ def calculate_fuel_and_time(distance, cruising_speed, fuel_burn_rate, reserve_fu
134
  """
135
  # Phase speeds and times
136
  climb_speed = cruising_speed*0.3 # km/h
137
- descent_speed = cruising_speed*0.2 # km/h
138
  climb_descent_distance = round(distance * climb_descent_fraction,2)
139
  cruise_distance = round(distance - (2 * climb_descent_distance),2) # Remaining distance for cruise
140
 
@@ -148,12 +148,13 @@ def calculate_fuel_and_time(distance, cruising_speed, fuel_burn_rate, reserve_fu
148
  climb_time = round(climb_descent_distance / climb_speed,2)
149
  descent_time = round(climb_descent_distance / descent_speed,2)
150
  # Total flight time
151
- print(climb_descent_distance,climb_time,cruise_distance, cruise_time,descent_time)
152
  total_flight_time = climb_time + cruise_time + descent_time
153
 
154
  # Fuel calculations
155
  fuel_required = total_flight_time * fuel_burn_rate
156
  reserve_fuel = reserve_fuel_percentage * max_fuel_capacity
 
157
  total_fuel_with_reserve = fuel_required + reserve_fuel
158
 
159
  return total_fuel_with_reserve, total_flight_time
 
134
  """
135
  # Phase speeds and times
136
  climb_speed = cruising_speed*0.3 # km/h
137
+ descent_speed = cruising_speed*0.3 # km/h
138
  climb_descent_distance = round(distance * climb_descent_fraction,2)
139
  cruise_distance = round(distance - (2 * climb_descent_distance),2) # Remaining distance for cruise
140
 
 
148
  climb_time = round(climb_descent_distance / climb_speed,2)
149
  descent_time = round(climb_descent_distance / descent_speed,2)
150
  # Total flight time
151
+ # print(climb_descent_distance,climb_time,cruise_distance, cruise_time,descent_time)
152
  total_flight_time = climb_time + cruise_time + descent_time
153
 
154
  # Fuel calculations
155
  fuel_required = total_flight_time * fuel_burn_rate
156
  reserve_fuel = reserve_fuel_percentage * max_fuel_capacity
157
+ # print(fuel_burn_rate, fuel_required, reserve_fuel)
158
  total_fuel_with_reserve = fuel_required + reserve_fuel
159
 
160
  return total_fuel_with_reserve, total_flight_time