Multipath detection based on K-means clustering