The two major occurring faults with relevance to UAVs are actuator and sensor faults. This paper presents a fault diagnostic and fault tolerant control algorithm on the altitude sensor of a quadrotor UAV. The quadrotor used is QUANSER's Qball-X4, which is part of the Unmanned Vehicles Lab (UVL) at UAE University. The proposed fault tolerant control is based on hardware redundancy of three altitude sensors. Residuals are generated based on the three altitude measurements, which are then used to compute indicators about fault occurrences. These indicators serve the fault isolation algorithm to determine the faulty sensor, and in return allows for automatic switching between the sensors in case the faulty sensor is used in the closed-loop system. The effectiveness of the proposed algorithm is demonstrated by means of real flight tests.