Remote Sensing using unmanned aerial vehicles (UAV) is gathering a lot of attention at the moment by researchers and developers, especially in terms of low-cost aircrafts which still maintain sufficient accuracy and performance. This paper introduces a low-cost approach to increase airworthiness by using a forward-looking camera to estimate the attitude of a UAV. It not only focuses on using machine learning to classify ground and sky, but also uses image processing and software engineering methods to make it fault-tolerant and really applicable on a miniature UAV. Additionally, it is able to interface with an autopilot framework to being used productively on flight missions.