Low-cost, high-resolution, self-powered, miniaturized sun sensor for space applications