An airplane flies, and we know its ground speed and direction. There is a wind of unknown speed and direction. The airplane changes its heading, so that we have a new ground speed and direction. The airplane speed with respect to air does not change. Can we calculate the wind speed and direction based on this information?
What we have is:
Vector $C_1$: Ground Speed 1 and Direction 1, all known
Vector $C_2$: Ground Speed 2 and Direction 2, all known
Vector $A_1$: Air Speed (same) Direction $B_1$ (unknown)
Vector $A_2$: Air Speed (same) Direction $B_2$ (unknown)
Vector $B_1$: Wind Speed and Direction (same)
Vector $B_2$: Wind Speed and Direction (same)
This question has practical use for determining wind speed from UAVs. One easy way to measure wind speed is to make a $360$ degree circle and then obtain the wind speed which is half the difference between minimum and maximum ground speed. I wounder if it is possible to obtain the same result without doing a full circle, but just change course by a smaller angle ($60 - 90$ degrees) and use the changes in ground speed to determine the wind speed
I am not sure how to tackle it, but I feel that since we have the same airspeed, we probably could solve it...



Buy an E6B flight computer. It is a device created explicitly for this purpose.
If you want to learn the math.
Method 1, law of cosines / sin.
$C = A^2 + B^2 - 2AB\cos c$
In this case, $c$ the deviation between heading and course.
$A$ is you airspeed. $B$ is your ground-speed. $C$ will be the wind-speed.
law of sines
$\frac {\sin a}{A} = \frac {\sin b}{B} = \frac {\sin c}{C}$
$A,B, C, c$ are the same as above.
$a$ will be the difference between heading and the wind direction. $b$ will be the difference between ground-track and the wind direction.
Method 2 convert to Cartesian.
$\text{Heading} (v, \theta) = v\cos\theta, v\sin\theta\\ \text {Course} (s, \phi) = s\cos\phi, s\sin\phi\\ \text{wind} = \text {Course - Heading} = s\cos\phi - v\cos\theta , s\sin\phi - s\sin\theta$
Wind speed $= \sqrt {(s\cos\phi - v\cos\theta)^2 + (s\sin\phi - s\sin\theta)^2}$
Wind direction $= \arctan \frac {s\sin\phi - s\sin\theta}{s\cos\phi - v\cos\theta}$
Wind direction is measured on a $0$ to $360$ scale, and $\arctan$ will return a number in $-90$ to $90$ so you will need to adjust, and you might find your indicated direction by the calculation to be $180$ degrees off. So, you will need to run a sanity check to see if you have a headwind or a tailwind.