HomeBlogHow SunRide Actually Knows Where the Sun Will Be
February 15, 2026·5 min read

How SunRide Actually Knows Where the Sun Will Be

how it worksastronomytechnology

The short version is slightly ridiculous: SunRide uses the same astronomical algorithms used to track satellites and calculate solar panel angles — to tell you which side of a bus to sit on.

The long version is actually interesting, if you're into that kind of thing.

The AI is just the front door

When you type "Paris to Lyon at 2pm," the AI reads that sentence and extracts three things: origin, destination, departure time. It handles natural language, abbreviations, dates in different formats, city names in other languages. That's it.

The AI doesn't calculate anything about the sun. It just figures out what you're asking, then hands off to the actual math.

Getting the real route

Once the cities are known, SunRide fetches the real road route from OpenStreetMap via a routing engine called OSRM. Not a straight line — the actual roads.

This turns out to matter a lot. A route that looks like it goes "roughly east" might spend 40 minutes heading northeast, then turn southeast, then swing back east. The sun hits the vehicle differently on each of those segments. If you just drew a line between the two cities, you'd miss all of that.

100 points, not 2

The route gets divided into 100 evenly-spaced points. At each one, two calculations happen simultaneously.

First: sun position. The SunCalc library — which implements standard astronomical algorithms used in observatories — calculates the exact azimuth (compass direction) and altitude (height above the horizon) of the sun at that specific latitude, longitude, date, and time. This is accurate to within fractions of a degree for any point on Earth, any date, any time.

Second: vehicle bearing. The direction the vehicle is actually moving through that specific segment of road.

The angle between those two numbers tells you exactly which side of the vehicle the sun is hitting at that moment.

Adding it all up

After running that calculation 100 times along the route, SunRide tallies the total sun exposure time for left vs right. The result isn't just "sit left" — it's "left side gets 68% of total sun exposure, right side gets 32%." A 68/32 split is a strong recommendation. A 54/46 split is worth noting but won't make a huge practical difference.

Segments where the sun is below the horizon (night travel) are excluded entirely — they don't count toward either side.

Why 100 points and not 10

The more points, the more the route shape gets captured. A coastal road that curves frequently, or a mountain pass that zigzags — these routes have constantly changing sun exposure. Sampling at 10 points would miss most of it. At 100 points you're capturing the actual journey fairly accurately.

Is it overkill for a bus seat decision? Probably. Does it produce a noticeably better result than a rough estimate? Yes.

The math has been around for centuries. The specific application to figuring out which side of a bus gets the sun is admittedly new.

☀️

Find your exact shady seat

Type your route and departure time. SunRide calculates which side of the vehicle stays in the shade — using real astronomy.