Stuff related to MAV's (and UAV's) from a hobbyist's point of view. Info

Kalman demo application

A lot of people saw I purchased a 5DOF module from SparkFun and even made a test-PCB for it. Obviously, they asked me if I was willing to share my code. Well alright, here you have it.

A simple embedded kalman filter, nicely documented. Also featuring, for the interested:

  • Using the ADC hardware module in a dsPIC30
  • Using the UART module in a dsPIC
  • Using the timer module in a dsPIC
  • How to organize your code! I’ve seen some hideous projects on the web.

The code is written using Microchip’s C30 compiler . The non-optimizing version is free!

I wrote a small app to visualize the output better:

And last but not least: downloads!

There is a bug in Microchip’s latest libs. You need to add: #define UART_ALTRX_ALTTX 0xFFE7 /*Communication through ALT pins*/
to uart.h or to the code that references it.

5 December 2007, 21:47 | Link |