"""
Author: M. Graham Macy
Edited: 8/5/2024

Description:
Containts constants that may or may not
be accurate.

Guesses and assumptions are marked.
Arbitrary decisions are marked.

"""



###########################################################################
# Data Files
###########################################################################

airport_filename = "airportData.csv"
schedule_filename = "flightSchedule.csv"

###########################################################################
# Aircraft Constants
###########################################################################
MGTOW_737_8_lbs = 174_200  
MGTOW_737_9_lbs = 174_200 
OEW_737_8_lbs = 90_710
OEW_737_9_lbs = 93_680
BOW_737_8_lbs = OEW_737_8_lbs + 1_000 # basic operating weight
# (OEW + crew, oil, equipment) # no reference, just a guess
L_D_max_737 = 17
fuel_capacity_lbs = 6_875
ZFW_lbs = 138_300 # max zero fuel weight
reserve_fuel_lbs = 1_500 # just a guess
LGW_lbs = ZFW_lbs + reserve_fuel_lbs # just a guess for reserve fuel
num_passengers = 177 # REFERENCE?
passenger_weight_lbs = 210

###########################################################################
# Flight Constants
###########################################################################

taxi_time_hrs = 0.25 # just a guess
ground_time_hrs = 1.5
sound_speed_ft_s_FL37 = 968
Mach_cruise = 0.793
SFC_s_nmi = 9.09654*10 ** -3 # calculated from Breguet Range Eq

###########################################################################
# Scientific Constants
###########################################################################

ft_per_nmi = 6076.11549
sec_per_hour = 3600
hrs_per_day = 24
g_ft_s2 = 31.2

###########################################################################
# Flight Ops Policy Constants
###########################################################################

range_max_nmi = 2000
range_min_nmi = 500
max_daily_op_hrs = 16

###########################################################################
# Engine Maintenance Constants
###########################################################################
# LLP limits of Fan-LPC, Core, LPT defined by OEM

fan_limit = 30_000 # REFERENCE
core_limit = 20_000 # REFERENCE
lpt_limit = 25_000 # REFERENCE
cr_threshold = 150 # arbitrary
new_eng_cycles = 300
old_eng_cycles = 15000
EGTM_limit_degC = 20  # arbitrary

# maintenance time
engine_swap_aog_hrs = 3 # assume 3 hours for an engine swap

"""
References:
-constant velocity of Mach 0.793 at 37000 ft
(source: https://aviation.stackexchange.com/questions/67582/what-is-the-typical-fuel-consumption-of-a-737-in-mpg#67603)
-Speed of sound at 37000 ft: 968 ft/s
(source: https://www.engineeringtoolbox.com/elevation-speed-sound-air-d_1534.html)
-Lift-to-drag ratio of B737 of 17
(extrapolated from graphs here: https://web.mit.edu/16.unified/www/FALL/Unified_Concepts/Breguet-Range-U2-notes-Fall08(2).pdf)
-SFC of B737 calculated to make the units work (s/nmi)
-SFC Calculated with Breguet range equation and information about max
range, OEW, and MGTOW from source:
https://planenerd.com/range-of-boeing-737/#737-next-generation-range
-Weights from here: https://www.boeing.com/content/dam/boeing/boeingdotcom/commercial/services/assets/brochure/737_800BCF.pdf


"""
