You should perform salah after confirming the direction of the Qibla through compass set in the airplane. During salah, if you feel that the airplane turned to a direction other than Qibla then you should turn towards the Qibla. You will have to offer salah again if there was no possibility of turning towards the Qibla or you did not turn deliberately. However, if you came to know it later when the salah was over, then you need not offer the salah again. If the compass is not available, salah will be valid to whatever direction you performed provided you enquired about the Qibla and confirmed it yourself.
Allah (Subhana Wa Ta’ala) knows Best
Darul Uloom Deoband