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
- Clear-sky results: clouds are not included.
- Light reflected from walls and bright sky (diffuse light) is not counted as sun, though it matters for plants and rooms.
- The result is only as good as the description of the spot.
- Solar figures are comparisons on clear days, not kWh forecasts.
Sources: NOAA Global Monitoring Laboratory – solar calculation details · W3C DeviceOrientation Event specification · EN 17037:2018 (CEN) · PVGIS