function [lift Vballoon] = balloonlift(press,Pballon,Tballoon,airdensity,Tair) 
%as long as pressures are all the same, unitless. Assumes SI units

%diff assumes full pressure first, then end pressure
s = size(press);
%assumed K tank
vtank = 43.61/1000; %liters/1000 = cubic meters
predif = 0;
for n = 1:s(1)
 predif1 = press(n,1)-press(n,2) + predif;
 predif = predif1;
end
Vballoon = predif.*vtank./(Pballon)*(Tballoon/Tair); %cubic meters
%Uses Ideal Gas law assuming the temperatures are the same. 


pHe = (Pballon.*4.002602)./(Tballoon.*8314.4598); %M for He and R value
lift = Vballoon.*(airdensity-pHe).*9.80665;
%answer in newtons
end