      function x=accel(vr,vu)
      global V AA cd At po p pa rho eta h Vuo f ve cdrag rhoa m n me
%
%    this function calculates current vehicle accel in ft/sec^2     
%
      g=32.174;            			% gravity, ft/sec^2
      f=rho*cd*ve^2*At*12/g;		% thrust, lb
      m=me+rho*(V-vu);				% weight of rocket, lb
      d=cdrag*AA*0.5*rhoa*vr^2/(144*g);	% drag
      eta=(f-d)/m;					% total accel in g
      x=g*(eta-1.);					% incremental accel in ft/sec^2
