In this paper we consider the problem of autonomous landing on a horizontally moving platform with vertical unpredictable oscillatory dynamics using a quadrotor system. The quadrotor is equipped with an external Raspberry PI as a companion computer used for communications. The task is divided in two subproblems: tracking and landing. We present the algorithms involved for the entire procedure; a PI regulator is used for the tracking problem while descending is made by controlling relative vertical velocity. A finite state machine approach is chosen to manage multiple robot states and recover from failures. A software framework was developed in order to manage general flight missions and, in this case, the landing assignment. At the end, we performed simulation and real experiments in order to validate the outcome of this work.