Debian Codegraph @

utils/fgpanel/README

raw
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.
6
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.
12
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.
17
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.
21
22 =====================================================================
23 Usage
24 start fgpanel with
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
29 your aircraft, e.g.
30 - Aircraft/MyAircraft/Panels/*
31 - Aircraft/Instruments/* (if referenced)
32
33 -panel shall point to a panel-configuration file, relative to FGDATA
34
35 start flightgear with
36 fgfs --generic=socket,out,10,239.24.10.64,5432,udp,../Aircraft/MyAircraft/Panels/SampleProtocol
37
38 =====================================================================
39 Sample:
40
41 Create the sample files within your aicraft directory, preferrable under Panels
42 MyPanel.xml
43 sample-2d-panel.xml
44 SampleProtocol.xml
45
46 =====================================================================
47 Sample panel configuration file (MyPanel.xml)
48 <PropertyList>
49
50 <!-- true: run full-screen, false; run in window -->
51 <game-mode type="bool">false</game-mode>
52
53 <!-- include the panel definitions (2d-panel syntax)-->
54 <panel include="sample-2d-panel.xml"/>
55
56 <!-- compose your property-tree here -->
57 <sim>
58 <panel>
59 <flip-x type="bool">false</flip-x>
60 </panel>
61 <instrument-options>
62 <omit-knobs type="bool">true</omit-knobs>
63 </instrument-options>
64 </sim>
65
66 <!-- network communication settings -->
67 <communication>
68 <listen>
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!) -->
74 </listen>
75
76 <!-- the generic protocol definition
77 same as used for fgfs --generic=foobar option
78 -->
79 <protocol include="SampleProtocol.xml"/>
80 </communication>
81 </PropertyList>
82
83 =====================================================================
84 Sampe 2d-panel configuration file sample-2d-panel.xml
85 To be included from the panel configuration file
86
87 <?xml version="1.0"?>
88 <PropertyList>
89 <name>Sample Instrument Panel</name>
90 <w>375</w> <!-- screen width: 375mm -->
91 <h>305</h> <!-- screen height: 305mm -->
92 <instruments>
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"/>
98 <w>80</w>
99 <h>80</h>
100 </instrument>
101 </instruments>
102 </PropertyList>
103
104 =====================================================================
105 Sample protocol configuration file to drive the AI (SampleProtocol.xml)
106 <?xml version="1.0"?>
107
108 <PropertyList>
109 <generic>
110
111 <output>
112 <line_separator>newline</line_separator>
113 <var_separator>,</var_separator>
114
115 <chunk>
116 <type>float</type>
117 <format>%.2f</format>
118 <node>/position/altitude-agl-ft</node>
119 </chunk>
120
121 <chunk>
122 <type>float</type>
123 <format>%.2f</format>
124 <node>/instrumentation/attitude-indicator/indicated-roll-deg</node>
125 </chunk>
126
127 <chunk>
128 <type>float</type>
129 <format>%.2f</format>
130 <node>/instrumentation/attitude-indicator/indicated-pitch-deg</node>
131 </chunk>
132
133 <chunk>
134 <type>float</type>
135 <format>%.2f</format>
136 <node>/instrumentation/attitude-indicator/horizon-offset-deg</node>
137 </chunk>
138
139 <chunk>
140 <type>float</type>
141 <format>%.4e</format>
142 <node>/instrumentation/attitude-indicator/spin</node>
143 </chunk>
144 </output>
145 </generic>
146 </PropertyList>
147
148 =====================================================================