A new distance-based algorithm for block turbo codes : from concept to implementation