Implemented integral term and corrected attitude control signal logic