How to Write your own Flight Controller Software — Part 5

Calculating Roll, Pitch and Yaw from IMU Rates

David Such
24 min readJan 2, 2022

--

There are a number of libraries that make working with the LSM9DS1 IMU (Inertial Measurement Unit) easy. In Part 5 of our series on writing your own flight controller software we will focus on the IMU and in particular explain the best ways to convert the gyro rate and accelerometer force data to a roll and pitch angle. The yaw angle is then calculated using the pitch and roll and magnetometer data. This discussion, is in the context of building a drone…

--

--

David Such

Reefwing Software · Embedded Systems Engineer · iOS & AI Development · Robotics · Drones · Arduino · Raspberry Pi · Flight Control