Numerical model of the trajectory of a floating body in coastal areas