function [mp,ms,lambda]=nma_rocket_solveRocketEquationOneStage(epsilon,mL,Isp,deltaV)
%Solves for Mp (mass of properellent) and Ms (mass of structure) for a given one stage rocket.
%function [mp,ms,lambda]=nma_rocket_findMpFromRocketEquation(epsilon,mL,Isp,deltaV)
%
% Solves for Mp (mass of properellent) and Ms (mass of structure)
% for a given one stage rocket.
%
% Input:
% epsilon: The structral mass ratio ( defined as ms/(mp+ms) ).
% mL: the mass of the payload to carry. in kg.
% Isp: the specific impulse. in seconds.
% deltaV: the speed gain in meters/seconds.
%
% Output:
% mp: mass of properllent in kg
% ms: mass of structure in kg
% lambda: the payload ratio= mL/(ms+mp)
%
% Author: Nasser Abbasi
% May 30, 2003
%
g = 9.8066; % conversion factor
LHS = exp(deltaV/(g*Isp));
m = mL*(1-LHS) / (epsilon*LHS - 1);
ms = epsilon*m;
mp = m-ms;
lambda = mL/(mp+ms);