/drone-telemetry
An exploration into using consumer drone telemetry to measure vertical wind profiles, and later, using random forest modeling to predict drone altitude based on flight dynamics.

Creative Commons Image
While messing around with my DJI Fly Mavic Mini, a question came to me that I needed answered: could I use consumer drone technology to create "vertical wind profiles" of the air around me?
The initial goal was to station a drone at various low-level altitudes (10m, 50m, 100m) and see if I could accurately detect and map wind speeds based on how the drone fought to stay in place. I could get that data by reverse engineering the data from each flight (pitch, yaw, roll, battery heat, etc.).
However, things didn't go exactly as planned, leading to a major pivot in the project's focus. This project is on a hiatus for the foreseeable future (simply too little data to work off of and no realistic means of getting enough), but it still taught me a ton about data aggregation, the nuances of drone telemetry, and the hidden challenges of geospatial machine learning.
1. The Initial Concept: Vertical Wind Profiling
The initial idea was simple: using OpenWeather's API, I could ping the current wind speed in my exact location every 5 minutes as a source of ground truth. While doing this, I could send my drone up into the air at different altitudes, leave it stationary there for half a minute, then move it again. This would provide me data on the flight that would (in theory) contain variations based on how high up the drone is. I hypothesized that the higher it went, the harder it would have to fight to stay stationary, since there's nothing to block the wind.
In fact, the drone ended up struggling the most at the 50m marker (as opposed to 10m or 100m). This led to the fascinating discovery that there exists a median point between the ground and the open atmosphere where wind shear becomes chaotic and unpredictable due to it encountering trees, tall buildings, or the ground before coming back up. While this was certainly an interesting finding, the concept wouldn't last long. The OpenWeather API simply couldn't provide granular and specific enough data to make any meaningful models. Wind was measured once every 15 minutes, with sudden gusts unaccounted for, and I didn't (and couldn't) have nearly enough drone data to make up for that.
So, I pivoted.
2. Predicting Altitude from Telemetry
If wind speed was a useless metric to measure, why not toss it out? Instead, what if I took the data I had collected thus far and trained a model to predict the elevation of the drone based on its flight data? After all, I had already established a pattern between the drone's ability to remain upright and the wind it faced at different altitudes.
So, the goal shifted from regression to classification. I used Random Forest Modeling to classify each drone's logs to either a 10m, 50m, or 100m flight. Metrics like battery heat and loss rate had to go, being too variable, but by using the mean and variance of pitch, roll, yaw, and occassionally movement (from sudden wind gusts), the model began to learn how the drone's response to the elements at different elevations corresponded to the elevation it was stationed at.
3. The Model
I ultimately decided on Random Forest Modeling because of the highly non-linear relationships between all the different features, and I wanted to avoid overfitting to just my little neighborhood park's weather patterns. In doing so, I was able to eliminate a lot of noise from the model, and achieve almost 65% accuracy on my testing set from a training set of a combined hour of drone flight-time. With a team of drones flying nonstop, the amount of data to train on could easily improve this accuracy.
Conclusion
I wrapped the project prematurely because it became apparent early on that getting meaningful, reproducible, non-localized analysis out of the project would require a LOT more data and time to collect and spend, which is infeasible for me at the moment. However, I got a lot of important real-world experience with managing hardware and collecting data from physical instruments, as well as working with the environment instead of against it to achieve my ends.