I have a data file which has the aircraft state details with latitude and longitude recorded for certain radius.
Now, I'm trying to calculate wind direction and wind speed.

At lat=41 and long -75 I have the aircraft state details as (flight:AZ9867, nav_heading, mag_heading, track, Ground speed, and TAS)

How can we calculate wind speed and direction?
Do we have to use vector calculation?

  • 2
    $\begingroup$ "Payload" is not the word you want here. But yes it's a vector calculation. It's not clear whether you are asking about what each term represents, or how to do the vector calculation, or both. Can you clarify that? (But some of those questions may have been asked already here.) (Btw, the meaning of "nav heading" is unclear to me.) $\endgroup$ Feb 18, 2023 at 18:21
  • $\begingroup$ I'd say TAS-ground speed $\endgroup$
    – sophit
    Feb 18, 2023 at 18:24
  • $\begingroup$ @sophit That would give you the wind component parallel to the track. By comparing the heading to the track (and considering TAS), you could probably compute the the wind component perpendicular to the track, and then you'd sum the vectors. Fair bit of math involved, and depending on the accuracy/precision of the data, the accuracy of the result might be limited. This looks almost more like a physics/programming question than aviation, but the community can weigh in on that. $\endgroup$
    – Ralph J
    Feb 18, 2023 at 19:42
  • $\begingroup$ @RalphJ: well unless you have a test probe installed on the nose of the aircraft, I don't think it's possible to measure any wind direction other than the one from the pitot tube (?) $\endgroup$
    – sophit
    Feb 18, 2023 at 20:57
  • 1
    $\begingroup$ Possible existing answers include-- aviation.stackexchange.com/a/35431/34686, aviation.stackexchange.com/a/23435/34686 (note that point #7 refers to a vector subtraction), aviation.stackexchange.com/a/81766/34686, aviation.stackexchange.com/a/33688/34686 $\endgroup$ Feb 18, 2023 at 22:06

1 Answer 1


We can solve this using trig. Use the Law of Cosines (III below) to identify the wind's speed. Use the Law of Sines (IV) to solve for the wind's angle relative to the heading. (Beware that law of Sines will often produce two values and Excel, for instance, defaults to the acute one, which would not be right in this case.)

This assumes that you already have the distance and course between start lat/lon and end lat/lon. This could get really tricky if you are trying to solve this over a long distance where the spherical nature of the earth means that your ground track and heading a changing continuously throughout the flight. On a flight from LAX to JFK you will depart on a track of 66° and will be on a track of 93° when you arrive.

That makes wind calculation over a long flight meaningless... Wind correction is really a zonal phenomenon meaning it's only useful to solve in a specific small segment of a flight. And thus we skip the spherical coordinate complexity in this illustration.

I'll use my smartboard and avoid an hour spent in MathJax.

enter image description here

  • $\begingroup$ I think he's got all the data he needs to instantaneously solve the problem for any given particular lat lon. It's not like he's trying to deal with measurements of how far the aircraft drifted off course during 2 hours of flying or something like that. (I think). $\endgroup$ Feb 24, 2023 at 18:05

Not the answer you're looking for? Browse other questions tagged .