Segment Bearing: Getting the Direction Maths Right
Without your segment's bearing, any wind analysis is guesswork. The calculation is simpler than it sounds — the traps are in the signs.
Bearing from start and end point
From start and end coordinates the initial-course formula gives the direction in degrees: 0 is north, 90 east, 180 south, 270 west. For straight segments that is entirely sufficient.
Average twisty segments piecewise
For segments with direction changes, split the route into sections, compute a bearing for each, and average the wind components weighted by section length. Averaging the angles themselves is wrong, because 350 and 10 degrees must not average to 180.
Respect the meteorological convention
Wind direction is reported as the direction the wind comes from. Wind from 270 degrees is a westerly and pushes you east. So for the tailwind component you use the angle between the segment bearing and the direction the wind is blowing towards — wind direction plus 180 degrees.
A flipped sign here is the most common bug in home-made wind calculators, and it inverts the recommendation exactly.
Height correction
Weather services report wind at 10 metres. At rider height, among hedges, trees and buildings, it is less — roughly 50 to 80 percent depending on surroundings. Applying an exposure factor per segment is worth it.
In short
Compute the bearing properly, check the convention, apply a height correction — then the wind analysis holds up.
Frequently asked questions
Are Strava's start and end points enough?
For straight segments yes. For twisty ones the polyline gives much better results.
What about segments that change direction twice?
Those are wind-insensitive and poor KOM targets — the effects largely cancel out.