Checking the wind over Vienna…

    Wind direction relative to the Danube axis

    The maths, in plain words

    Wind direction from the forecast is meteorological: the compass bearing the wind blows from. Riding into a 300° wind means heading north-west, straight at it.

    For a riding heading θ and wind bearing w at speed v:

    headwind  = v · cos(w − θ)   → positive = headwind, negative = tailwind
    crosswind = v · sin(w − θ)   → the sideways shove

    The ride is long, so the wind changes

    A 57 km out-and-back at 23 km/h takes about two and a half hours. The wind at your turnaround is often not the wind you set off in, so each leg is scored against the hourly forecast for the hours you are actually on it — outbound from departure to turnaround, return from turnaround to home.

    Those hourly winds are averaged as vectors, not as numbers. Averaging 350° and 10° arithmetically gives 180° — exactly backwards.

    The number that matters most is the net:

    net = headwind(out leg) + headwind(return leg)

    With a steady wind those cancel to roughly zero — whatever you fight on the way out, you get back. A clearly positive net means the wind rotates against you and you ride into it both ways. That is the day worth knowing about in advance, and it is what the scoring punishes hardest.

    The river is not a straight line

    Out of Vienna the Danube runs north-west, but it swings hard west at Greifenstein — from a 302° heading to 265° — on the way to Tulln. Downstream it bends the other way, from 120° near the Lobau to 87° past Eckartsau. A tailwind on one stretch is a crosswind on the next.

    So the route is a list of segments, each with its own bearing and distance, and each scored against the wind forecast for the hour you are on that segment. The overall figures are distance-weighted averages across them, not a single number for the whole river.

    Sunscreen, yes or no

    UV index comes from the forecast, hour by hour, and is read for the hours of the planned ride rather than for right now — a 17:00 start meets a very different sun than the one out of the window at midday.

    UV 3 is the usual burn threshold, but it is a threshold for some exposure and these rides are long. Two and a half hours under a moderate sun burns as well as twenty minutes under a fierce one, so the answer uses both the peak UV and how many hours of the ride sit above the threshold. Above UV 6 it also says to reapply at the turnaround, because by then sweat has taken the first coat off, and there is no shade to retreat to: the dyke and the Donauinsel are open the whole way.

    The borderline cases lean towards yes. Sunscreen you did not strictly need costs nothing; the other mistake costs a week.

    Höhenmeter, in km/h

    Every ride here is out and back, so the climbing is fixed by the route: every metre gained on the way out is a metre lost coming home, and the other way round. The total is the same whichever direction you set off in — which is precisely why it belongs next to the wind, as the part of the day's effort the forecast cannot change.

    To compare a flat exposed route against a sheltered lumpy one, the metres are converted into the unit everything else on this page already uses — km/h of headwind — by matching the power each would cost:

    climbing power  P = m · g · ascent / time
    headwind power  P = ½ρ·CdA · v · ((v + hw)² − v²)

    Solve for hw and you get the headwind that would have hurt as much as the hill. For 85 kg all-in, 300 m of climbing over 20 km at 23 km/h comes out at roughly 13 km/h of headwind — which is about right. Descending counts for nothing: you get the metres back as speed, not as saved effort.

    The per-segment metres are estimates. The Donauradweg is flat, so they are mostly ramps, bridge approaches and dyke crossings — around 2 m per km — plus the river's own gradient. The exception is the run into Hainburg, where real hills start.

    Sunset and last light

    Two different deadlines. At sunset the sun drops below the horizon and you want lights on; at last light — the end of civil twilight, sun 6° below the horizon — you genuinely cannot see the path. In Vienna they are 31 to 42 minutes apart depending on the season, widest around midsummer.

    The forecast provides sunset only, so civil twilight is computed here from the solar declination. Only the duration is taken from that calculation and added to the forecast's own sunset, so timezone and daylight-saving handling stay with the API where they belong.

    Both are scored, with separate weights: finishing after sunset costs some points, finishing after last light costs a lot more.

    Which side of the Danube

    Each bank has an exposure value and a sheltered arc — the direction it is protected from. The Handelskai side has the city blocking south-westerlies; the Donaustadt side blocks north-easterlies; the Donauinsel blocks nothing at all. Shelter never removes the wind entirely, so roughly a third of it still reaches you:

    effectiveExposure = exposure · (1 − shelterStrength · max(0, cos(w − shelterFrom)))
    felt              = v · (0.35 + 0.65 · effectiveExposure)
    legCost           = headwind(felt) + 0.35 · |crosswind(felt)|

    Each leg picks the bank with the lowest cost, which is why the recommendation often differs between the way out and the way home. The maths flips on its own: into a headwind you want the sheltered bank, but with a tailwind the headwind term goes negative, so the open bank scores better — you want the wind to reach you when it is pushing.

    It is a heuristic, not a wind tunnel. Distances are approximate riding kilometres. Gusts around bridge pillars, the Reichsbrücke funnel and the open Marchfeld dyke will still surprise you.