A Waypoint-Based Guidance Algorithm for mini UAVs