A mathematical model and software implementation of a computational algorithm of forming program motion in a scheduled turn of small spacecraft are described in the article. The algorithm is intended to calculate the key parameters of the path of a scheduled turn of small spacecraft, to specify the time moments when spacecraft motion has to be changed, and motion parameters at these points to determine the intervals characterized by the constancy of object motion laws and the positions of the object rotation axes during these intervals. Information on the equipment used (sensors, mechanisms, flywheels), the basic modes of operation, the principles of organizing the motion control system and flight control software is presented in the article. The AIST-2D Experimental Small Spacecraft has a mass of less than 500 kilograms and can operate on a near-circular orbit of 600 kilometers. The Spacecraft Orientation System comprises sensors and actuator mechanisms as well as its own computer. The Flight Control Software is organized as software incorporated in the technical system and implements full support of spacecraft motion control logic both in normal and abnormal situations. The software is subjected to a multiphase debugging process that ensures the achievement of the required indicators of quality and robustness.