The mass of the spring-mass-damper system shown below was initially displaced by 1 meter to the right and then released. The subsequent acceleration of the mass was measured using an accelerometer; this data is contained in the file smd_data.txt posted on the class web site.
The file contains ascii data which provides the acceleration of the mass as a function of time; the first column of data in the file is time in seconds, the second column is the acceleration in meters/sec^{2}. We wish to determine the maximum compressive force experienced by the spring during the time range provided in the data. The spring force is equal to the spring rate times the displacement, F_{spring} = ks.
Write a script file which will determine the displacement of the mass as a function of time from the acceleration data. Trapezoidal integration will provide sufficient accuracy to infer the position and velocity of the seat as a function of time. Your program should plot the position of the mass as a function of time. You can use this plot to estimate the maximum negative displacement of the mass; the maximum compressive force is this displacement times the spring rate (k = 100 N/m).