I’m trying to replicate your formula, but I’m always getting a difference of ~3 units from the actual stop location. I’m not so good with math but I guess that my formula is following what you said.
// vi = vi−1 − (aB + βvi−1)∆t
// apply friction and braking
SimulatedVelocity = OldVelocity + (RevAccel + (-Friction * OldVelocity)) * dt;
// xi = xi−1 + vi−1∆t − (aB + βvi−1)(∆t)^2
StopLocation = OldLocation + OldVelocity * DeltaTime - (SimulatedVelocity * DeltaTime * DeltaTime);