Development of a Small and Inexpensive Terrain Avoidance System for an Unmanned Aerial Vehicle via Potential Function Guidance Algorithm