In the code the feature step_duration is calculated as: ipsi_fs_time - ipsi_fo_time, which is the swing duration. Whereas it should be given as the contra_fs_time. Additionally the calculation for the feature swing_duration_prec refers the calculation for step_duration, which must be adjusted accordingly.