Safe Trajectory Planning for Maritime Surface Ships