title: How to 'smooth' data and calculate line gradient?
body: <p>I'm reading data from a device which measures distance. My sample rate is high so that I can measure large changes in distance (i.e. velocity) but this means that, when the velocity is low, the device delivers a number of measurements which are identical (due to the granularity of the device). This results in a 'stepped' curve.</p>
  
  <p>What I need to do is to smooth the curve in order to calculate the velocity. Following that I then need to calculate the acceleration.</p>
  
  <p>How to best go about this?</p>
  
  <p>(Sample rate up to 1000Hz, calculation rate of 10Hz would be ok. Using C# in VS2005)</p>