Outerra forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

Outerra Tech Demo download. Help with graphics driver issues

Pages: 1 [2] 3 4 5

Author Topic: JSBSim Interface & Interaction  (Read 80045 times)

Steve.Wilson

  • Full Member
  • ***
  • Posts: 176
  • Home Cockpit Builder
Re: JSBSim Interface & Interaction
« Reply #15 on: December 29, 2012, 04:19:20 am »

Update:  After wading through the JSBSim code base for a while, I believe I've zeroed in on the section I would need to modify to accommodate my cockpit related activities.

Essentially what I need to do is to add code that initializes an IData runtime and interfaces with IData "named memory."  This completely side-steps any built-in interface that JSBSim currently uses and also removes the need for any sort of added "black box" tie in to Anteworld.

Brano, Angrypig, this may not conform to your intentions and likely no one else's needs.  I suspect I'm the only hobbyist in the world that is using IData for personal flight simulation.  Simply said, I had a pretty interesting consulting gig a few years ago!  Named memory spreads itself via UDP among a cluster of systems that are also operating the IData runtime.  So I can treat a three-PC cluster as one entity where instrumentation values are concerned.  It's pretty neat and a heckuva lot easier than writing code to trade data packets.  Faster too.  Currently working wonderfully under X-Plane....and I want to extend that joy to Anteworld before digging in and getting my jet ported over.

First things first, though.  If I can get a JSBSim .dll that is unmodified and working with Anteworld, I'll know I've got a base to work from.

Then I need to get it to do something unique every frame to validate where I'm going to start my surgery.   8)
« Last Edit: December 29, 2012, 04:22:19 am by Steve.Wilson »
Logged

cameni

  • Brano Kemen
  • Outerra Administrator
  • Hero Member
  • *****
  • Posts: 6721
  • No sense of urgency.
    • outerra.com
Re: JSBSim Interface & Interaction
« Reply #16 on: December 29, 2012, 04:36:32 am »

Got some docs about that IData thing?
Logged

Steve.Wilson

  • Full Member
  • ***
  • Posts: 176
  • Home Cockpit Builder
Re: JSBSim Interface & Interaction
« Reply #17 on: December 29, 2012, 05:26:12 am »

Let me see what I can scare up. ;)  Note that I acquired this app in conjunction with paid work, and I continue to be an available resource for same.  IData is a glass cockpit instrumentation development application used for The Real Thing (tm).  So this isn't something that's available to the masses unless one wants to part with a *staggering* sum.  I use it in my cockpit to stay "fresh" for the possibility of future contracts, aside from the obvious benefit.  :D

Aside from IData, though, if this ends up working, it may provide the basis for an example to show other advanced cockpit builders where to put a nice deep hook into Anteworld.....one upon which they can hang some serious interface capability.  As long as they don't mind dealing with OO C++.   :o
« Last Edit: December 29, 2012, 05:30:06 am by Steve.Wilson »
Logged

angrypig

  • Sr. Member
  • ****
  • Posts: 454
Re: JSBSim Interface & Interaction
« Reply #18 on: December 29, 2012, 08:25:37 am »

The JSBSim version we are currently using is old. As Cameni said i want to remove the wrapper around the JSBSim and use it directly as a dynamic library. I already have done all necessary changes to be able to compile JSBSim as a DLL but it needs a few changes on our side too. The second problem is more complicated, we are running multiple instances of JSBSim (one for every plane instance which is not very efficient but there is no other way for now) and as i know JSBSim doesn't have support for this i think this will cause problems if you will try to use JSBSim's network layer, we are probably lucky that we didn't encounter problems so far.
Logged

Steve.Wilson

  • Full Member
  • ***
  • Posts: 176
  • Home Cockpit Builder
Re: JSBSim Interface & Interaction
« Reply #19 on: December 29, 2012, 11:56:39 am »

Fortunately, a flight simmer only needs one instance.  A gaming situation may be different.  Air traffic could be handled by a different interface that doesn't need flight modeling if one feels driven to add such.  There's a fellow doing that sort of thing for X-Plane already.  That said, I have no desire at this point to use JSBSim's network layer, and if I compile my own version of the .DLL, no reason to.  The trick is to make sure that the core of my version is the same as the DLL that Anteworld uses, with the exception, of course, of the cockpit interface code that I add.  That way things should mesh smoothly.

Let's compare.  I'm using what's listed as the latest current stable version:  JSBSim 1.0 RC2.  The only changes I made to compile as a .DLL were to reconfigure my Visual Studio solution to produce a .DLL, excluded JSBSim.cpp from the build, and added XML_STATIC to the preprocessor definitions.  This will build successfully.  By no means am I an expert at this, I used and extended Bill Galbraith's excellent writeup on compiling with VSE 2008 (attached).  If there are other changes, I'm certainly interested to learn and incorporate.  As JSBSim is open source already, this gives a powerful tool to Outerra devs!

So, at what point do you think Outerra development will begin using the "unwrapped" DLL, Angrypig?  That's when I can begin testing my own modifications, and I'm eager for that, naturally.
 
Logged

angrypig

  • Sr. Member
  • ****
  • Posts: 454
Re: JSBSim Interface & Interaction
« Reply #20 on: December 29, 2012, 05:15:10 pm »

If you attach your interface to FGFDMExec class it should be ok, but in case of multiple instances the named shared memory should have a unique name to avoid conflicts between instances.

I had to add __declspec(dllexport) to classes because i need direct access to them for performance reasons. The set/get property way is used in script only and not everything is available through this interface...

I think the transition to the "unwrapped" DLL will be done in sometimes in January i cannot give you precise date...

Logged

Steve.Wilson

  • Full Member
  • ***
  • Posts: 176
  • Home Cockpit Builder
Re: JSBSim Interface & Interaction
« Reply #21 on: December 29, 2012, 05:48:30 pm »

I understand....I think!  And I agree the FGFDMExec is a likely place to add my IData calls.  I can use unique names for my named memory instances, if I'm not mistaken.

Sounds like you did a lot of work if you changed every class definition!

Did you check your version into SourceForge?  It might be smarter for me to work with what you've done that to try to mimic your coding efforts.
Logged

angrypig

  • Sr. Member
  • ****
  • Posts: 454
Re: JSBSim Interface & Interaction
« Reply #22 on: December 29, 2012, 06:09:15 pm »

The DLL version is not published yet, i have to sync my repository with the JSBSim's trunk first. I plan to do that in January but i want to consult this with Jon Berndt first...
Logged

Steve.Wilson

  • Full Member
  • ***
  • Posts: 176
  • Home Cockpit Builder
Re: JSBSim Interface & Interaction
« Reply #23 on: December 29, 2012, 06:11:46 pm »

Got it, and that makes sense.  I certainly have lots of other things to do while I'm waiting.  Thanks for all you've shared to this point!
Logged

Jon S. Berndt

  • Jr. Member
  • *
  • Posts: 24
    • http://www.jsbsim.org
Re: JSBSim Interface & Interaction
« Reply #24 on: January 13, 2013, 08:26:13 pm »

Greetings,

First, I'd recommend synching with the latest version of JSBSim ... shortly. I believe that most or all of our recent developments are solid, but we need to do some testing.

Second, I'm interested in the changes being proposed to support additional capabilities or ease integration. I strongly urge anyone considering changes to JSBSim to at least email me, but preferably subscribe to the JSBSim developer mailing list so we can discuss this in a broader sense and perhaps make everyone's tasks easier. This would also help to preclude the JSBSim codebase from diverging into different builds, which would not be an easy thing to manage.

Best regards,

Jon
jon@jsbsim.org
Development Coordinator and Chief Architect
JSBSim Project
www.jsbsim.org
Logged
Jon S. Berndt
Development Coordinator
JSBSim Project
JSBSim.org

Steve.Wilson

  • Full Member
  • ***
  • Posts: 176
  • Home Cockpit Builder
Re: JSBSim Interface & Interaction
« Reply #25 on: January 13, 2013, 09:43:17 pm »

Jon, will that latest version incorporate the latest changes suggested by the Outerra team?
Logged

Jon S. Berndt

  • Jr. Member
  • *
  • Posts: 24
    • http://www.jsbsim.org
Re: JSBSim Interface & Interaction
« Reply #26 on: January 13, 2013, 10:12:37 pm »

Jon, will that latest version incorporate the latest changes suggested by the Outerra team?

Can I get a summary of the proposed changes?

Jon
Logged
Jon S. Berndt
Development Coordinator
JSBSim Project
JSBSim.org

ZeosPantera

  • ||>>-Z-<<||
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2520
  • #1 Outerra Fan Boy
    • My Youtube
Re: JSBSim Interface & Interaction
« Reply #27 on: January 13, 2013, 11:47:56 pm »

Jon
jon@jsbsim.org
Development Coordinator and Chief Architect
JSBSim Project
www.jsbsim.org

Welcome. I am sure there will be some direct questions and private conversations between yourself and Mr Kemen.
Logged
"Fear accompanies the possibility of death, Calm shepherds its certainty" - General Ka Dargo

cameni

  • Brano Kemen
  • Outerra Administrator
  • Hero Member
  • *****
  • Posts: 6721
  • No sense of urgency.
    • outerra.com
Re: JSBSim Interface & Interaction
« Reply #28 on: January 14, 2013, 02:21:48 am »

Mr Kemen.
Actually Jsbsim intricacies are handled by Mr Hrabcak (aka Mr Angry Pig), who is also subscribed to the jsbsim mailing list. When he finishes with his current task he plans to sync with the latest jsbsim version and also to propose some changes there to simplify the integration. This may be also a place for Steve to plug in with his needs ...
Logged

Steve.Wilson

  • Full Member
  • ***
  • Posts: 176
  • Home Cockpit Builder
Re: JSBSim Interface & Interaction
« Reply #29 on: January 14, 2013, 09:22:22 am »

Thanks, Brano! 

My needs are simple at this point.  I need to be using whatever version that Mr Kemen and Mr Hrabcak are using for Outerra to create the DLL that is used for flight simulation. 

My intended use of JSBSim code will be as an independent, one-user fork that will allow a unique data interface with a professional instrumentation development package.  Ultimately this interface will be discarded once Outerra's main external command and data sharing interface for flight simulation is developed since my flight simulator cockpit will need both command and data capabilities.  I see this as somewhat downstream time-wise, so the temporary fork will allow me to export data to my cockpit and fly with external instrumentation in Outerra in the much shorter term.
Logged
Pages: 1 [2] 3 4 5