%% e5dvfit.m is called by modmcilpp2.m to minmise the
%% combined radial and angular velocity. 
%%

function vel=e5dvfit(c,kp)

% c(1) = MLT (hours)
% c(2) = L-shell
% kp = Kp of interest
% vel = resultant velocity (km/s)

mlt=c(1);                                         %MLT
lsh=c(2);                                         %L-shell
[vth,vrd]=modmcilvel2(lsh,mlt,kp,0);              %determine the required vth and vrd velocities
vel=sqrt(vth^2+vrd^2);                            %determine the resultant velocity




