A Minimum Risk Approach for Path Planning of Uavs