Algorithms for 3D UAV path generation and tracking