Advice abt integration design work j661&...

Users
Anonymous
2011-11-24
2013-06-12
1 2 > >> (Page 1 of 2)

  • Anonymous
    2011-11-24

    Hello,

    I would like to ask some advice about quicker and simpler start concerning the following project.

    The project intend to design an aircraft using flight simulations of a software model.
    As a platform for simulation and aircraft modeling I chose FlightGear.
    In this design I intend to include a simplified modeling and testing for the HMI using j661 connected to FG.

    Three Multi-function display are intended:
    - Horizontal situation i.e. moving map and a/c symbol.
    - Primary flight display
    - General purpose display

    The initial layout is intended to be very basic. The General Purpose display is intended for different further experiment e.g. implementing an iPad.

    The displays shall get ”real time” input data from FG through FG-connection.

    I am quite basic skilled in programming and my knowledge about the architecture of FG is quite limited. I am an ordinary user.
    My goal is actually to work with the integration of FG to j661 displays above and with the design of the aircraft model, to incrementally test and design the aircraft (avionics architecture and flight control).

    It is a hobby project.

    I am still a bit confused in choosing right file package and set up the displays.

    My assumption is that executable java is enough for me (each CDS with a whole separate file set). To configurate each CDS will be possible by exclusive adapt the DF.
    I also suppose it will be possible in the current j661 implementation to automatically start the three CDS and skip point the DF-s.

    I would also be fun to find a way for FG on its launch to start the three j661 CDS.

    The last question is if I actually should have use to chose something in the demos which are provided in the j661 source forge file repository or just build from scratch. Possibly only DF in some demo could be used in standard j661 package?

    Last but not least: Hervé and the other guys who help: Merci pour votre travail, c'est vraiment fantastique!
    George

     
  • Hervé Girod
    Hervé Girod
    2011-11-24

    Hello, and thanks very much for your interest!!

    For setting up the displays, you would want to use a Cockpit Configurationr I think. It allows to manage not only one Definition File / layer by the user Application, but any cockpit, even with more than one Display if you want. There is an example in the article I linked. It is even possible to define only one configuration for more than one Server (they are defined in XML files), and set properties in the file used for the Server launcher to define which display beach Server will handle.

    There are example of Displays in the samples released with the project : The MapHorz example is a simple horizontal map for example. There is no Primary Flight Display in the examples, but we define a lot of them at work (unfortunately I would not be allowed to share them here of course), so it's not really difficult to create one. Eventually that might be a good thing if I create a non encumbered PDU example and release it with the project in the samples, as it is really some example everyone might want to have.

    As for the genertal purpose displays, they are really simple to create in the Editor. The samples show  examples of Definition Files with all kind off buttons, it's just a matter of drag and dropping things in a Layer.

    Starting more than one CDS is not difficult, as it is something we are doing routinely in Dassault with J661. Remember that each CDS can manager more tahn one Window in the same Display, by using the Cockpit Configuration.

    As long as you don't need custom widgets or extensions, or pure java code in the Client, you don't need anything else than the binary release.  So you would be able to build your configuration with the Editor (the cockpit configuration file itself must be defined by hand however), and test it with a Client or even Scripting without any line of code. And that even for more than one Server, and even for servers working on tablets or other PCs (it is possible to define the host for the communication).

    However for the moment, the version of tnhe Server which works on Android is a little more simpler than the regular one, and the Server is still not working on iOS (though I began to do the porting - which is not so difficult, so it will be usable in iOS in the future).

    Don't hesitate if yo have other questions, and thanks again!

    Herve

     
  • Hervé Girod
    Hervé Girod
    2011-11-24

    Hello, and thanks very much for your interest!! For setting up the displays, you would want to use a Cockpit Configuration I think. It allows to manage not only one Definition File / layer by the user Application, but any cockpit, even with more than one Display if you want. There is an example in the article I linked. It is even possible to define only one configuration for more than one Server (they are defined in XML files), and set properties in the file used for the Server launcher to define which display beach Server will handle. There are example of Displays in the samples released with the project : The MapHorz example is a simple horizontal map for example. There is no Primary Flight Display in the examples, but we define a lot of them at work (unfortunately I would not be allowed to share them here of course), so it's not really difficult to create one. Eventually that might be a good thing if I create a non encumbered PDU example and release it with the project in the samples, as it is really some example everyone might want to have. As for the genertal purpose displays, they are really simple to create in the Editor. The samples show examples of Definition Files with all kind off buttons, it's just a matter of drag and dropping things in a Layer. Starting more than one CDS is not difficult, as it is something we are doing routinely in Dassault with J661. Remember that each CDS can manager more tahn one Window in the same Display, by using the Cockpit Configuration. As long as you don't need custom widgets or extensions, or pure java code in the Client, you don't need anything else than the binary release. So you would be able to build your configuration with the Editor (the cockpit configuration file itself must be defined by hand however), and test it with a Client or even Scripting without any line of code. And that even for more than one Server, and even for servers working on tablets or other PCs (it is possible to define the host for the communication). However for the moment, the version of tnhe Server which works on Android is a little more simpler than the regular one, and the Server is still not working on iOS (though I began to do the porting - which is not so difficult, so it will be usable in iOS in the future). Don't hesitate if yo have other questions, and thanks again! Herve

     
  • Hervé Girod
    Hervé Girod
    2011-11-24

    Hello, and thanks very much for your interest!!

    For setting up the displays, you would want to use a Cockpit Configuration I think. It allows to manage not only one Definition File / Layer by the user Application, but any cockpit, even with more than one Display if you want. There is an example in the article I linked. It is even possible to define only one configuration for more than one Server (they are defined in XML files), and set properties in the file used for the Server launcher to define which display beach Server will handle.

    There are example of Displays in the samples released with the project : The MapHorz example is a simple horizontal map for example. There is no Primary Flight Display in the examples, but we define a lot of them at work (unfortunately I would not be allowed to share them here of course), so it's not really difficult to create one. Eventually that might be a good thing if I create a non encumbered PDU example and release it with the project in the samples, as it is really some example everyone might want to have.

    As for the general purpose displays, they are really simple to create in the Editor. The samples show examples of Definition Files with all kind off buttons, it's just a matter of drag and dropping things in a Layer.

    Starting more than one CDS is not difficult, as it is something we are doing routinely in Dassault with J661. Remember that each CDS can manager more than one Window in the same Display, by using the Cockpit Configuration.

    As long as you don't need custom widgets or extensions, or pure java code in the Client, you don't need anything else than the binary release. So you would be able to build your configuration with the Editor (the cockpit configuration file itself must be defined by hand however), and test it with a Client or even Scripting without any line of code. And that even for more than one Server, and even for servers working on tablets or other PCs (it is possible to define the host for the communication).

    However for the moment, the version of the Server which works on Android is a little more simpler than the regular one, and the Server is still not working on iOS (though I began to do the porting - which is not so difficult, so it will be usable in iOS in the future).

    Don't hesitate if you have other questions, and thanks again!

    Herve

     
  • George P
    George P
    2011-12-03

    Hello,

    I tried to test server launching using a bach file in Windows but also from Windows DOS prompter within the
    j661-bin-0.51.3\distrib directory. The arincServer.jar was possible to start manually.

    In the bach file
    java arincServer.jar -config=config/arinc.properties
    java arincServer.jar -config config/arinc.properties

    From prompter
    H:\j661\j661-bin-0.51.3\distrib>java arincServer.jar -config=config/arinc.properties

    Errors I get:

    Exception in thread "main" java.lang.NoClassDefFoundError:

    arincServer/jar
    Caused by: java.lang.ClassNotFoundException: arincServer.jar
            at java.net.URLClassLoader$1.run(Unknown Source)
            at java.security.AccessController.doPrivileged(Native Method)
            at java.net.URLClassLoader.findClass(Unknown Source)
            at java.lang.ClassLoader.loadClass(Unknown Source)
            at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
            at java.lang.ClassLoader.loadClass(Unknown Source)
    Could not find the main class: arincServer.jar.  Program will exit.

    Any idea about what is wrong? Thanks!

    George
    P.S. There are two identical config directories, one in the root j661-bin-0.51.3 and the other within  the distrib directory. What could be the reason?

     
  • Hervé Girod
    Hervé Girod
    2011-12-03

    Hello, sorry it's because of a typo error in the wiki. To start a jar file, you should use:
    java -jar arincServer.jar -config=config/arinc.properties

    ratehr than
    java arincServer.jar -config=config/arinc.properties

    The -jar is a java tag which make the Java virtual machine know that it will find a jar file, and not just a class file. I just fixed the mistake in the wiki.

     
  • George P
    George P
    2011-12-03

    Great, the batch is working now. But I have some new questions in order to continue my system integration - it's now or never :-)

    In order to link a running FlightGear to te setup based on Cockpit Configuration, I intend also to link a FlightGear session through j661-fgLive-bin-0.2 for putting livfe in the experiment
    j661-fgLive-bin-0.2 is a separate directory and have an own fgLive.bat that says
       java -jar lib/embedClient.jar -df=samples/Layer.xml -hasServer=true -autoStart=false

    The server instance is in j661-bin-0.51.3/distrib

    I suppose in a way a launched arincServer.jar is intended to communicate with a running FlightGear (I have everything in my machine). My primary goal is to be able to show almost the current Altitude of the FlightGear flying a/c in the display provided by the launched j661-bin-0.51.3/distrib/arincServer.jar

    Can I put the start command for the Server in the fgLive.bat too?

    I have not yet created the altitude box in the server DT and not yet "linked" the FlightGear Altitude variable to the "altitude box". I must find out how…

    The last question as far is about the sequence launching j661 server, fgLiveProvider.jar and the simulator (FlightGear). I suppose the simulator can be started first, followed by the dataprovder and the server.

    Tkans!

    George

     
  • George P
    George P
    2011-12-03

    OK, I found and used information about provider is in FGLiveProvider wiki
    https://sourceforge.net/apps/mediawiki/j661/index.php?title=FGLiveProvider#Example

    the bat files are working too.

    However, I could not fint  the lib/embedClient.jar either in the j661-fgLive-bin-0.2 or in the main package j661-bin-0.51.3

     
  • Hervé Girod
    Hervé Girod
    2011-12-03

    hello, I don't know yet how to start several sub-processes in the same DOS batch file, but I will look at it. They don't use DOS files at work for that purpose, but python scripts.

    About the sequence for starting the server, the provider and the simulator, there is no need to start the Server AND the embedClient, the embedClient itself take care of starting the server and and associated client. So when you use :
    java -jar lib/embedClient.jar -df=samples/Layer.xml -hasServer=true -autoStart=false

    In fact you also start a server (autoStart = false means that you will have to make the server listen to the communication coming through the Client, but in fact it is already started). This is the case because the property hasServer is set to true.

    So in this case the bat file you mention is enough to start the server, the client and its provider listening to the FlightGear instance.

    And one last thing: as far as I know, you can start the provider / Client + server when you want, i.e. before or after FlightGear, but I'm not so sure of that because of the Flightgear => provider communication. However if you set the hasServer property to false, you would need to also start a Server, but the start sequence between the Client / provider and the Server would be unimportant.

     
  • George P
    George P
    2011-12-03

    Great! The issue which is still unsolved is to find a lib/embedClient.jar which in present is not provided in the

    I putted fg.bat in the appropriate FG directory and it works well (launch the FG).

     
  • Hervé Girod
    Hervé Girod
    2011-12-03

    hmm, I forgot to put the lib directory in the bin release of the FGLive provder. This directory is present (correctly) in the src release of the provider, but I just fixed the mistake and re-released the same j661-fgLive-bin-0.2.zip with the lib. Sorry for that ;)

    Herve

     
  • George P
    George P
    2011-12-03

    Thank you, it works excellent now after completing the library. Fantastique, très sympa!

     
  • Hervé Girod
    Hervé Girod
    2011-12-03

    Glad it works for you!

     
  • George P
    George P
    2012-01-01

    Happy New Year and New j661 Displays,  Bonne Année et bonnes visualisationes :-)

    Just a little question. For the integration test I decide put the 3 displays as 3 windows in an CDS.

    That means using a superlayer and just one running j661 server. Eventually one more one windows separate CDS would act as a general purpose and backup in case the main CDS is dammaged.

    What would be suitable for that approache: the generic or the non generic types?
    For me sounds the generic one gets more advantages.

    Thanks!

     
  • Hervé Girod
    Hervé Girod
    2012-01-01

    Hello,

    Happy New Year to you too !!

    I think that generic types are almost always better, in the case where you want to perform reconfigurations or backups.

    Remember that if you want to manage the Windows / Layouts dynamically, you will have to use the Cockpit plugin to convert the cockpit definition in a SuperLayer ARINC 661 layer.

    Hervé

     
  • George P
    George P
    2012-01-06

    About building the cockpit.

    In the examples metalayer2.xml and WMTestlayers.xml there are a lot of height="20000" etc. Changing the value needs to perform the change several places in XML files above.
    I wonder if there is a way to define constants like   <dimen name="h" >20000</dimen>

    I couldnt find the answer my self. Any ideas? Thanks!

    George

     
  • Hervé Girod
    Hervé Girod
    2012-01-06

    Hello, no it is not possible for the moment. You can reuse a geometry for several windows, but you can't define constants in the current format. But it's a good idea, and really easy to implement.

     
  • Hervé Girod
    Hervé Girod
    2012-01-06

    I could add something at the beginning of the cockpit configuration file, like:

    <cockpit appliID="1" layerID="1">
       <constants>
              <constant name="duWidth" value="32000" />
      <constant name="duHeight" value="20000" />
       </constants>
       <DFFiles>
          <df path="WMTestlayers.xml"/>
       </DFFiles>
       <geometry>
          <geom name="full" width="duWidth" height="duHeight" transparent="false"/>
          <geom name="insert" width="8000" height="10000" transparent="false"/>
       </geometry>
       <windowTypes>
          <windowType name="fullWindow" geometry="full" selector="all">
             <layer name="layer1" layerID="100"/>
          </windowType>
          <windowType name="leftinsertWindow" geometry="insert" selector="oneOf">
             <layer name="layer2" layerID="80"/>
             <layer name="layer3" layerID="81"/>
          </windowType>
       </windowTypes>
       <layoutTypes> 
          <layoutType name="fullLayout">
            <windowTypeRef name="main" type="fullWindow" x="0" y="0"/>                     
           </layoutType>
          <layoutType name="leftInsertLayout">
             <windowTypeRef name="main" type="fullWindow" x="0" y="0"/>
             <windowTypeRef name="lowerleft" type="leftinsertWindow" x="0" y="0"/>
          </layoutType>
       </layoutTypes>
       <displayTypes>
          <displayType name="du" width="duWidth" height="duHeight" defaultLayout="leftInsertLayout">
             <typeRef type="fullLayout"/>
             <typeRef type="leftInsertLayout"/>
          </displayType>
       </displayTypes>
       <configs border="255,255,255" borderWidth="2" decorated="true">
          <display id="1" name="left">
             <typeRef type="du"/>
          </display>
       </configs>
    </cockpit>

    What do you think?

    Herve

     
  • Hervé Girod
    Hervé Girod
    2012-01-06

    OK, changes commited. I still need to test it now ;)

     
  • Hervé Girod
    Hervé Girod
    2012-01-07

    OK, new unit tests added, it works on trunk

     
  • Great, thank you! I hope I can test asap.

     
  • Hi there everybody,

    also happy new year!

    Regarding FG<->J661 interfacing, Herve and I came up with a simple patch to improve this somewhat. This was already quite a while ago …  I got busy with other stuff meanwhile. There's currently a code freeze for FG due to the upcoming release (this month), afterwards we can look into improving the patch and getting it into the official FG repository.

    @Herve: Did you ever actually got around to build FG and try the patch?
    If you can't be bothered to look into this, you could just as well let me know your requirements so that I implement the FG side for j661.

    - Hooray

     
  • George P
    George P
    2012-01-12

    Hi,

    Herve, are the changed you named ready?  (2012-01-07 04:17:23 PST OK, new unit tests added, it works on trunk…)
    In the file repository the last files are from 2011. Probably I misunderstand where I must look.

    Thanks!

    George

     
  • Hervé Girod
    Hervé Girod
    2012-01-12

    Hello, sorry I tested and it work ok AFAIK, but I did not uploaded a new release. I will do it this evening, as the state of the trunk is stable.

    Herve

     
  • Hervé Girod
    Hervé Girod
    2012-01-13

    OK, it's done now (0..52 beta 3). Constants are supported in the cockpit configuration file now. I also added two new corresponding examples in the samples directory.

    However there is still a limitation (to be removed in the next beta): as it is not possible to have a configuration which present twice the same layer in the cockpit (in the case where all the Displays are managed by the same Server), defining a cockpit with two displays using exactly the same display type will fail at the cockpit creation if these two displays are managed by the same Server. It will work however if the two Displays are managed by two different Servers.

     
1 2 > >> (Page 1 of 2)