A python script takes 10 minutes or so to type...
# Flight variable - make changes here.
Pilot_Weight = 230
Pass_Weight = 230
Fuel_Gal = 16
Bag_Weight = 0
# fixed stuff - weights
mt_weight = 740
gross_weight = 1300
fuel_weight = Fuel_Gal * 6.25 #gasoline 6.25 lb/gal
useful_weight = gross_weight - mt_weight
# fixed stuff - moments. Enter only once.
seat_arm = 41
fuel_arm = 40.1875
bag_arm = 62
mt_moment = mt_weight*31.75
fwd_cg_arm = 30.225 # maximum forward CG
aft_cg_arm = 40.425 # maximum aft CG
#spin_line_cg = [36, 33.5]
#spin_line_wt = [739 1300]
# calculate weights and moments
Takeoff_Weight = mt_weight + Pilot_Weight + Pass_Weight + fuel_weight + Bag_Weight
print('Takeoff Weight = ',Takeoff_Weight,' pounds' )
if Takeoff_Weight > gross_weight: # oops, too much
Over_Weight = Takeoff_Weight - gross_weight
print('Excess Weight = ',Over_Weight,' pounds' )
tmp = gross_weight - (mt_weight + Pilot_Weight + Pass_Weight + Bag_Weight)
Max_Fuel_Gal = tmp/6.25
print('Max Fuel Load = ',Max_Fuel_Gal,' gallons')
else:
Weight_Reserve = gross_weight - Takeoff_Weight
print('Weight Reserve = ',Weight_Reserve,' pounds')
Nofuel_Weight = (mt_weight + Pilot_Weight + Pass_Weight + Bag_Weight)
Seat_Moment = seat_arm * (Pilot_Weight + Pass_Weight)
Fuel_Moment = fuel_arm * fuel_weight
Bag_Moment = bag_arm * Bag_Weight
Takeoff_Cg = (mt_moment + Seat_Moment + Fuel_Moment + Bag_Moment)/Takeoff_Weight
Nofuel_Cg = (mt_moment + Seat_Moment+ Bag_Moment)/Nofuel_Weight
if Takeoff_Cg < fwd_cg_arm or Nofuel_Cg < fwd_cg_arm:
print("ERROR!! Cg beyond forward limit = ",fwd_cg_arm)
elif Takeoff_Cg > aft_cg_arm or Nofuel_Cg > aft_cg_arm:
print("ERROR!! Cg beyond aft limit = ",aft_cg_arm)
else:
print("Cg between limits of ",fwd_cg_arm," and ",aft_cg_arm)
print ("Cg at takeoff = ",Takeoff_Cg,", no fuel Cg = ",Nofuel_Cg)
input("Press Enter to end the program.")