Drone Control Simulation Project for Intel using FPGA

For this group class project, we were assigned to design a creative interface, like a videogame, for a DE10-Lite FPGA, where this device would be the game controller.
For this project we used the FPGA to simulate a remote control of a drone, reading the integrated accelerometer to control the orientation of the drone. This way, the user could rotate the board the way they would want the drone’s rotation to be, and this induced a movement in the drone. Because we just had an accelerometer, and no other sensor like a gyroscope, in terms of rotation, performing two rotations mandatorily defines the third one, so we could just control 2 DOFs at once, from the drone’s 6 DOFs available to control (roll, pitch, yaw, surge, sway, heave). To work around this challenge, relating a roll to swaying, and a pitch to surge, gave us the capabilities to translate the drone in 2D (X and Y); however, we also wanted to control the drone’s heading, and the height, so we assigned a second mapping for the accelerometer: pitch for heaving, and roll for yaw, and we used a switch to toggle between the two mappings.
To simulate the drone behavior, we used Gazebo Classic (now deprecated) with ROS, communicating with the FPGA through the UART communication protocol connected via an FTDI adapter, which read each bit sent to move the drone around.