function y = cartraj(u)
%
% matlab implementation of trajectory generation
if u(1) > 75
    y(3,1) = u(1) - 100;
    y(1,1) = 45;
elseif u(1) >= 25
    y(3,1) = 50 - u(1);
    y(1,1) = -45;
    
else
    y(3,1) = u(1);
    y(1,1) = 45;
    
end

y = [y(1,1); 0; y(3,1); 0; 0];