Actually not dyslexia, just inattentiveness. I've been calling it ARHS, but it's supposed to be AHRS (Attitude and Heading Reference System). I just caught that, and now my files and code repository and many other things are named incorrectly.
Whatever you call it, I've ported the MATLAB code over to the ATmega328. It's a bit slow; it takes ~5 ms to run the estimator update, but that's okay. Don't need assembly optimization. Synchronizing the ADC interrupt (so that it doesn't run at 1.5 kHz) would probably produce more speed gain.
As for performance, I tried it out a bit; response isn't great, but I can't really find any particular places to fault it. Is the performance worth the 2 weeks I spent on developing it? Probably not, but the experience gained in the process may be. Anyways, I can't see myself accepting the sf9domahrs code as it was; some sort of revision was inevitable.
Before the AHRS is fully functional, I'll need an SPI library and a protocol for talking to the main board. Some sort of synchronization would be nice; I'll have to see about that.
Also, the wireless modules arrived today. So that'll be fun to play with. Looks like everything is set for (potentially) a lot of work getting done this weekend.
No comments:
Post a Comment