Forget the packets - buy the chemical in liquid and there are measurements on the side of the bottle. The packets are supposed to dissolve - but they don't always. And after every time you dump the black tank you should be putting water in the amount of 10% of the tanks capacity right down the toilet immediately after dumping - along with the chemical. If the tank holds 40 gallons put four gallons of water in. Always keep your tank with water in it and you will avoid problems. In the winter if you winterize instead of water put the same amount of RV antifreeze into the black tank for the winter.
If you do all of this the only time you should begin to get a odor when the flap is open is when the tank is almost full. If it is really hot outside use more chemical if you start to notice an odor sooner.