As today is the actual Eid al-Fitr marking the end of Ramadan, and I am a forward-thinking sort of fellow, I wondered how muslims will determine the direction towards Mecca (the Qibla) when they are on the Moon or Mars.
What did muslim astronauts and cosmonauts do when they were on Salyut/Mir or the Shuttle? In the case of an orbiting platform, Qibla can change substantially within the time of prayer.
In my minds eye I have a lazy-susan-like prayer platform that would maintain proper Qibla at all times. You would just have to be careful if your ground track took you close to Mecca, because a near-180° change in Qibla could take place in a few seconds, leading to severe disorientation or even injury...