Sign in to follow this  
stalef

JSBSim

Recommended Posts

stalef    607
I'm trying out JSBSim just for fun, but I'm kind of stuck :( There is not an abundance of information about it available (could not find a forum), so there is only the "manual". I downloaded the newest (and only) version (1.0-rc2), and tried to start it up in realtime-mode with a plane (c182) and an initial conditions file, but nothing happens. The main loop seems to skip the call to FDMExec->Run() because the function FDMExec->GetSimTime() returns "bogus" values. I don't expect it to do much since I'm not setting input data and reading out results, but I'm starting basic, and would at least want to confirm that the main simulation loop runs before proceeding. Any help or direction to resources would be appreciated :)

Share this post


Link to post
Share on other sites
grhodes_at_work    1385
I have a sense of Deja Vu. I remember another thread where someone asked about JSBSim, recently, before you, but I cannot find the post.

So I'll rewrite what I remember writing then...(or perhaps I imagined it).

I don't know anything about JSBSim! And even thought I recall seeing another mention of it recently, it certainly doesn't seem to be very popular in the gamedev.net community. So, I can't help answer your question.

When I did a google search, there were many hits on JSBSim on various flight simulator forums... My advice is that you should go post your question on those flight sim specific forums, since there appears to be people who have some experience with the library on those forums.

Good luck!

Share this post


Link to post
Share on other sites
jonsberndt    100
Quote:
Original post by grhodes_at_work
When I did a google search, there were many hits on JSBSim on various flight simulator forums... My advice is that you should go post your question on those flight sim specific forums, since there appears to be people who have some experience with the library on those forums.

Good luck!


Greetings,

To find out more about JSBSim, the Reference Manual (which is incomplete) is still the best place to go. Next, join the developer mailing list. You can do that here: http://sourceforge.net/mail/?group_id=19399. There are also a couple of AIAA papers that I've written about JSBSim (www.aiaa.org). I'll try to post the latest one on our web site. You can also see the current API documentation (generated by doxygen) at http://www.jsbsim.org/JSBSim/. Note that the API documentation corresponds to the latest code in CVS, which is not at all times necessarily stable. We do have a very active developer team, however, and any bugs found are usually fixed very quickly. Since the project has been around for over 13 years, we've managed to reach a fair degree of reliability, and are used as the flight model code for FlightGear, OpenEaagles, and (more recently) Outerra, as well as numerous student and industry projects over the years.

Jon
--
www.jsbsim.org

Share this post


Link to post
Share on other sites
GuyCalledFrank    279
Hi, just in case if someone tried to use JSBSim... (outerra devs?  :rolleyes:)

I have to simulate a helicopter and I chose it because I'm a complete noob in flight dynamics and my attempts to do a reasonable behaviour with Bullet Physics intuitively applying some forces to heli's hull failed.

It looks like even with JSBsim I have to understand something about aircrafts just because of its specific inputs.

Currently I have a code which looks like this:

// init

JSBSim::FGFDMExec* FDMExec = new JSBSim::FGFDMExec();
 FDMExec->LoadModel("aircraft","engine","systems","pa28");

// try to set initial aircraft's position to 0,100,0

JSBSim::FGMassBalance* mass = FDMExec->GetMassBalance();
JSBSim::FGColumnVector3 CG;
CG.InitMatrix(0,100,0);
mass->SetBaseCG(CG);
 
 FDMExec->GetState()->Setdt(1); // constant dt just for test



// random values

FDMExec->GetAtmosphere()->SetExTemperature(9.0/5.0*(1+273.15) );
FDMExec->GetAtmosphere()->SetExDensity(1);
FDMExec->GetAtmosphere()->SetExPressure(1);
FDMExec->GetPropagate()->SetSeaLevelRadius(0);
FDMExec->GetAtmosphere()->SetWindNED(1,0,0);
FDMExec->GetAtmosphere()->SetWindspeed(10);


bool result = FDMExec->Run();

while (result)
{
result = FDMExec->Run();
  float4 pos = float4( mass->GetXYZcg(1), mass->GetXYZcg(2), mass->GetXYZcg(3) ); // (float4 is my custom vector type)
  pos.Dump(); 
  cout << "simtime: "<<FDMExec->GetSimTime() << endl; 
}





The sim time seems to increment, however aircraft's position doesn't change. I thought it will change at least because of gravity.

It is really hard to start with JSBsim API for me, maybe because it is made for different purposes and can do a lot more thing than I'm gonna use.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this