hey, nice idea, I did something similar a while ago and I called leafpilot, it flew ok but used analog sensors and had no mag, same as old ardupilot and used gps track, planes only. Honestly, its not the right code base to start with, as I think you will spot as you progress, its ugly and you already spotted an rtos would be nice.
I will try and help you where I can but currently playing with the movecopter stuff. Openpilot is sooo much better than anything ardupilot, light years ahead of it, very solid code and the PSX Move is only $50 with a 9DoF.
Another project well worth looking at is gluonpilot its Pic based and there hardware is totally closed which is a negative but simple to port to the STM32. Quality code and flight tested, I have one and happy with the performance, again light years ahead of anything diydrones.
A word of warning, if you try and do this commercially and use any code from diydrones, you will be pressured to have them sell it, if you do not play ball, your posts on their site will often not be approved and other such nonsense.