The paper deals with a problem of automatic identification system (AIS) data analysis, especially eliminating the impact of AIS packet collision and detecting existing outliers in AIS data. To solve this problem, a clustering-based approach is proposed. AIS is a system that supports the exchange of information between vessels about their trajectories, e.g. position, speed or course. However, SAT-AIS, which enables the system to work on a global scale, struggles against packet collisions due to the fact that the satellite, which receives AIS data from ships, has a field of view that covers multiple areas that are not synchronized among themselves. As a result, the received data is difficult to process by AIS receivers, because most of the messages have a character of noise. In this paper, results of a computational experiment using k-means algorithm for packet recovery and for dealing with noise have been presented. The outcome proves that a clustering-based approach could be used as an initial step in AIS packet reconstruction, when the original data is incorrect.