Abstract:Traditional measuring method of ship swing period waste time and energy, and measure accuracy is bad. To solve the problem, an automatic measurement and storage system is developed based on STM32 series MCU. The swing angle measurement unit is built with MEMs inertial component and magnetism sensors. And the rotary vector attitude update arithmetic is applied to track the change of angle. The period of swing is calculated by FFT period measure method on frequency domain. With the using of SD card memory unit and file system of FATFS Module ,the system can save the result data including angles and periods continuously. Swing table measurement tests verified that the system realized the realtime measurement of swing angles with the precision of 0.5°and periods with the precision of 0.1 s. The system can work steadily and continuously for about 30 days supplying by lithium battery, and can meet the requirements of ship swing data monitor and logging on the sea. Therefore the system has the strong engineer application values.