Tom Yochum's Comments

Comment Wall (12 comments)

At 10:03am on June 5, 2009, Abhishek Jain said…
hey Tom,

Thanks for replying so quick. Cannot wait to hear from Brian. Am banging my head on this for the past month. Am waiting for his reply. Pls keep me posted on your progress with the "Dreaming of wings" project

At 9:53pm on June 6, 2009, Abhishek Jain said…
Hi Tom,

I got the IMU working thanks to Brian. Now I would like your help on the Kalman filter to implement on it. Just could u give me the basics of what to do with the raw readings of the IMU. I can do the coding myself.

Thanks in advance
At 4:11pm on August 17, 2009, Michael Primm said…

I would like to collaborate, but I think you are farther along than I am. Also, I am not sure we are going down the same path, are you programming an autopilot in JBSim? I plan to use Flight Gear/JBSim as an air vehicle simulator only. I will use the input and output interfaces to FG for the control/response of the aircraft. However, one of my biggest hurdles could turn out to be an accurate JBSim FDM for my RC aircraft, as the extent of my aerodynamics knowledge goes about as far as what you pick up reading the AIM while in ground school. I will tell you where I am at and where I am going (I least a few weeks into the future) and anything you think may be of use to you I can share.

First off, let me say that I have not gotten any of my models for JBSim to work yet, although I haven't spent more than a night or two working on them. Right now I am working on writing an application that takes FlightGear output (via a socket), parses it, adds in sensor noise; etc., and "digitizes" it into a form that an ADC on a micro-processor would output. After that my goal is to write my IMU and control algorithms into the sim and see what they output. Next I would feed that data back into FlightGear to see how well the algorithms and simulated sensors control the "aircraft". For me, HITL is a long way off. Below is a brief roadmap (i've been meaning to do one of these anyway):

FG Interface:
1. Create protocol for socket communication (in XML for FG) – in progress
2. Create application interface that reads and “samples” FG output
3. Create realistic FDM for JBSim

1. Convert FG output into usable body frame data – in progress
2. Limit data to sensor spec – done for gyro sensor
3. Add in sensor noise and bias - done for gyro sensor
4. Filter to sensor cutoff freq (need to dig up old FIR filter Parks-McClellan code) – in progress
5. “Digitize” to ADC spec. - done

IMU Sim:
1. Write IMU algorithms (quaternion based)
2. Write (or use MatrixNav) DCM base IMU alg.
3. Compare

Flight Control Sim:
1. ...

Let me know if any of this fits into anything you are working on and I will share what I have. My plan is to open source everything when it is in some usable form anyway.
At 10:41am on August 18, 2009, Michael Primm said…

Mike works...

Well what I know about electric motors is (and the accuracy of this I cannot guarantee):

1. The (theoretical) torque output is constant from 0-max rpm. I suppose this means that the power output is also constant.
2. I believe this means that JSBSim would only need the power output (in watts) and the max RPM (or maybe not, see below) to model the electric motor.
3. The prop should behave like any other prop.

Below is what I came up with for the electric motor. Of course FG rejects my entire FDM but I think that is b/c of errors in the aircraft definition.


The reason there is no rpm definitions is b/c I cannot find in the JSBSim code where it loads any other value form the propulsion file other than power for an electric engine. There are two reasons I can think of for that:
1. I am not reading the code correctly. Without actually compiling and running a debugger (not out of the question, but I have more pressing issues) on the code it is hard to know FOR SURE how an electric engine is created.
2. The prop will spin at a certain RPM based on the load (calculated from the aerodynamic model I would assume) and the power input. i.e RPM is based on a function of prop load and power output from the engine. This means that theoretically the prop would spin at infinite RPM under no load. I guess that makes sense since only in a vacuum would a prop experience no-load.

As for your autopilot sim, are you looking to run this in realtime? I am sorry to hear that your IMU is closed-source, is there any particular reason for that? I am interested to see if your rascal FDM works in FG. I don’t know if FG HAS to have the graphical properties of a model to work properly. Do you have an input scripts to JSBSim that you use? I have not tried to run JSBSim standalone yet. Is there any way you could run your model in JSBSim, capture XYZ-accel and roll-pitch-yaw rates, and send me the data, this would help me with testing.

At 10:51am on August 18, 2009, Michael Primm said…

The web site stripped out the xml from my post. So I have tried to attach it as a file.

At 6:25pm on August 18, 2009, Michael Primm said…
If you don't mind me asking what is your target audiance? I never even thought about selling anything. In my world all I see is the big names quickly locking up the UAV markets, and certainly the IMU/INS/EGI markets. Also, how is that atomic board working out for you, particularly the LISY300s? I was thinking about picking one of those up, but I might just piece together a prototype first so I can see if the sensors are up to snuff. Any chance you guys have collected any data from that board? It would be nice to have to match my sensor model outputs to. Gonna take a look at you rascal model and see if I can't get it to run for me. As far as the electric motor model, what exactly are you looking for? Current draw, votages, battery drian, etc? I don't think that sort of stuff has been put into JSBSim yet. I'll let you know what I come up with.
At 8:12am on August 19, 2009, Michael Primm said…
I don't have the file here at work, but it was very basic. Essentially just a propulsion file with one parameter: power (in watts). I am going to try to compile JSBSim today and see if I cannot get your rascal to work with an electric motor. Between real work and working on my masters it is hard to find playtime.
At 9:38am on August 19, 2009, Michael Primm said…

Had I mildly successful lunch. Got JSBSim compiled and running. It craps out reading the rascal model though. This is the error: "FGPropertyManager::GetNode() No node found for aero/function/CLwbh
The property aero/function/CLwbh is undefined."

I think it is caused by something around line 295 in the rascal.xml file. Have you had this problem?

At 5:39pm on August 19, 2009, Michael Primm said…
Ohhhh, I was confused, I thought you had actually ran this file. I will give the new one a whirl and see what happens. I should let you know that there is a big difference between getting JSBSim to read in a model and actually getting that model to fly. Kind of like anybody can go and build something that looks like an airplane, but building an airplane that can fly is a whole nother story!
At 6:15am on August 20, 2009, Michael Primm said…

Ran the new file this morning and I think it still has the same issue. It will probably be easier for you to trouble shoot if you can run it yourself. I have attached a .zip file that has the JSBSim executable in it. You should unzip it and run it this way:

jsbsim --root="c:/code/JSBSim-1.0/" --aircraft=Rascal --initfile=reset00

for you "c:/code/JSBSim-1.0/" would be the full path where the exe is located. Your Rascal.xml file goes into the "/aircraft/Rascal" folder. reset00 is just an initial position file that for now dont worry about, you need to get your model running before you worry about that. Run it from a command prompt window and a whole bunch of information will be spit out to the screen including the errors. Let me know if you cant get it going.

At 7:19pm on August 20, 2009, Michael Primm said…

You are correct, without a script to follow it really doesn't "do" anything. If you look at the JSBSim manual online there is a decent section on scripting. Also, take a look at the other scripts in the /scripts folder. However without propulsion you aren't going to get very far :). You could test its gliding capabilities! Essentially you need to give it an initfile, then set up "events" that move control surfaces, etc. Use the tag to set up notifications. You are nearing the end of my knowledge in JSBSim. I had an emergent requirement come up today that puts me in Charlotte, NC tomorrow thru Sunday. Scrambling to get a final paper written for a class before I leave, so I won't have anytime between now and Sunday to fiddle with things. Let me know how things go.


PS Try running jsbsim --root= --script=scripts/c1723
That will give you an idea of the output.
At 8:26pm on September 30, 2009, Abhishek Jain said…

Can u send me a circuit diagram of your connections from the SF IMU to the Arduino. I am having a problem. Am not able to get the pinout for the z-sensor. And can u post a better photograph of your Arduino+IMU setup.


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

Join DIY Drones


Season Two of the Trust Time Trial (T3) Contest 
A list of all T3 contests is here. The current round, the Vertical Horizontal one, is here

© 2019   Created by Chris Anderson.   Powered by

Badges  |  Report an Issue  |  Terms of Service