fix initial values for trip detection