ArduIMU groundstation written in 'processing'

I have created a basic 'ground station' for the ArduIMU in the 'Processing' IDE

The Processing development environment is very similar to the Arduino evironment
Processing compiles into Java, it allows you to run the same code on Windows, Mac OSX and Linux.

Being a Mac user and suffering from not being able to find and run the correct version of the NI LabView runtime engine I decided to have a go at creating a ground station myself.

This version ArduIMU_v004.zipwas the result of only a couple of hours of work so is a bit rough.
NOTE: This is slightly updated from Original code uploaded - fixed 2 bugs.

It borrows some of its design from the exiting LabView example and from Jose Julio's Python(?) example

The Ground Station:
Logs All incoming Serial data to a text File
Shows raw data in real time
Displays key data in text
Displays Accel and Gyro data as bar graphs
Displays Roll Pitch and Yaw as rotating lines
Displays an 'aircraft' showing 3D orientation

Press Y to ignore Yaw
Press L to start or stop Logging
Press Q to Quit

Here it is operating (with no GPS - inside the house)

I intend to keep developing the code for my own purposes.
I'd be happy to hear any suggestions or requests for features
Please let me know what you think?

Views: 1935

Comment by Dale on November 17, 2009 at 9:33am
Thanks Andrew!

Comment by Ryan Beall on November 17, 2009 at 1:04pm
roll angle and yaw is reversed by normal convention?
Comment by Ken on November 17, 2009 at 4:24pm
@viky: re. source to learn the language

Besides the mention web site, there also are some textbooks. I have "Processing" by Casey Reas & Ben Fry but I do recall another. Take a peak in Amazon.

@Andrew: thanks for the reminder about processing. I played some with it a year ago. I'll get to work on my ground station when my days get upgraded to the 36 hour model. :) I think we have the same issues with LabView .. runtime installed but the files have no App to open them...
Comment by Khalid Saeed on November 17, 2009 at 8:04pm
Wow! That rocks! It worked on the first try. I've been struggling with the crummy Labview software for weeks. ThanksAndrew!

Comment by Mark Colwell on November 21, 2009 at 8:31am
I found some bugs... and made some color changes...

in ArduIMU_v004 tab

add "-" to Yaw to change rotation direction for drawcraft and drawAngle


drawAngle(Roll,600, 400, 100,"Roll",#FF1111);
drawAngle(Pitch,750, 400, 100,"Pitch",#11FF11);
drawAngle(-Yaw,900, 400, 100,"Yaw",#1111FF);

and a bug in Decode tab:

there are two are AN3s defined ; fix=: AN1 s/b AN0, AN2 s/b AN1, AN3 s/b AN2
change Decode

tmpFloat = Find_Float(DataString,"AN0:");
if (tmpFloat!=-9999) GyrX=tmpFloat;

tmpFloat = Find_Float(DataString,"AN1:");
if (tmpFloat!=-9999) GyrY=tmpFloat;

tmpFloat = Find_Float(DataString,"AN2:");
if (tmpFloat!=-9999) GyrZ=tmpFloat;

tmpFloat = Find_Float(DataString,"AN3:");
if (tmpFloat!=-9999) AccX=tmpFloat;

tmpFloat = Find_Float(DataString,"AN4:");
if (tmpFloat!=-9999) AccY=tmpFloat;

tmpFloat = Find_Float(DataString,"AN5:");
if (tmpFloat!=-9999) AccZ=tmpFloat;

I also changed colors of Plane to wing=red, elevator=green, rudder=purple.

// Wings
translate (s/10,0);
fill(240, 0, 0);
box(s/5, s/40, s);
translate (s/-10,0);

// Vertical Tail
translate (s/-2,0);
translate (s/20,s/-10);
fill(200, 0, 200);
box(s/10, s/4, s/50);
translate (s/2,0);
translate (s/-20,s/10);

// Horizontal Tail
translate (s/-2,0);
fill(0, 240, 0);
box(s/10, s/50, s/4);
translate (s/2,0);

Comment by Jordi Muñoz on November 22, 2009 at 12:41pm
Arduino environment is 90% based on Processing, so if you can mess with Ardupilot code you can mess with Processing (C/C++).
Comment by Andy Geppert on November 26, 2009 at 9:41pm
@Andrew: Great job! There is definitely an echo in your blog isn't there? ;) I just tried your app and it worked on the first try. It seems nice and responsive - even on what I'd call a slow PC.

How robust is Processing overall for running applications like this? Is it feasible to do a reliable ground station with Processing or is that just asking for trouble?
Comment by jaron on November 27, 2009 at 1:16pm
Processing is not only written in Java it actually IS Java with an IDE and some additional libraries. You can use the Processing libraries in every other Java application without using the Processing IDE.

So the answers to your questions are:
1. as robust as every other Java application
2. feasible as long as you don't need real time programming
Comment by Mario on November 28, 2009 at 9:29pm
Hello to all !
My friend Benjo corrected a few bugs in the ArduIMU groundstation written in 'processing'.
Mainly this is to fix some problems with the rendering of the aircraft model plus a few nuisances in the logging function. You ca find the upgraded code here.
Comment by Mario on November 28, 2009 at 9:31pm


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

Join DIY Drones

© 2019   Created by Chris Anderson.   Powered by

Badges  |  Report an Issue  |  Terms of Service