A person’s machaneh is four amos around him. The Torah commands that your machaneh be kadosh. Therefore, if there is human excrement behind you, you must distance yourself ahead of it four amos. The smell also cannot be within your machaneh, therefore if it smells, you must distance yourself ahead of it four amos from where the smell ends. (ShA 1 – MB 2)
All distances stated in this siman apply as well to urine and other offensive substances that will be listed later in this siman. (MB Siman 77:1)
Smell is judged by someone who can smell even if you personally have lost your sense of smell. (ShA 1)
If the excrement is before you, you must distance yourself as far as the eye can see. Even at night, imagine it is daytime. (ShA 1)
If the excrement is to your side it depends: If you are able to see it without turning your head it is considered before you. If you are unable to see it without turning your head it is considered behind you. Nevertheless, it is better to move in front of the excrement if you can do so without too much effort. (ShA 1 – MB 5)
Answering omayn is considered a dovor shebikdusha even if the one saying the beracha isn’t being motsi you. Therefore, you may not respond omayn in front of excrement. (MB 7)
If the excrement is on a 4×4 tefachim platform 10 tefachim higher or lower than the platform that you are on, it is considered out of your machaneh. If it is in a different room than you, it is considered out of your machaneh. In these cases you may read Krias Shema even if the excrement is within your four amos, and you can see it through glass. (ShA 2 – MB 11,12,14)
If in the above cases, the excrement can be seen plainly (not through a glass) try to turn and face away – if you can’t, then just close your eyes and say Krias Shema. A common application could be looking at smelly garbage through an open window – even though you can’t smell it do not say divray kedusha in such a case. If you have a doubt if it is garbage or not, you are allowed to read Krias Shema even while looking through the window. (MB 14, 15)
If a bad smell is coming from a different room, wait until the smell passes before proceeding to daaven. (MB 18)
If there is still a stench from excrement that was removed from the room, do not say divray kedusha until it dissipates. If you have lost your sense of smell, you are allowed to proceed daavening in this case. (MB 19)
A dog’s excrement does not have a din of human excrement even if it smells (unless it is being used for tanning hides). (ShA 4 – BeH “v’im”)
The excrement of other animals and birds does not have a din of human excrement unless they smell (checking close is not necessary) – and that of a cat has the din of human excrement even if it does not smell. (ShA 4,5 – MB 22)
A rotting dead animal has a din of human excrement. (ShA 5)
A chicken coop, animal pen or stables have the din of human excrement. (ShA 7 – MB 28)
Something that smells bad by nature but not because of rot (e.g. certain fuels) does not get a din of human excrement. (MB 23)
Do not read Krias Shema opposite garbage that smells. Even if you are certain that there is no urine or excrement – something is rotting there. (ShA 8 – MB 29)
If a person passes gas, he should wait until his smell dissipates before continuing to learn Torah. (ShA9)
If he smells that of someone else, he need not discontinue his learning. However, for Shema and berachos wait until the smell passes or move to where you can’t smell it. (ShA 9 – MB 31,32)