% start with bicycle model using proportional steering
function yprime=bicycle(t,y);
kp = 0.5;    % proportional gain
V = 2.0;     % car speed m/s
L = 0.3;     % car length m
% y(1) = steering angle theta
% y(2) = lateral position from line ya
% y(3) = longitudinal position xb (back of car)
% y(4) = lateral position (back of car)
delta = kp * 0.05*round(20.0*y(2));
yprime=[(V/L)*tan(delta)
	-V*(sin(y(1)) + tan(delta)*cos(y(1)))
	V*cos(y(1))
	-V*sin(y(1))];


