1 =====================================================================
2 This is fgpanel - basically the stripped down 2D-Panel code from
3 FlightGear. It is designed as a standalone lightweight panel
4 rendering engine to draw 2d panels on a lowcost computer/graphic card
5 without 3d acceleration at reasonablel framerates.
7 =====================================================================
8 This program is free software; you can redistribute it and/or
9 modify it under the terms of the GNU General Public License as
10 published by the Free Software Foundation; either version 2 of the
11 License, or (at your option) any later version.
13 This program is distributed in the hope that it will be useful, but
14 WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 General Public License for more details.
18 You should have received a copy of the GNU General Public License
19 along with this program; if not, write to the Free Software
20 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
22 =====================================================================
25 fgpanel --fg-root=/path/to/fg/data --panel=Aircraft/MyAircraft/Panels/MyPanel.xml
26 with the command args set to
27 --fg-root shall point to the directory where your FGDATA lives
28 NOTE: you don't need a full copy of FGDATA, just the panel definition files for
30 - Aircraft/MyAircraft/Panels/*
31 - Aircraft/Instruments/* (if referenced)
33 -panel shall point to a panel-configuration file, relative to FGDATA
36 fgfs --generic=socket,out,10,239.24.10.64,5432,udp,../Aircraft/MyAircraft/Panels/SampleProtocol
38 =====================================================================
41 Create the sample files within your aicraft directory, preferrable under Panels
46 =====================================================================
47 Sample panel configuration file (MyPanel.xml)
50 <!-- true: run full-screen, false; run in window -->
51 <game-mode type="bool">false</game-mode>
53 <!-- include the panel definitions (2d-panel syntax)-->
54 <panel include="sample-2d-panel.xml"/>
56 <!-- compose your property-tree here -->
59 <flip-x type="bool">false</flip-x>
62 <omit-knobs type="bool">true</omit-knobs>
66 <!-- network communication settings -->
69 <!-- interface to bind to,
70 leave empty for all interfaces -->
71 <host>239.24.10.64</host> <!-- multicast address! -->
72 <port>5432</port> <!-- tcp port to listen to -->
73 <style>udp</style> <!-- udp or tcp (forget about tcp!) -->
76 <!-- the generic protocol definition
77 same as used for fgfs --generic=foobar option
79 <protocol include="SampleProtocol.xml"/>
83 =====================================================================
84 Sampe 2d-panel configuration file sample-2d-panel.xml
85 To be included from the panel configuration file
89 <name>Sample Instrument Panel</name>
90 <w>375</w> <!-- screen width: 375mm -->
91 <h>305</h> <!-- screen height: 305mm -->
93 <!-- use FlightGear's c172 attitude indicator -->
94 <instrument include="../../Instruments/ati-c172s.xml">
95 <name>Attitude Gyro</name>
96 <x alias="../../../params/col-2"/>
97 <y alias="../../../params/row-1"/>
104 =====================================================================
105 Sample protocol configuration file to drive the AI (SampleProtocol.xml)
106 <?xml version="1.0"?>
112 <line_separator>newline</line_separator>
113 <var_separator>,</var_separator>
117 <format>%.2f</format>
118 <node>/position/altitude-agl-ft</node>
123 <format>%.2f</format>
124 <node>/instrumentation/attitude-indicator/indicated-roll-deg</node>
129 <format>%.2f</format>
130 <node>/instrumentation/attitude-indicator/indicated-pitch-deg</node>
135 <format>%.2f</format>
136 <node>/instrumentation/attitude-indicator/horizon-offset-deg</node>
141 <format>%.4e</format>
142 <node>/instrumentation/attitude-indicator/spin</node>
148 =====================================================================