Facing the qiblah (the Ka'bah in Makkah) is a condition for the validity of salah, as Allah says: "So turn your face toward al-Masjid al-Haram" (Quran 2:144). If you are unsure of the direction, you must strive to determine it by any available means, and if after sincere effort you pray in a direction that later turns out to be mistaken, your prayer is still valid, for Allah does not burden a soul beyond its capacity. Exceptions to facing the qiblah include voluntary prayer offered while travelling on a mount or vehicle, and situations of intense fear or battle, where the requirement is relaxed.
Evidence — the daleel
On deen2u
Informational, not a personal fatwa. Consult a qualified scholar for rulings on your situation.