Home › How it works

How Sun Sweep works

Every number on this site is calculated in your browser. Here is how, how accurate it is, and where it comes from.

The sun's position

We use the NOAA solar position equations (based on Jean Meeus's Astronomical Algorithms), with the standard correction for atmospheric refraction. Compared with the NOAA calculator and published almanac times, sunrise and sunset agree to within about a minute for latitudes up to the polar circles.

Following the sun through the year

For your spot we check the sun every 10 minutes for every day of the current year and ask: is it above the horizon, in front of your wall, below the balcony above, and above every building, tree and hill you described or scanned? The hours that pass every test are your direct sun hours.

The phone scan

The scan uses your phone's motion sensors (the DeviceOrientation interface) to know where the camera points, and records the height of the skyline in each compass direction. Phone compasses are often 10–20° off, so you can point the cross at the sun and calibrate: we know exactly where the sun is, so the error disappears. Nothing from the camera is recorded or uploaded.

Limits

Sources: NOAA Global Monitoring Laboratory – solar calculation details · W3C DeviceOrientation Event specification · EN 17037:2018 (CEN) · PVGIS