I propose to use a flight controller resp. a FC software like betaflight connected with a arduino or raspberry pi.
The new F3 or F4 flight controllers have in general I2C/SPI interfaces where you can call the FC functions.  

https://github.com/betaflight/betaflight/releases