A simple vb6 artificial horizon

Just put anything that is not directly related to the Gluon-specific implementation here. I will create subforums if required!

Moderator: lukasz

A simple vb6 artificial horizon

Postby Mitch » Mon Dec 07, 2009 2:01 am

There are many tools to assist with development. Might want to move this to a unique subforum. Tom posted a very nice .net control on his blog - for me the refresh rate was much too slow. This is a very simple 2d attitude indicator in vb6. It receives data from a com port. I've used it to display filter output. Also added a line to display error data such as the delta between the accelerometer only result, the gyro only result, and the kalman result. It's a very simple but effective tool for adjusting gains.... There is some basic documentation in the archive file and the source code should have sufficent comments to change as you need to.
Attachments
vb6 gyro display.zip
(15.77 KiB) Downloaded 827 times
User avatar
Mitch
 
Posts: 118
Joined: Sat Dec 05, 2009 1:59 pm
Location: Florida, USA

Re: A simple vb6 artificial horizon

Postby Tom » Mon Dec 07, 2009 9:49 am

Hi Mitch, thanks for your tool!
I'll create more subforums when there are enough posts to fill it. Empty subforums don't look that attractive.

What do you exactly mean by "for me the refresh rate was much too slow"? Maybe you can elaborate a bit more on how you adjust the gains?
User avatar
Tom
Site Admin
 
Posts: 1016
Joined: Fri Nov 13, 2009 6:27 pm
Location: Belgium

Re: A simple vb6 artificial horizon

Postby Mitch » Tue Dec 08, 2009 5:25 pm

The tests were done using a test rig similiar to the gluonpilot board (still waiting for mine) - except the micro is a dspic30 with internal FRC and x16 pll. The gyros and accelerometers are MLX90609 and LIS3LV02DQ read via spi at about 400khz. I'm getting loop rates of about 100hz and wanted to experiment with the dynamic behavior of the kalman filter. I started by plotting raw data - very tedious. I wanted to display an axis (or two) in real time - similiar to the way Tom did in his blog page "Kalman demo application."

I found several utilities that were written to do this - however most were designed to emulate a glass cockpit display and had very high overhead in the graphics. One of the rare cases I needed to keep up with the pic on the pc - otherwise I have to reduce resolution, overflow the pc uart , or the graphics are too fuzzy to be of any value because they are not refreshing fast enough.

I don't have a magic formula for adjusting gains (by gains I include the measurement noise). So far it has been empirical trial and error using this graphic display. A valuable use of this display was to overlay lines to display the accelerometer only angle (assumed to be the best steady state value) , the kalman solution, and the difference between the two. Thus, at extremes, I could watch the filter converge to the steady state value when the sensors were rotated. I did initially discover several cases where the filter code diverged due to my failure to initialize a few values.

I still need to address the "over the top" issue where the angle changes from +180 degrees to -180 degrees I have a discontinuity which may or may not be a problem in application.

I also anticipate, in application, some significant vibration in the 30-200hz range due to prop or rotor (haven't decided which platform I'll use). I may vibrate the board a bit and see what I get.
User avatar
Mitch
 
Posts: 118
Joined: Sat Dec 05, 2009 1:59 pm
Location: Florida, USA

Re: A simple vb6 artificial horizon

Postby Mitch » Mon Jun 14, 2010 7:15 pm

I've added an additional file. This is similiar to the above except it overlays two independent sets of data on a compass display and an artificial horizon. Also input data is parsed to prevent syncronization errors. There are some additional notes in the zip file.
Image
Attachments
simple vb6 display 2 data sets.zip
(129.01 KiB) Downloaded 620 times
User avatar
Mitch
 
Posts: 118
Joined: Sat Dec 05, 2009 1:59 pm
Location: Florida, USA


Return to General

Who is online

Users browsing this forum: No registered users and 1 guest

cron