Calculation of threshold for triggering event A2

All: any idea why it is calculating hysteresis with * 0.5?