Rainflow
Fast rainflow counting written in C (C99)
Rainflow Counting Algorithm (4-point-method), C99 compliant.
"Rainflow Counting" consists of four main steps:
1. Hysteresis Filtering
2. Peak-Valley Filtering
3. Discretization
4. Four Point Counting Method:
These steps are fully documented in standards such as ASTM E1049 "Standard Practices for Cycle Counting in Fatigue Analysis" [1].
This implementation uses the 4-point algorithm mentioned in [2].
To take the residue into account, you may implement a custom method...