Controller for quadrocopter