function [road] = whittierbump(v)
% function [road] = whittierbump(v)
%
% Generates a section of road given parameters,
% conforming to Whittier Place speed bumps.
%
% velocity (specified in meters per second, 
%             according to adem, yo aron, enough!)
%
% Returns a single matrix consisting of two columns.
% The second column should be the road height, and 
% the first column should be the time at which the 
% car reaches that point in the road, assuming a 
% constant velocity.
%

% bump 3 heights
height = [ 0 0.6 1.5 2.5 3.8 4.5 5.5 6.8 7.5 8 8.3 8 7.5 6.8 5.5 4.5 3.8 2.5  1.5 0.6 0 ];

% put it into meters
height = height ./ 100;

dD = 6 * 2.54 / 100;

dist = 0:1:20;
dist = dist * dD;
time = dist / v;

time = time';
height = height';

road = [ time height ];
