Here's the protocol file I was using - this basically sets up FG to pump 
this data out via UDP at whatever update rate you want.

I used outbound UDP from FG to send data from the sim to my host interface 
software and then a telnet based command channel that would be used to set 
properties.  The command line example shown above will set up the command 
channel on port 5500 and the UDP data pump on port 5501.

I hope you find this useful!

g.


<?xml version="1.0"?>

<PropertyList>
  <comment>
   <![CDATA[
     Test protocol file for use with Cockpit Master
     Usage:
     # fgfs --telnet=5500 --generic=socket,out,<hz>,<host>,5501,udp,test
   ]]>
  </comment>

  <generic>

   <output>
    <line_separator></line_separator>
    <var_separator>newline</var_separator>

    <chunk>
     <name>com1frq</name>
     <type>float</type>
     <format>COM1_FRQ=%03.3f</format>
     <node>/instrumentation/comm/frequencies/selected-mhz</node>
    </chunk>

    <chunk>
     <name>com1-serviceable</name>
     <type>bool</type>
     <format>COM1_SRV=%d</format>
     <node>/instrumentation/comm/serviceable</node>
    </chunk>

    <chunk>
     <name>com2frq</name>
     <type>float</type>
     <format>COM2_FRQ=%03.3f</format>
     <node>/instrumentation/comm[1]/frequencies/selected-mhz</node>
    </chunk>

    <chunk>
     <name>com2-serviceable</name>
     <type>bool</type>
     <format>COM2_SRV=%d</format>
     <node>/instrumentation/comm[1]/serviceable</node>
    </chunk>

    <chunk>
     <name>nav1frq</name>
     <type>float</type>
     <format>NAV1_FRQ=%03.3f</format>
     <node>/instrumentation/nav/frequencies/selected-mhz</node>
    </chunk>

    <chunk>
     <name>nav1-serviceable</name>
     <type>bool</type>
     <format>NAV1_SRV=%d</format>
     <node>/instrumentation/nav/serviceable</node>
    </chunk>

    <chunk>
     <name>nav2frq</name>
     <type>float</type>
     <format>NAV2_FRQ=%03.3f</format>
     <node>/instrumentation/nav[1]/frequencies/selected-mhz</node>
    </chunk>

    <chunk>
     <name>nav2-serviceable</name>
     <type>bool</type>
     <format>NAV2_SRV=%d</format>
     <node>/instrumentation/nav[1]/serviceable</node>
    </chunk>

    <chunk>
     <name>ptt-key-status</name>
     <type>int</type>
     <format>PTT=%d</format>
     <node>/instrumentation/comm/ptt</node>
    </chunk>

    <chunk>
     <name>transponder-code</name>
     <type>int</type>
     <format>TRANSPONDER=%d</format>
     <node>/instrumentation/transponder/id-code</node>
    </chunk>

    <chunk>
     <name>airspeed</name>
     <type>float</type>
     <format>IAS=%04.1f</format>
     <node>/velocities/airspeed-kt</node>
    </chunk>

    <chunk>
     <name>groundspeed</name>
     <type>float</type>
     <format>GS=%04.1f</format>
     <node>/velocities/groundspeed-kt</node>
    </chunk>

    <chunk>
     <name>pos-longitude-deg</name>
     <type>float</type>
     <format>LON=%03.6f</format>
     <node>/position/longitude-deg</node>
    </chunk>

    <chunk>
     <name>pos-latitude-deg</name>
     <type>float</type>
     <format>LAT=%03.6f</format>
     <node>/position/latitude-deg</node>
    </chunk>

    <chunk>
     <name>pos-alt</name>
     <type>float</type>
     <format>ALT=%05.0f</format>
     <node>/position/altitude-ft</node>
    </chunk>

    <chunk>
     <name>heading</name>
     <type>float</type>
     <format>HEAD=%03.1f</format>
     <node>/instrumentation/heading-indicator/indicated-heading-deg</node>
    </chunk>

   </output>

  </generic>

</PropertyList>


-- 
Proud owner of F-15C 80-0007
http://www.f15sim.com - The only one of its kind.
http://www.simpits.org/geneb - The Me-109F/X Project

ScarletDME - The red hot Data Management Environment
A Multi-Value database for the masses, not the classes.
http://www.scarletdme.org - Get it _today_!

Political correctness is a doctrine, fostered by a delusional, illogical
minority, and rabidly promoted by an unscrupulous mainstream media, which
holds forth the proposition that it is entirely possible to pick up a turd
by the clean end.

------------------------------------------------------------------------------
Create and publish websites with WebMatrix
Use the most popular FREE web apps or write code yourself; 
WebMatrix provides all the features you need to develop and 
publish your website. http://p.sf.net/sfu/ms-webmatrix-sf
_______________________________________________
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel

Reply via email to