A derailment detection algorithm for railway freight cars based on micro inertial measurement units was designed to address the complex issue of the disassembly and assembly of derailment braking devices. Firstly. a horizontal attitude measurement model for freight cars was established. and attitude measurement algorithms based on gyroscopes and accelerometers were introduced. https://www.spidertattooz.com/