1
0
Fork 0
flightgear/utils/fgpanel
2020-08-29 11:20:40 -05:00
..
.gitignore Remove automake ignores. 2011-11-01 13:53:52 +01:00
ApplicationProperties.cxx Update FGPanel: 2020-04-01 20:58:59 +01:00
ApplicationProperties.hxx Update FGPanel: 2016-12-16 19:35:44 +00:00
CMakeLists.txt Improve CMake strucutre 2020-08-23 11:31:37 +01:00
FGCroppedTexture.cxx Update FGPanel: 2016-12-16 19:35:44 +00:00
FGCroppedTexture.hxx Update FGPanel: 2016-12-16 19:35:44 +00:00
FGDummyTextureLoader.cxx Update FGPanel: 2016-12-16 19:35:44 +00:00
FGDummyTextureLoader.hxx Update FGPanel: 2016-12-16 19:35:44 +00:00
FGFontCache.cxx Update FGPanel: 2016-12-16 19:35:44 +00:00
FGFontCache.hxx Update FGPanel: 2016-12-16 19:35:44 +00:00
FGGLApplication.cxx Update FGPanel: 2016-12-16 19:35:44 +00:00
FGGLApplication.hxx Update FGPanel: 2016-12-16 19:35:44 +00:00
FGGroupLayer.cxx Update FGPanel: 2016-12-16 19:35:44 +00:00
FGGroupLayer.hxx Update FGPanel: 2016-12-16 19:35:44 +00:00
FGInstrumentLayer.cxx Update FGPanel: 2016-12-16 19:35:44 +00:00
FGInstrumentLayer.hxx Update FGPanel: 2016-12-16 19:35:44 +00:00
FGLayeredInstrument.cxx Update FGPanel: 2016-12-16 19:35:44 +00:00
FGLayeredInstrument.hxx Update FGPanel: 2016-12-16 19:35:44 +00:00
FGPanel.cxx FGPanel: update for Raspbian 10 2020-04-01 21:02:24 +01:00
FGPanel.hxx Update FGPanel: 2020-04-01 20:58:59 +01:00
FGPanelApplication.cxx Replace boost::enable_if/disable_if/enable_if_c/disable_if_c by std::enable_if 2020-04-22 14:05:47 +01:00
FGPanelApplication.hxx Update FGPanel: 2016-12-16 19:35:44 +00:00
FGPanelInstrument.cxx Update FGPanel: 2016-12-16 19:35:44 +00:00
FGPanelInstrument.hxx Update FGPanel: 2016-12-16 19:35:44 +00:00
FGPanelProtocol.cxx SGSubsystem classes: Registration of all subsystems. 2019-07-01 14:51:32 +02:00
FGPanelProtocol.hxx Update FGPanel: 2020-04-01 20:58:59 +01:00
FGPanelTransformation.cxx Update FGPanel: 2016-12-16 19:35:44 +00:00
FGPanelTransformation.hxx Update FGPanel: 2016-12-16 19:35:44 +00:00
FGPNGTextureLoader.cxx Update FGPanel: 2016-12-16 19:35:44 +00:00
FGPNGTextureLoader.hxx Update FGPanel: 2016-12-16 19:35:44 +00:00
FGRGBTextureLoader.cxx Update FGPanel: 2016-12-16 19:35:44 +00:00
FGRGBTextureLoader.hxx Update FGPanel: 2016-12-16 19:35:44 +00:00
FGSwitchLayer.cxx Update FGPanel: 2016-12-16 19:35:44 +00:00
FGSwitchLayer.hxx Update FGPanel: 2016-12-16 19:35:44 +00:00
FGTextLayer.cxx FGPanel: update for Raspbian 10 2020-04-01 21:02:24 +01:00
FGTextLayer.hxx Update FGPanel: 2016-12-16 19:35:44 +00:00
FGTexturedLayer.cxx Update FGPanel: 2016-12-16 19:35:44 +00:00
FGTexturedLayer.hxx Update FGPanel: 2016-12-16 19:35:44 +00:00
FGTextureLoaderInterface.hxx Update FGPanel: 2016-12-16 19:35:44 +00:00
GL_utils.cxx Update FGPanel: 2016-12-16 19:35:44 +00:00
GL_utils.hxx Update FGPanel: 2016-12-16 19:35:44 +00:00
GLES_utils.cxx Update FGPanel: 2016-12-16 19:35:44 +00:00
GLES_utils.hxx Update FGPanel: 2016-12-16 19:35:44 +00:00
main.cxx Update FGPanel: 2016-12-16 19:35:44 +00:00
panel_io.cxx Removed unreachable code 2020-08-29 11:20:40 -05:00
panel_io.hxx Update FGPanel: 2020-04-01 20:58:59 +01:00
README Initial commit of the fgpanel code 2011-04-14 11:11:17 +02:00
README.RPi FGPanel: update for Raspbian 10 2020-04-01 21:02:24 +01:00

=====================================================================
This is fgpanel - basically the stripped down 2D-Panel code from
FlightGear. It is designed as a standalone lightweight panel 
rendering engine to draw 2d panels on a lowcost computer/graphic card
without 3d acceleration at reasonablel framerates.

=====================================================================
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as
published by the Free Software Foundation; either version 2 of the
License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.

=====================================================================
Usage
start fgpanel with
fgpanel --fg-root=/path/to/fg/data --panel=Aircraft/MyAircraft/Panels/MyPanel.xml
with the command args set to
--fg-root shall point to the directory where your FGDATA lives
  NOTE: you don't need a full copy of FGDATA, just the panel definition files for
  your aircraft, e.g.
  - Aircraft/MyAircraft/Panels/*
  - Aircraft/Instruments/* (if referenced)

-panel shall point to a panel-configuration file, relative to FGDATA

start flightgear with
fgfs --generic=socket,out,10,239.24.10.64,5432,udp,../Aircraft/MyAircraft/Panels/SampleProtocol

=====================================================================
Sample:

Create the sample files within your aicraft directory, preferrable under Panels
MyPanel.xml
sample-2d-panel.xml
SampleProtocol.xml

=====================================================================
Sample panel configuration file (MyPanel.xml)
<PropertyList>

  <!-- true: run full-screen, false; run in window -->
  <game-mode type="bool">false</game-mode>

  <!-- include the panel definitions (2d-panel syntax)-->
  <panel include="sample-2d-panel.xml"/>

  <!-- compose your property-tree here -->
  <sim>
    <panel>
      <flip-x type="bool">false</flip-x>
    </panel>
    <instrument-options>
      <omit-knobs type="bool">true</omit-knobs>
    </instrument-options>
  </sim>

  <!-- network communication settings -->
  <communication>
    <listen>
      <!-- interface to bind to, 
           leave empty for all interfaces -->
      <host>239.24.10.64</host> <!-- multicast address! -->
      <port>5432</port> <!-- tcp port to listen to -->
      <style>udp</style> <!-- udp or tcp (forget about tcp!) -->
    </listen>

    <!-- the generic protocol definition 
         same as used for fgfs --generic=foobar option
    -->
    <protocol include="SampleProtocol.xml"/>
  </communication>
</PropertyList>

=====================================================================
Sampe 2d-panel configuration file sample-2d-panel.xml
To be included from the panel configuration file

<?xml version="1.0"?>
<PropertyList>
    <name>Sample Instrument Panel</name>
    <w>375</w> <!-- screen width: 375mm -->
    <h>305</h> <!-- screen height: 305mm -->
    <instruments>
        <!-- use FlightGear's c172 attitude indicator -->
        <instrument include="../../Instruments/ati-c172s.xml">
            <name>Attitude Gyro</name>
            <x alias="../../../params/col-2"/>
            <y alias="../../../params/row-1"/>
            <w>80</w>
            <h>80</h>
        </instrument>
    </instruments>
</PropertyList>

=====================================================================
Sample protocol configuration file to drive the AI (SampleProtocol.xml)
<?xml version="1.0"?>

<PropertyList>
 <generic>

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

   <chunk>
    <type>float</type>
    <format>%.2f</format>
    <node>/position/altitude-agl-ft</node>
   </chunk>

   <chunk>
    <type>float</type>
    <format>%.2f</format>
    <node>/instrumentation/attitude-indicator/indicated-roll-deg</node>
   </chunk>

   <chunk>
    <type>float</type>
    <format>%.2f</format>
    <node>/instrumentation/attitude-indicator/indicated-pitch-deg</node>
   </chunk>

   <chunk>
    <type>float</type>
    <format>%.2f</format>
    <node>/instrumentation/attitude-indicator/horizon-offset-deg</node>
   </chunk>

   <chunk>
    <type>float</type>
    <format>%.4e</format>
    <node>/instrumentation/attitude-indicator/spin</node>
   </chunk>
  </output>
 </generic>
</PropertyList>

=====================================================================