Nice work!
I am currently doing my own quad on a Arduino MEGA, everything is built and the code is mostly done (quadcopter/quad at master 路 RomainGoussault/quadcopter 路 GitHub), I am just doig some PID tuning
So I looked at your code, and if I think right you have got 2 modes (depending on the value of rateAngleSwitch).
One mode is a position control loop.
The other one is a rate control loop.
So now begin the questions :
Which mode is the easiest to tune for a first time?
How did you actually do your tuning? Did you put your quad on some sort of ball joint ? Or did you hold it in your hand ?
thanks!