For the visual navigation and positioning of drones, the optical flow algorithm is used to calculate the flight speed of the drone, the calculation errors of its rotation state, and the vertical take-off and landing state. Based on the characteristics of its optical flow data, this paper compares various classification calculation methods. It uses the median KNN curve of the optical flow vector to simplify its feature quantity. Finally, it realizes the motion of the UAV with the optical flow characteristics based on the SVM algorithm. State recognition experiments have proved that this method can effectively identify the motion state of the UAV, and the calculation efficiency is high.