Sunan Ibn Majah Book 5, Hadith 139
“A small spear (Harbah) would be
brought out to the Prophet (ﷺ) when he was travelling; he would
plant it (in the ground) to perform prayer while facing it.”
“We used to perform prayer while the beasts were passing in front of us. That was mentioned to the Messenger of Allah (ﷺ) and he said: ‘If something like the hand of a saddle* is placed in front of anyone of you, it will not matter whoever passes in front of him.”
* It is the piece of wood on the camel saddle which is held on to (to climb onto the camel).
“The Messenger of Allah had a reed mat that he would spread out during the day, and make into a compartment at night, towards which he would perform prayer.”