A Sun sensor is a navigational instrument used by spacecraft to detect the position of the Sun. Sun sensors are used for attitude control, solar array pointing, gyro updating, and fail-safe recovery.
In addition to spacecraft, Sun sensors find use in ground-based weather stations and Sun-tracking systems, and aerial vehicles including balloons and UAVs.