The G1000 has a feature where it can put up a winds aloft arrow/speed in the PFD. I've been sort of wondering how exactly this is determined. My guess is that the aircraft (or the G1000) knows your airspeed via the pitot/static system and heading via the fluxgate/mag compass. Then, it uses your GPS position to figure out where you should be every X seconds given the airspeed and heading. Any difference must be attributable to winds aloft. Does this make sense?
Yes, you are correct. You need three pieces of information:
- true compass heading (considering magnetic variation)
- multiple absolute position fixes (eg. from gps)
The aircraft heading has to be measured by a compass within the aircraft (it can't be derived from the gps track), and the gps position can be used to look up the local magnetic variation. The difference between the speed/heading and the ground track (in straight and level flight, anyway) is attributable to winds aloft.
Close! Here is a simplified example:
- First we use GPS positions to determine the ground vector. This is based on distance traveled and ground track over time. It is a fairly straight-forward calculation based on the time to travel between two coordinates and their relative positions.
- Then we calculate our flight vector. This is based on the aircraft True Airspeed (TAS) and heading.1
- Lastly we use basic geometry/vector math to calculate the difference between the two vectors. This calculated vector is the wind direction and speed.
1 TAS is Calibrated Airspeed corrected for altitude and non-standard temperature - the speed of the aircraft relative to the airmass in which it is flying. It is calculated using the pitot-static inputs along with the Total Air Temperature (TAT) input (if available). To get an idea of the math, take a look at this answer of mine that calculates Mach Number, which is one of the values used to calculate TAS. Also, the TAT isn't really needed for low-speed aircraft that fly below about 100 KIAS.