Colonizing Space and Islam

This is a silly question, I realize but it’s bugged me for a while.

Let’s say humans colonize Mars. I would assume there is no reason to think that Muslims could not live there for religious reasons but if they did, where would they face during prayers? Would they lie on their backs and hope that they were pointing vaguely earthward at the time? What if Earth was on the daytime side of the planet and it was evening prayers? Would it become so extremely complex?

The Muslims of this world align themselves along a Great Circle which passes through Mecca.

{speculation follows}
In the future they will have to align themselves along a great circle which has its nearest tangent pointing toward Earth, while those in Zero gee will have directional alignment compasses constructed, to allow the 3 dimensional direction of Mecca to be determined.

The Stellar Umma

From Mars, Earth would always be in the general direction of the Sun, and somewhere along the ecliptic. The position of Earth relative to the Sun wouldn’t change much over the course of a few days, so you’d be close enough using last week’s direction. And I imagine that the imam would have computer software or enough amateur astronomical knowledge to find the right direction, and point it out for every Friday’s services.

You wouldn’t bother worrying about anything more specific than the direction to Earth as a whole, since it’d be hardly more than a single point in the sky.

I remember some Scifi RPG supplement (Traveller 2300AD?) covered this: their idea was that they knocked a chip off the Qaaba and transplanted it. Sounds reasonable to me.

I’m certain that by the time man takes his first, serious steps among the planets and stars beyond being repairmen and driving trucks in low earth orbit that religion will have gone the way of the dinosaur or we will have been contacted by non-terran, non-human intelligences hell bent on converting us to their particular beliefs or wiping us out for being infidels.

Or perhaps new rational religions will arise, informed by the increase in cosmological information.