The qibla is hard to calculate in space because your position relative to the Kaaba will change even over a few seconds. The gist is, do the best you can, toward the Kaaba if possible, toward the position above the Kaaba if possible, toward earth if possible, or wherever if those...