Answer:
Praise be to Allah, the Lord of the Worlds; and may His blessings and peace be upon our Prophet Muhammad and upon all his Family and Companions.
If you are able to perform the prayers on the earth no doubt, it is preferable. If you are in a transport means and fear that the time of the prayers will end before having opportunity to perform them on earth, then you have to perform them in that transport means according to your ability. In this case, try your best to know the direction of Qiblah through the help of a compass or by asking a reliable person. If you do not have such sources to find out the Qiblah then strive yourself to fix the direction and then perform the prayers, and your prayers are valid. Allah Says (interpretation of meaning): {So keep your duty to Allâh and fear Him as much as you can;…}[64:16]. The Prophet (Sallallahu Alaihi wa Sallam) said:
If I order you to do something, you have to do it according to your ability . [Reported by Imams
Bukhari and
Muslim ]
You are not obliged to repeat the prayers, you had performed according to your ability, during your journey.
The missed prayers during your travel must be made up right after reaching the destination. The missed prayers during the journey should be performed just as they were performed in the journey, i.e., four Rak'ah prayers should be performed only two Rak'ah, and if they are among the prayers that are performed loudly then they should be performed accordingly and vice versa.
All the above rulings are related to the obligatory prayers, otherwise, the Prophet (Sallallahu Alaihi wa Sallam) used to perform the voluntary prayers during travel riding on his mount, facing the direction in which he was going.
Allah knows best.