Caution: Translations of Quran and Ḥadīth may lead to possible misapplications and misinterpretations. This site is intended for students of sacred knowledge that are proficient in comprehending classical Arabic and have a strong foundation in Islamic sciences. Also note that religious injunctions rely on several aspects beyond what one may glean through reading individual aḥādīth.
ibnmajah:941Muḥammad b. al-Ṣabbāḥ > ʿAbdullāh b. Rajāʾ al-Makkī > ʿUbaydullāh > Nāfiʿ > Ibn ʿUmar

“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.”  

ابن ماجة:٩٤١حَدَّثَنَا مُحَمَّدُ بْنُ الصَّبَّاحِ أَنْبَأَنَا عَبْدُ اللَّهِ بْنُ رَجَاءٍ الْمَكِّيُّ عَنْ عُبَيْدِ اللَّهِ عَنْ نَافِعٍ عَنِ ابْنِ عُمَرَ قَالَ

كَانَ النَّبِيُّ ﷺ تُخْرَجُ لَهُ حَرْبَةٌ فِي السَّفَرِ فَيَنْصِبُهَا فَيُصَلِّي إِلَيْهَا