Fine tuning of our Kalman IMUs is one of the most important step to be done in order to get the IMU ready to fly.
And a good tuning begins from "the table"...

Since one month I created a small application, written in java, multi-os, open-source, ready-to-use intended for studying, tuning, debugging your kalman application without any particular need.
It is able to get datas from the serial port (incoming data from the micro) and visualize
them on two separately artificial horizon displays.

I put my effort in creating an application platform independent since the linux and OS X community are getting bigger and bigger.

New version: Artificial Horizon AH-3+ (graphic improved!)
Download the tar archive containing the application directly from here:

ArtificialHorizon AH-3+

untar it and double click for launching the application or much better open a console or a prompt in win and digit:

$java - jar <file_name>.jar

You get messages on the background helpful for "debugging" porpouses.


Only 2 steps must be taken in advance to get it working with your system:
  • Install and configure at least Jave Runtime Environment JRE 6, available for download on Sun's site.
    After installation configure your environment path variables, this is even important in windows;
  • This program does use the RXTX package to deal with the serial port on your system.
    The library is an open-source project available at: http://www.rxtx.org it supports 32 different platforms. No need to be installed, open the binary package and copy the library into your java folder according to the instruction here: http://rxtx.qbang.org/wiki/index.php/Installation;

[Warning
: be aware that the application will fail or crashes in case it doesn't recognize the RXTX installed on your system. I strongly suggest to test the rxtx library after installation running one of the program available in this link: http://rxtx.qbang.org/wiki/index.php/Using_RXTX
Doing so your are sure the library is running along your JRE and prevent the application to frezz or crash]

---------
Usage
---------
The usage is really simple, select your baudrate, serial port and click on Open Serial to start getting incoming data from your microcontroller :)
As soon new data are available, they will be displayed on the screen moving your the artificial horizon up-downwards, bank left, right...(I 3th axis will be added soon for yaw :) )

The only thing you must be aware is how to send data from your micro.
Those are collected at your serial port following a simple packet protocol (I wanted to keep it as shortest as possible and easy, since serial communications can take much resources from our micros).

Somewhere in your code or firmware put an output routine able to send one string accordingly to this rule:

<angle_value><type_info> (followed by the carriage and return)

where:
<angle_value> is whatever number in DEGREES along any axis
<type_info> specific information whether the previus angle number refers to pitch, roll, yaw and whether it is filtered (processed by your Kalman filter) or is a pure angle (the "reading" by your sensors)

<type_info> can only contain those string informations:
kp : pitch angle computed by your Kalman algorithm;
kr : roll angle computed by your Kalman algorithm;
pp : pitch angle, pure data, directly from your sensors;
rr : roll angle, pure data, directly from your sensors;

Here same examples to figure out how datas are sent by the microcontroller:
34kp 34 degrees filterd by Kalman, pitch
-23rr -23 degrees not filtered, readed directly from the sensors
178pp 178 degrees pure pitch, not filtered
-1kr -1 degree along roll axis, filtered

You can find further info on how to write your firmware in the README file in the archive.

That's all...I wish this application can help you in understanding what's going on in your application and let your drone to start with a fiiiiiine tuned IMU :) :) :)

Enjoy!
Dave

PS: for any problem let me know ;)

Views: 614

Tags: application, artificial, filter, filtered, gui, horizon, java, kalman, serial

Comment by Morli on February 21, 2010 at 9:02am
Good work dave , i agree , good setup and testing starts from table,

Moderator
Comment by Chris Anderson on February 21, 2010 at 9:27am
Dave,

Excellent post. May I suggest you re-edit it to put the image at the top? That way it the image will show up on the front page and you'll get the clicks you deserve.
Comment by Paul Bizard on February 21, 2010 at 10:05am
Hi Dave,

Nice job !
Do you have something to do with the HB-Autopilot ?

Cheers,
Paul
Comment by Jonathan Lussier on February 21, 2010 at 1:26pm
Hi Dave, thanks for your excellent work. I'll try this out with my inverse pendulum filter.
Comment by Roy Brewer on February 21, 2010 at 3:47pm
Jonathan,

What is an inverse pendulum filter, if you don't mind my asking? I am working on something which may be similar - not unlike "DCM lite" where I only track the gravity vector

- Roy
Comment by Jose G Vicente on February 21, 2010 at 9:37pm
Good application ; could you post the Java source code ? I am interested on understanding how you read / decode the string coming to the serial port.

Thanks -- Jose
Comment by Dave on February 22, 2010 at 12:03pm
Thanks a lot guys :)
it s a pleasure for me...
Right now I m working on the code to add yaw readings above the horizons

@Paul: I didn't know about that project even if I know the Universität here in Bremen...
I ll investigate...

@Jose: java compiles a project. In other word, downloading the jar archive and unzipping it you fine the whole source code... the source code is already there I don't to publish it :) !
Anyway, I created a class that using a event-based system (every time new data are available on the serial port) updates some variables.
If you have troubles understanding it I will help you!

Cheers
Dave
Comment by Dave on February 23, 2010 at 12:27pm
Ehehhe
ok, I ve improved last night a little it the graphic and rewrote the code, no is much better and faster.
Most important I added a box displaying yaw values, so I renamed the whole project in AH-3 because 3 degrees of freedom.
Even i I could be improved I really hope it could be helpful for people who try to understand kalman...

Cheers!!
Dave
Comment by Carlito Oliveira on February 26, 2010 at 1:52pm
Great software! I'm using it with the UAV dev board 2 and it works great!
Is it possible for you to share the code? I'm thinking about adding a google maps screen into your software and feed with my GPS data.
Thanks for the software!
Comment by Dave on February 27, 2010 at 10:49am
Eheh
Thanks!

Anyway for whom is interested in the code:

A java archive file.jar contains the source file!
You can get the code simply using the command:

$java xfv .jar

and that's all!! You ll get the complete source code, comments, functionality and whatever...

Anyway, if you need help implementing some particular functions or whatever I m glad to help you.

Thanks again for giving it a try!!

Enjoy
Dave

Comment

You need to be a member of DIY Drones to add comments!

Join DIY Drones

Contests

Season Two of the Trust Time Trial (T3) Contest has now begun. The third round was a reliablilty/aerial photography round for both planes and copters, which is now closed. Stay tuned for the next round, beginning soon.

A list of all T3 contests is here

 

© 2012   Created by Chris Anderson.

Badges  |  Report an Issue  |  Terms of Service