import numpy as np
import matplotlib.pyplot as plt

#Variables
wetweight = 27.0; #lbs/kft
cf5Buoyancy = 1.7;
cf3Buoyancy = 0.39;

floatedLength = np.linspace(50,200,500); #ft

#Calculate Weight

floatedSectionWetWeight = wetweight/1000.0 *floatedLength
cf3FloatsReq = np.ceil(floatedSectionWetWeight/cf3Buoyancy); 
cf5FloatsReq = np.ceil(floatedSectionWetWeight/cf5Buoyancy); 

fig = plt.figure()
ax1 = fig.add_subplot(211)
ax1.plot(floatedLength,floatedSectionWetWeight)
ax1.set(title="2018 Tether Floats",
        ylabel="Tether Wet Weight")
ax1.grid(True)
ax2 = fig.add_subplot(212)
ax2.plot(floatedLength, cf3FloatsReq, label="CF3")
ax2.plot(floatedLength, cf5FloatsReq, label="CF5")
ax2.set(xlabel="Section Length (ft)",ylabel="Number Floats")
ax2.legend(loc="best")
ax2.grid(True)
plt.savefig('2018Floats.png')
plt.show()


