Sunlight as a Signal: VitaMindGo Pro's On-Wrist Light Algorithm

How Apple Watch's ambient light sensor became a daily outdoor score, and the privacy boundary we drew around it.

VitaMindGo Pro is a wellness app that helps users track their daily routine of sunlight exposure, hydration, and movement. None of those features are medical. None of them diagnose or treat any condition. They are general well-being tools, and we are careful to keep them that way. This post is about the most technically interesting of the three: how we use the Apple Watch ambient light sensor to estimate outdoor exposure, and the algorithm we wrote to make that estimate useful without turning the watch into a surveillance device.

1. The Hardware: CMAmbientLightSensor

Apple Watch Series 6 and later include a dedicated ambient light sensor. It is not the camera. It is not the proximity sensor. It is a separate silicon die behind the display that returns a single lux value to the operating system, and it is exposed to apps through the CMAmbientLightSensor API in CoreMotion.

Apple Watch Ultra sensor integration calculating real-time UV synthesis
Apple Watch Ultra sensor integration calculating real-time UV synthesis

The sensor reports lux in the range of 0 to 100,000, with a quantization that varies by device. On a Series 9 the granularity is roughly 5 lux in low light and 50 lux in bright sunlight. That is enough to distinguish between a dim office and an overcast afternoon, but not enough to distinguish between a sunny day and a snowfield.

We sample the sensor once per minute when the wrist is raised and once per five minutes when the wrist is down. The sampling rate is the single biggest battery contributor in the entire app, and the rate we settled on is the floor where our outdoor classifier still produces useful results.

2. The Algorithm: Lux to Outdoor Score

The outdoor score is a simple accumulator. Each minute that the classifier returns "outdoor with high confidence", we add one point to the day's score. At the end of the day the score is the total number of outdoor minutes, and the app surfaces it as a general well-being indicator.