Interpolating thresholds
Activity logging to CSV
Modified RMS calculation to use RunningStat
Corrected debugging printfs