GPS/Autopilot for ELEV-8V3
This is intended primarily for Jason: is there any targeted date for the GPS integration to support autopilot functionality? I know you are probably assigned projects until the Rapture, but I was just curious because I was poking around GitHub and observed that you had started work on some of this awhile ago. Any info would be much appreciated - and please do not take this as criticism in the least. Thanks!
Regards,
Chuck
Regards,
Chuck
Comments
If I were to do this on a second chip, I'd likely have the master Prop run the servos, sensors, R/C input, reading the GPS, and running the core IMU calcs. The second would take that data, do some additional vector math for the GPU, run the flight control logic, and pass motor control outputs back to the driver core. On top of this, I'd have the extra resources necessary to LOG everything so I could run simulations with full sensor readings stored to a card, which I simply can't do fast enough right now. An SD driver takes a cog on its own, and the code to feed it is another one. I only have two left, and that's before adding the GPS.
To get the GPS accurate enough you basically need to use the accelerometer vector rotated by the current orientation estimate to estimate your current direction / velocity, and use that to estimate a position. This is referred to as double integration, and it very quickly goes to hell if you don't have a way to rein it in, so the other part of it is that you use the GPS readings as an absolute reference and fuse that into the running accelerometer / velocity estimate in a complimentary filter. That way the accel-based estimate provides extra precision for the GPS, and the GPS readings prevent the inaccuracy of the accel-based readings from running away. In a traditional computing environment this is moderately complicated, but not too bad. On the prop it's additionally challenging, and it's non-trivial to test and debug this stuff.
Once you have those results, you need to compensate for the shrinkage of longitude values as you move away from the poles, handle the wrap-around at the date line, deal with numbers that are so large they want to overflow a lot, and do a few other things that are kind of ugly.
I'm not sure I have that kind of time. ;-)
I think Jason is talking about full sensor fusion and cberry is talking about just letting the thing bob about (attitude stabilized only-- with gyro, accel, compass, altimeter), the GPS providing only a crude navigation function.
If elev-8 is yaw stabilized with a compass, then the only firmware modification to elev-8 would be to accept desired roll and pitch input from a second micro.
In a square mile the curvature of the earth is negligible. A 6,000 x 6,000 grid seems adequate.
I'm probably being naive - but have to ask. Thanks.
To respond to your question: there is NOT fusion with GPS. So therefore it CAN be farmed out. But a little bit of modification needs to be done to Elev-8 to accept the input from the "prop mini"
Regards,
Chuck