An improved predictive algorithm for time delay compensation in UAVs