Design and implementation of a testing platform for ship control: A case study on the optimal switching controller for ship motion. (April 2023)