It sounds like you are on the right track. I haven't looked at your code yet, but here's one approach in pseudocode:
1) read in the data labels row and find the index of engine speed
while rowsToRead >0
2) read the next row, and index out engine speed
- feed it into a point-by-point low pass filter
- check the derivative of the output of the filter
- if < threshold
write to file _filtered.csv
- endif
note: you will need to prime the filter with a few rows before you can get useful results, so you will probably have to throw out the first few rows
Chris