Estimating forward velocity for a swimmer
Your most important question is not the algorithm. You must check the precision of the sensor you can buy. I've tried several sensors, after 50 seconds the cumulated error can be a magnitude higher then the velocity itself. If you can buy a 1000 USD sensor, then it's precision would be sufficient, but you still have the problem that there will be no 0 position and 0 velocity, ie. the sensor will be moving even if the swimmer has not yet started to swim. This movement of the sensor will be greater then the difference between the velocities of two swimmers.