state control machine for quadrotor