In case you haven't heard, my secret plan for the "Anything Goes" part of the Hackaday Prize is to use the hardware I'm developing to instrument a Powered Paraglider. To the best of my knowledge this has never been done before! I've made a lot of progress, and I'm exited to share the results with you.
Over the past week or two, I've been working hard to add an attitude/heading reference system (AHRS) to the Polymorphic Dot. If you're not familiar an AHRS provides a pilot (or autopilot) with yaw (heading), pitch (attitude), and roll (bank) angles which effectively tells you how a body is oriented in reference to the earth. AHRS algorithms are very complex, so instead of writing my own, I'm relying on one of the more popular open source algorithms which was written by Sebastian Madgwick as part of his Ph.D thesis. You can find it here:
After a bit of tweaking to feed the bluetooth IMU data into the algorithm, I had a 3D model of a box moving around on my phone in the same way that I moved a Polymorphic Dot.
This really blew my mind! It shouldn't have been that easy, but thanks to open source software, I was able to get this working in days instead of months!
My next step was to try to move the AHRS processing from the smart phone app to the Polymorphic Dot. Why would I do this when I already had a working solution? Well, a responsive AHRS needs a lot (>= 100 samples/second) of IMU data. By processing the IMU data locally on the Polymorphic Dot there is less processing for the app to do (so it runs faster) and less data for the Dot to transmit (so it uses less power). To this end I added a service to the Dot that reports AHRS data when enabled.
The current implementation of the AHRS service is (in the spirit of Hackaday!) very much a hack. In the future I plan to convert the algorithm from floating to fixed point as well as port it to run on the low power sensor CPU present on the CC2650.
After dropping the code into my app, I had attitude and heading indicators as well as an altimeter.
I've committed and pushed both the updated firmware and this new paragliding app to the github repos listed on this project page.
In one of my previous posts, you probably saw the magnetic mount cases I developed for the paraglider race this week. As you may have guessed, they won't work that great for this application because of the magnets!
In my rush to get everything done in time, I neglected to think about how the magnets would effect the magnetometer on the board. After I did some testing, I found that the pitch and bank angles weren't affected but the heading was. Because of this, I quickly designed a new mount for the Polymorphic Dot that would move the magnets away from the device.
I also tweaked the top of the case to make the snap together mechanism more robust.
I've placed an order for the parts and done everything I can to expedite it, but the parts may not arrive in time for the race. If this happens, I'll have to do without heading data from the Polymorphic Dot during the race.
The race is an event put on by an organization called the Adventurists. They specialize in putting on outlandish old school adventure races all over the world. This week's race is called the Icarus X race and is just a sample of what the full Icarus Trophy race holds for me in October. In both races, I'll fly my paramotor for extended distances carrying everything I need to survive with me. This means I'll have a tent, sleeping bag, food, water, 2 stroke oil, and much more. If I need gas, I have to land at a gas station or get a ride from a local to one.
Thursday morning (May 26th), I'll set off from a field West of Fort Smith Arkansas to start on a roughly 200 mile circular route through Oklahoma. As I type this, weather for the race looks marginal at best. A stationary front and a low are positioned just West of the course and storms are predicted all three days of the race. If nothing else, it should make for one hell of an adventure!