| 1 | <HTML><HEAD><TITLE>Users Guide to FlightGear panel configuration</TITLE></HEAD> |
| 2 | <BODY> |
| 3 | <H1>Users Guide to FlightGear panel configuration</H1> |
| 4 | |
| 5 | <CITE> |
| 6 | Version 0.7.7.2, July 24 2001 |
| 7 | Author: John Check |
| 8 | </CITE> |
| 9 | |
| 10 | <ol> |
| 11 | <li><A HREF="#history">Some History</A></li> |
| 12 | <li><A HREF="#property_manager">About The Property Manager</A></li> |
| 13 | <li><A HREF="#xml">XML and The Property Manager</A></li> |
| 14 | <li><A HREF="#load_panel">Loading Panels</A></li> |
| 15 | <li><A HREF="#window_geometry">Regarding Window Geometry</A></li> |
| 16 | <li><A HREF="#panel_architecture">Panel Architecture</A></li> |
| 17 | <li><A HREF="#example_panel">Example Top Level Panel Config</A></li> |
| 18 | <li><A HREF="#indexed_properties">Indexed Properties</A></li> |
| 19 | <li><A HREF="#inclusion">Inclusion</A></li> |
| 20 | <li><A HREF="#instrument_architecture">Instrument Architecture</A></li> |
| 21 | <li><A HREF="#textures">Textures</A></li> |
| 22 | <li><A HREF="#instrument_layers">Instrument Layers</A></li> |
| 23 | <li><A HREF="#transformations">Transformations</a></li> |
| 24 | <li><A HREF="#conditions">Conditions</A></li> |
| 25 | <li><A HREF="#needle_placement">About Transformations and Needle Placement</A></li> |
| 26 | <li><A HREF="#interpolation">Interpolation Tables</A></li> |
| 27 | <li><A HREF="#actions">Actions</A></li> |
| 28 | <li><A HREF="#more_texture">More About Textures</A></li> |
| 29 | <li><A HREF="#generating_textures">Generating Textures</A></li> |
| 30 | <li><A HREF="#contribute">Contributing Panels</A></li> |
| 31 | <li><A HREF="#units">Units</A></li> |
| 32 | </ol> |
| 33 | |
| 34 | <P> |
| 35 | This document describes the configuration of |
| 36 | FlightGear flight simulator's aircraft panel display via XML. |
| 37 | The information was culled from the [email protected] |
| 38 | mailing list and my experiences making alternate panels. |
| 39 | Corrections and additions are encouraged. |
| 40 | </P> |
| 41 | |
| 42 | |
| 43 | |
| 44 | <HR WIDTH="20%"> |
| 45 | <H2><A NAME="history">Some History:</A></H2> |
| 46 | <HR WIDTH="20%"> |
| 47 | <p> |
| 48 | Older versions of FGFS had a hard coded display of instruments. |
| 49 | This was a less than ideal state of affairs due to FGFS ability |
| 50 | to use different aircraft models. Being primarily developed on |
| 51 | UNIX type systems, a modular approach is taken towards the |
| 52 | simulation. To date, most alternatives to the default |
| 53 | Cessna 172 aircraft are the product of research institutions |
| 54 | interested in the flight characteristics and not cosmetics. |
| 55 | The result of this was that one could fly the X-15 or a Boeing 747 |
| 56 | but be limited to C172 instrumentation. |
| 57 | </P> |
| 58 | <P> |
| 59 | A rewrite of the panel display code was done around v0.7.5 by |
| 60 | developer David Megginson allowing for configuration of the panel |
| 61 | via XML to address this limitation. Some major changes and additions |
| 62 | were made during the course of version 0.7.7 necessitating a rewrite |
| 63 | and expansion of this document. |
| 64 | </P> |
| 65 | |
| 66 | |
| 67 | <HR WIDTH="20%"> |
| 68 | <H2><A NAME="property_manager">About The Property Manager:</A></H2> |
| 69 | <HR WIDTH="20%"> |
| 70 | <p> |
| 71 | While intimate knowledge of the property manager is unnecessary to create |
| 72 | aircraft panels, some familiarity with the concept is required. |
| 73 | FlightGear provides a hierarchical representation of all aspects of |
| 74 | the state of the running simulation that is known as the property tree. |
| 75 | Some properties, such as velocities, are read only. Others such as the frequencies to which the navcom radios are tuned or the position of control surfaces |
| 76 | can be set by various means. |
| 77 | </P> |
| 78 | <P> |
| 79 | FlightGear can optionally provide an interface to these properties for external |
| 80 | applications such as Atlas, the moving map program, or even lowly telnet via |
| 81 | a network socket. Data can even be routed to a serial port and connected to |
| 82 | say, a GPS receiver. |
| 83 | Aside from its usefulness in a flight training context, being able to manipulate |
| 84 | the property tree on a running copy of FG allows for switching components on the fly, |
| 85 | a positive boon for panel authors. |
| 86 | To see the property tree start FG with the following command line: |
| 87 | </P> |
| 88 | |
| 89 | <PRE> |
| 90 | fgfs --props=socket,bi,5,localhost,5500,tcp |
| 91 | </PRE> |
| 92 | <br> |
| 93 | |
| 94 | <P> |
| 95 | Then use telnet to connect to localhost on port 5500. You can browse the |
| 96 | tree as you would a filesystem. |
| 97 | </P> |
| 98 | |
| 99 | <HR WIDTH="20%"> |
| 100 | <H2><A NAME="xml">XML And The Property Manager:</A></H2> |
| 101 | <HR WIDTH="20%"> |
| 102 | <p> |
| 103 | Panel instruments interface with the property tree to get/set values as |
| 104 | appropriate. Properties for which FG doesn't yet provide a value can be |
| 105 | created by simply making them up. Values can be adjusted using the telnet |
| 106 | interface allowing for creation and testing of instruments while code to |
| 107 | drive them is being developed. |
| 108 | </P> |
| 109 | <P> |
| 110 | If fact, the XML configuration system allows a user to combine |
| 111 | components such as flight data model, aircraft exterior model, |
| 112 | heads up display, and of course control panel. Furthermore, |
| 113 | such a preconfigured aircraft.xml can be included into a scenario |
| 114 | with specific flight conditions. These can be manually specified or |
| 115 | a FG session can be saved and/or edited and reloaded later. Options specified |
| 116 | in these files can be overridden on the command line. For example: |
| 117 | </P> |
| 118 | |
| 119 | <PRE> |
| 120 | --prop:/sim/panel/path=Aircraft/c172/Panels/c172-panel.xml |
| 121 | </PRE> |
| 122 | <br> |
| 123 | |
| 124 | <P> |
| 125 | passed as an option, would override a panel specified elsewhere. |
| 126 | Property tree options all have the same format, specify the node |
| 127 | and supply it a value. |
| 128 | </P> |
| 129 | <p> |
| 130 | The order of precedence for options is thus: |
| 131 | </p> |
| 132 | |
| 133 | <pre> |
| 134 | Source Location Format |
| 135 | ------ -------- ------ |
| 136 | command line |
| 137 | .fgfsrc ~/ command line options |
| 138 | system.fgfsrc $FG_ROOT "" "" |
| 139 | preferences.xml $FG_ROOT XML property list |
| 140 | </pre> |
| 141 | <br> |
| 142 | |
| 143 | |
| 144 | |
| 145 | <HR WIDTH="20%"> |
| 146 | <H2><A NAME="load_panel">Loading Panels on the fly:</A></H2> |
| 147 | <HR WIDTH="20%"> |
| 148 | <p> |
| 149 | When editing a panel configuration, pressing Shift +F3 will reload the |
| 150 | panel. If your changes don't seem to be taking effect, check the console output. |
| 151 | It will report the success or failure of the panel reload*. Editing textures requires |
| 152 | restarting FGFS so the new textures can be loaded. Panels can be switched on the fly |
| 153 | by setting the /sim/panel/path property value and reloading. |
| 154 | </P> |
| 155 | |
| 156 | |
| 157 | |
| 158 | <HR WIDTH="20%"> |
| 159 | <H2><A NAME="window_geometry">Regarding Window Geometry:</A></H2> |
| 160 | <HR WIDTH="20%"> |
| 161 | <p> |
| 162 | For the sake of simplicity the FGFS window is always considered to be 1024x768 |
| 163 | so all x/y values for instrument placement should relative to these dimensions. |
| 164 | Since FG uses OpenGL 0,0 represents the lower left hand corner of the |
| 165 | screen. Panels may have a virtual size larger than 1024x768. Vertical scrolling is accomplished |
| 166 | with Shift+F5/F6. Horizontal scrolling is via Shift+F7/F8. An offset should be supplied |
| 167 | to set the default visible area. It is possible to place items to overlap the 3D viewport. |
| 168 | </p> |
| 169 | |
| 170 | <HR WIDTH="20%"> |
| 171 | <H2><A NAME="panel_architecture">Panel Architecture:</A></H2> |
| 172 | <HR WIDTH="20%"> |
| 173 | <p> |
| 174 | All of the panel configuration files are XML-encoded* property lists. |
| 175 | The root element of each file is always named <PropertyList>. Tags are |
| 176 | almost always found in pairs, with the closing tag having a slash prefixing |
| 177 | the tag name, i.e </PropertyList>. The exception is the tag representing an aliased |
| 178 | property. In this case a slash is prepended to the closing angle bracket. |
| 179 | (see section Aliasing) |
| 180 | Properties must have units specified where appropriate. See section "Units" |
| 181 | at the end of this doc. |
| 182 | </P> |
| 183 | <P> |
| 184 | The top level panel configuration file is composed of a <name>, a <background> |
| 185 | texture and zero or more <instruments>. |
| 186 | </P> |
| 187 | <p> |
| 188 | [ Paths are relative to $FG_ROOT ( the installed location of FGFS data files ). ]<br> |
| 189 | [ Absolute paths may be used. Comments are bracketed with <!-- -->. ] |
| 190 | </p> |
| 191 | <HR WIDTH="20%"> |
| 192 | <H2><A NAME="example_panel">Example Top Level Panel Config:</A></H2> |
| 193 | <HR WIDTH="20%"> |
| 194 | <p> |
| 195 | <PRE> |
| 196 | <PropertyList> |
| 197 | <name>Example Panel</name> |
| 198 | <background>Aircraft/c172/Panels/Textures/panel-bg.rgb</background> |
| 199 | <w>1024</w> <!-- virtual width --> |
| 200 | <h>768</h> <!-- virtual height --> |
| 201 | <y-offset>-305</y-offset> <!-- hides the bottom part --> |
| 202 | <view-height>172</view-height> <!-- amount of overlap between 2D panel and 3D viewport --> |
| 203 | |
| 204 | <instruments> |
| 205 | |
| 206 | <instrument include="../Instruments/clock.xml"> |
| 207 | <name>Chronometer</name> <!-- currently optional but strongly recommended --> |
| 208 | <x>150</x> <!-- required horizontal placement --> |
| 209 | <y>645</y> <!-- required vertical placement --> |
| 210 | <w>72</w> <!-- optional width specification --> |
| 211 | <h>72</h> <!-- optional height specification --> |
| 212 | </instrument> |
| 213 | |
| 214 | </instruments> |
| 215 | |
| 216 | </PropertyList> |
| 217 | </PRE> |
| 218 | <BR> |
| 219 | |
| 220 | |
| 221 | <HR WIDTH="20%"> |
| 222 | <H2><A NAME="indexed_properties">Indexed Properties:</A></H2> |
| 223 | <HR WIDTH="20%"> |
| 224 | <p> |
| 225 | The property manager assigns incremental indices to repeated |
| 226 | properties with the same parent node, so that |
| 227 | </P> |
| 228 | <PRE> |
| 229 | <PropertyList> |
| 230 | <x>1</x> |
| 231 | <x>2</x> |
| 232 | <x>3</x> |
| 233 | </PropertyList> |
| 234 | </PRE><BR> |
| 235 | <p> |
| 236 | shows up as |
| 237 | </P> |
| 238 | <PRE> |
| 239 | /x[0] = 1 |
| 240 | /x[1] = 2 |
| 241 | /x[2] = 3 |
| 242 | </PRE><BR> |
| 243 | <p> |
| 244 | In fact, the panel I/O code insists that every instrument have the XML element |
| 245 | name "instrument", every layer have the name "layer", every text chunk have the |
| 246 | name |
| 247 | |
| 248 | "chunk", every action have the name "action", and every transformation |
| 249 | have the name "transformation" -- this makes the XML more regular (so |
| 250 | that it can be created in a DTD-driven tool) and also allows us to |
| 251 | include other kinds of information (such as doc strings) in the lists |
| 252 | without causing confusion. |
| 253 | </P> |
| 254 | |
| 255 | <HR WIDTH="20%"> |
| 256 | <H2><A NAME="inclusion">Inclusion:</A></H2> |
| 257 | <HR WIDTH="20%"> |
| 258 | <p> |
| 259 | Inclusion means that a node can include another property list as if it |
| 260 | were a part of the current file. |
| 261 | To clarify how inclusion works, consider the following examples: |
| 262 | </P> |
| 263 | <p> |
| 264 | If bar.xml contains |
| 265 | </P> |
| 266 | <PRE> |
| 267 | <PropertyList> |
| 268 | <a>1</a> |
| 269 | <b> |
| 270 | <c>2</c> |
| 271 | </b> |
| 272 | </PropertyList> |
| 273 | </PRE><BR> |
| 274 | <p> |
| 275 | then the declaration |
| 276 | </P> |
| 277 | <PRE> |
| 278 | <foo include="../bar.xml"> |
| 279 | </foo> |
| 280 | </PRE><br> |
| 281 | <p> |
| 282 | is exactly equivalent to |
| 283 | </P> |
| 284 | <PRE> |
| 285 | <foo> |
| 286 | <a>1</a> |
| 287 | <b> |
| 288 | <c>2</c> |
| 289 | </b> |
| 290 | </foo> |
| 291 | </PRE> |
| 292 | <br> |
| 293 | <p> |
| 294 | However, it is also possible to selectively override properties in the |
| 295 | included file. For example, if the declaration were |
| 296 | </p> |
| 297 | |
| 298 | <PRE> |
| 299 | <foo include="../bar.xml"> |
| 300 | <a>3</a> |
| 301 | </foo> |
| 302 | </PRE> |
| 303 | <BR> |
| 304 | <p> |
| 305 | then the property manager would see |
| 306 | </P> |
| 307 | <PRE> |
| 308 | <foo> |
| 309 | <a>3</a> |
| 310 | <b> |
| 311 | <c>2</c> |
| 312 | </b> |
| 313 | </foo> |
| 314 | </PRE> |
| 315 | <br> |
| 316 | <p> |
| 317 | with the original 'a' property's value replaced with 3. |
| 318 | </P> |
| 319 | <p> |
| 320 | Inclusion allows property files to be broken up and reused |
| 321 | arbitrarily -- for example, there might be separate texture cropping |
| 322 | property lists for commonly-used textures or layers, to avoid |
| 323 | repeating the information in each instrument file. |
| 324 | </P> |
| 325 | |
| 326 | |
| 327 | <HR WIDTH="20%"> |
| 328 | <H2><A NAME="aliasing">Aliasing:</A></H2> |
| 329 | <HR WIDTH="20%"> |
| 330 | <p> |
| 331 | Properties can alias other properties, similar to a symbolic link |
| 332 | in Unix. When the target property changes value, the new value will |
| 333 | show up in the aliased property as well. For example, |
| 334 | </p> |
| 335 | <PRE> |
| 336 | <PropertyList> |
| 337 | <foo>3</foo> |
| 338 | <bar alias="/foo"/> |
| 339 | </PropertyList> |
| 340 | </PRE> |
| 341 | <br> |
| 342 | <p> |
| 343 | will look the same to the application as |
| 344 | </p> |
| 345 | <PRE> |
| 346 | <PropertyList> |
| 347 | <foo>3</foo> |
| 348 | <bar>3</bar> |
| 349 | </PropertyList> |
| 350 | </PRE> |
| 351 | <br> |
| 352 | <p> |
| 353 | except that when foo changes value, bar will change too. |
| 354 | </p> |
| 355 | <p> |
| 356 | *IMPORTANT* |
| 357 | ----------- |
| 358 | The combination of inclusions and aliases is very powerful, because it |
| 359 | allows for parameterized property files. However, you must keep in |
| 360 | mind that when an instrument is included by reference, its root is |
| 361 | *not* the root of the property tree, therefore aliases must be relative. |
| 362 | The relative location of the alias' root in the property hierarchy depends |
| 363 | on whether the alias is used in a layer, a switch or an action. |
| 364 | In lieu of snappy mnemonic, please use the following table. |
| 365 | </p> |
| 366 | <pre> |
| 367 | when alias |
| 368 | is used in go up |
| 369 | --------- ----- |
| 370 | layer 5 ( ../../../../../params/foo ) |
| 371 | switch 3 ( ../../../params/foo ) |
| 372 | action 3 ( ../../../params/foo ) |
| 373 | </pre> |
| 374 | <br> |
| 375 | |
| 376 | <p> |
| 377 | As an example of inclusion and aliasing, consider the XML file |
| 378 | for the NAVCOM radio, which includes a parameter subtree at the start, |
| 379 | like this: |
| 380 | </p> |
| 381 | |
| 382 | <PRE> |
| 383 | <PropertyList> |
| 384 | <params> |
| 385 | <comm-freq-prop>/radios/comm1/frequencies/selected-mhz</comm-freq-prop> |
| 386 | <nav-freq-prop>/radios/nav1/frequencies/selected-mhz</nav-freq-prop> |
| 387 | </params> |
| 388 | |
| 389 | ... |
| 390 | |
| 391 | <chunk> |
| 392 | <type>number-value</type> |
| 393 | <property alias="../../../../../params/nav-freq-prop"/> |
| 394 | </chunk> |
| 395 | |
| 396 | ... |
| 397 | </PropertyList> |
| 398 | </PRE> |
| 399 | <br> |
| 400 | <P> |
| 401 | The same instrument file is used for navcomm1 and navcomm2 simply by |
| 402 | overriding the parameters at inclusion in the top level panel property list. |
| 403 | </P> |
| 404 | |
| 405 | <pre> |
| 406 | <instrument include="../Instruments/navcomm.xml"> |
| 407 | <name>NAVCOM 1 radio</name> |
| 408 | <params> |
| 409 | <comm-freq-prop>/radios/comm1/frequencies/selected-mhz</comm-freq-prop> |
| 410 | <nav-freq-prop>/radios/nav1/frequencies/selected-mhz</nav-freq-prop> |
| 411 | </params> |
| 412 | ..... |
| 413 | </instrument> |
| 414 | |
| 415 | <instrument include="../Instruments/navcomm.xml"> |
| 416 | <name>NAVCOM 2 radio</name> |
| 417 | <params> |
| 418 | <comm-freq-prop>/radios/comm2/frequencies/selected-mhz</comm-freq-prop> |
| 419 | <nav-freq-prop>/radios/nav2/frequencies/selected-mhz</nav-freq-prop> |
| 420 | </params> |
| 421 | ..... |
| 422 | </instrument> |
| 423 | </PRE> |
| 424 | <br> |
| 425 | |
| 426 | <HR WIDTH="20%"> |
| 427 | <H2><A NAME="instrument_architecture">Instrument Architecture:</A></H2> |
| 428 | <HR WIDTH="20%"> |
| 429 | |
| 430 | <p> |
| 431 | Instruments are defined in separate configuration files. An instrument |
| 432 | consists of a base width and height, one or more stacked layers, |
| 433 | and zero or more actions. Base dimensions are specified as follows: |
| 434 | </p> |
| 435 | <pre> |
| 436 | <PropertyList> <!-- remember, all xml files start like this --> |
| 437 | <name>Airspeed Indicator</name> <!-- names are good --> |
| 438 | <w-base>128</w-base> <!-- required width spec--> |
| 439 | <h-base>128</h-base> <!-- required height spec--> |
| 440 | <layers> <!-- begins layers section --> |
| 441 | </pre> |
| 442 | <br> |
| 443 | |
| 444 | <p> |
| 445 | Height and width can be overriden in the top level panel.xml by |
| 446 | specifying <w> and <h>. Transformations are caculated against the base size |
| 447 | regardless of the display size. This ensures that instruments remain calibrated. |
| 448 | </p> |
| 449 | |
| 450 | <HR WIDTH="20%"> |
| 451 | <H2><A NAME="textures">Textures:</A></H2> |
| 452 | <HR WIDTH="20%"> |
| 453 | <p> |
| 454 | FG uses red/green/blue/alpha .rgba files for textures. Dimensions for |
| 455 | texture files should be power of 2 with a maximum 8:1 aspect ratio. |
| 456 | The lowest common denominator for maximum texture size is 256 pixels. |
| 457 | This is due to the limitations of certain video accelerators, most notably |
| 458 | those with 3Dfx chipset such as the Voodoo2. |
| 459 | |
| 460 | </p> |
| 461 | |
| 462 | <HR WIDTH="20%"> |
| 463 | <H2><A NAME="instrument_layers">Instrument Layers**:</A></H2> |
| 464 | <HR WIDTH="20%"> |
| 465 | <p> |
| 466 | The simplest layer is a <texture>. These can be combined in <switch> layers |
| 467 | </p> |
| 468 | <p> |
| 469 | <texture> |
| 470 | A texture layer looks like this: |
| 471 | </p> |
| 472 | <pre> |
| 473 | <layer> <!-- creates a layer --> |
| 474 | <name>face</name> |
| 475 | <texture> <!-- defines it as a texture layer --> |
| 476 | <path>Aircraft/c172/Instruments/Textures/faces-2.rgb</path> |
| 477 | <x1>0</x1> <!-- lower boundary for texture cropping--> |
| 478 | <y1>0.51</y1> <!-- left boundary for texture cropping--> |
| 479 | <x2>0.49</x2> <!-- upper boundary for texture cropping--> |
| 480 | <y2>1.0</y2> <!-- right boundary for texture cropping--> |
| 481 | </texture> <!-- closing texure tag --> |
| 482 | </layer> <!-- closing layer tag --> |
| 483 | </pre> |
| 484 | <br> |
| 485 | <p> |
| 486 | The texture cropping specification is represented as a decimal. There is a table |
| 487 | at the end of this document for converting from pixel coordinates to percentages. |
| 488 | </p> |
| 489 | <p> |
| 490 | This particular layer, being a gauge face has no transformations applied to it. |
| 491 | Layers with that aren't static *must* include <w> and <h> parameters to be visible. |
| 492 | </p> |
| 493 | <p> |
| 494 | <type> May be either text or switch.. |
| 495 | </p> |
| 496 | <p> |
| 497 | <type>switch</type> |
| 498 | A switch layer is composed of two or more nested layers and will display |
| 499 | one of the nested layers based on a boolean property. For a simple example |
| 500 | of a switch see $FG_ROOT/Aircraft/c172/Instruments/brake.xml. |
| 501 | </p> |
| 502 | <pre> |
| 503 | <layer> |
| 504 | <name>Brake light</name> |
| 505 | <type>switch</type> <!-- define layer as a switch --> |
| 506 | <property>/controls/gear/brake-left</property> <!-- tie it to a property --> |
| 507 | <layer1> <!-- layer for true state --> |
| 508 | <name>on</name> <!-- label to make life easy --> |
| 509 | <texture> <!-- layer1 of switch is a texture layer --> |
| 510 | <path>Aircraft/c172/Instruments/Textures/brake.rgb</path> |
| 511 | <x1>0.25</x1> |
| 512 | <y1>0.0</y1> |
| 513 | <x2>0.5</x2> |
| 514 | <y2>0.095</y2> |
| 515 | </texture> |
| 516 | <w>64</w> <!-- required width - layer isn't static --> |
| 517 | <h>24</h> <!-- required height - layer isn't static --> |
| 518 | </layer1> <!-- close layer1 of switch --> |
| 519 | <layer2> <!-- layer for false state --> |
| 520 | <name>off</name> |
| 521 | <texture> |
| 522 | <path>Aircraft/c172/Instruments/Textures/brake.rgb</path> |
| 523 | <x1>0.0</x1> |
| 524 | <y1>0.0</y1> |
| 525 | <x2>0.25</x2> |
| 526 | <y2>0.095</y2> |
| 527 | </texture> |
| 528 | <w>64</w> |
| 529 | <h>24</h> |
| 530 | </layer2> |
| 531 | </layer> |
| 532 | </pre> |
| 533 | <br> |
| 534 | <p> |
| 535 | Switches can have more than 2 states. This requires nesting one switch inside another. |
| 536 | One could make, for example, a 3 color LED by nesting switch layers. |
| 537 | </p> |
| 538 | |
| 539 | <p> |
| 540 | <type>text</type> |
| 541 | A text layer may be static, as in a label, generated from a property or a combination of both. |
| 542 | This example is a switch that contains both static and dynamic text: |
| 543 | </p> |
| 544 | |
| 545 | <pre> |
| 546 | <layer1> <!-- switch layer --> |
| 547 | <name>display</name> |
| 548 | <type>text</type> <!-- type == text --> |
| 549 | <point-size>12</point-size> <!-- font size --> |
| 550 | <color> <!-- specify rgb values to color text --> |
| 551 | <red>1.0</red> |
| 552 | <green>0.5</green> |
| 553 | <blue>0.0</blue> |
| 554 | </color> <!-- close color section --> |
| 555 | <chunks> <!-- sections of text are referred to as chunks --> |
| 556 | <chunk> <!-- first chunk of text --> |
| 557 | <type>number-value</type> <!-- value defines it as dynamic --> |
| 558 | <property>/radios/nav1/dme/distance-nm</property> <!-- ties it to a property --> |
| 559 | <scale>0.00053995680</scale> <!-- convert between statute and nautical miles? --> |
| 560 | <format>%5.1f</format> <!-- define format --> |
| 561 | </chunk> |
| 562 | </chunks> |
| 563 | </layer1> |
| 564 | <layer2> <!-- switch layer --> |
| 565 | <name>display</name> |
| 566 | <type>text</type> <!-- type == text --> |
| 567 | <point-size>10</point-size> <!-- font size --> |
| 568 | <color> <!-- specify rgb values to color text --> |
| 569 | <red>1.0</red> |
| 570 | <green>0.5</green> |
| 571 | <blue>0.0</blue> |
| 572 | </color> <!-- close color section --> |
| 573 | <chunks> <!-- sections of text are referred to as chunks --> |
| 574 | <chunk> <!-- first chunk of text --> |
| 575 | <type>literal</type> <!-- static text --> |
| 576 | <text>---.--</text> <!-- fixed value --> |
| 577 | </chunk> |
| 578 | </chunks> |
| 579 | </layer2> |
| 580 | </pre> |
| 581 | <br> |
| 582 | Note that the value to be displayed can be modified using <scale> for multiplication, |
| 583 | <offset> for addition, and <truncate>true</truncate> for truncation. The order of |
| 584 | operation is always scale-offset-truncation, which may require you to adapt your formula. For instance, the |
| 585 | normal conversion from Fahrenheit to Celsius would be C = (F-32)*0.555555556. Because of the order |
| 586 | of operation above you must use the formula C = (F*0.55555556)-17.77777777. |
| 587 | <br> |
| 588 | |
| 589 | <HR WIDTH="20%"> |
| 590 | <H2><A NAME="conditions">Conditions:</A></H2> |
| 591 | <HR WIDTH="20%"> |
| 592 | |
| 593 | <p> |
| 594 | A condition may appear in a binding (for keyboard, joystick, or panel |
| 595 | action) or in most parts of a panel configuration file (specifically, |
| 596 | for an instrument, layer, transformation, text chunk, or action). If |
| 597 | a condition is present, it must succeed for the component to be used |
| 598 | (i.e. if the condition fails, the binding will not be fired, the layer |
| 599 | will not be drawn, etc.). Conditions are compiled to an efficient |
| 600 | internal form and load time. |
| 601 | </p> |
| 602 | <p> |
| 603 | For example, to ensure that a layer is drawn only if the /foo/bar |
| 604 | property has the value "active", you would do the following: |
| 605 | </p> |
| 606 | <pre> |
| 607 | <layer> |
| 608 | <name>FooBar Layer</name> |
| 609 | <condition> |
| 610 | <equals> |
| 611 | <property>/foo/bar</property> |
| 612 | <value>active</value> |
| 613 | </equals> |
| 614 | </condition> |
| 615 | ... |
| 616 | </layer> |
| 617 | </pre> |
| 618 | <p> |
| 619 | To draw a different layer when the /foo/bar property does not have the |
| 620 | value "active", you could follow with this: |
| 621 | </p> |
| 622 | <pre> |
| 623 | <layer> |
| 624 | <name>FooBar Layer</name> |
| 625 | <condition> |
| 626 | <not-equals> |
| 627 | <property>/foo/bar</property> |
| 628 | <value>active</value> |
| 629 | </not-equals> |
| 630 | </condition> |
| 631 | ... |
| 632 | </layer> |
| 633 | </pre> |
| 634 | <p> |
| 635 | While conditions were originally created for panel designers, they |
| 636 | have proven to be very useful for binding input devices (such |
| 637 | as the keyboard or joystick), since they effectively allow any key, |
| 638 | axis, button, or panel action to act as a modifier for any other key, |
| 639 | axis, button, or panel action, and in fact, allow mind-numbingly |
| 640 | complicated combinations for people who like them (i.e. Emacs users). |
| 641 | </p> |
| 642 | <pre> |
| 643 | <!-- make 'u' a modifier key --> |
| 644 | <!-- could also use property-toggle to make it a toggle modifier --> |
| 645 | <key n="117"> |
| 646 | <name>u</name> |
| 647 | <desc>Special 'u' modifier</desc> |
| 648 | |
| 649 | <binding> |
| 650 | <command>property-assign</command> |
| 651 | <property>/modifiers/u</property> |
| 652 | <value>1</value> |
| 653 | </binding> |
| 654 | |
| 655 | <mod-up> |
| 656 | <binding> |
| 657 | <command>property-assign</command> |
| 658 | <property>/modifiers/u</property> |
| 659 | <value>0</value> |
| 660 | </binding> |
| 661 | </mod-up> |
| 662 | |
| 663 | </key> |
| 664 | |
| 665 | <!-- take different actions based on the u modifier --> |
| 666 | <key n="118"> |
| 667 | <name>v</name> |
| 668 | |
| 669 | <binding> |
| 670 | <condition> |
| 671 | <property>/modifiers/u</property> |
| 672 | </condition> |
| 673 | <command>property-toggle</command> |
| 674 | <property>/foo/bar</property> |
| 675 | </binding> |
| 676 | |
| 677 | <binding> |
| 678 | <condition> |
| 679 | <not> |
| 680 | <property>/modifiers/u</property> |
| 681 | </not> |
| 682 | </condition> |
| 683 | <command>property-toggle</command> |
| 684 | <property>/bar/foo</property> |
| 685 | </binding> |
| 686 | |
| 687 | </key> |
| 688 | </pre> |
| 689 | <p> |
| 690 | The <condition> element acts as an implicit 'and' group for everything |
| 691 | contained in it. Here are the elements that can appear inside: |
| 692 | </p> |
| 693 | <pre> |
| 694 | <property>[name]</property> |
| 695 | |
| 696 | - true if the named property returns a true boolean value (i.e. a |
| 697 | non-0 numeric value) |
| 698 | |
| 699 | <and>[condition...]</and> |
| 700 | |
| 701 | - true if all of the conditions contained in it are true |
| 702 | |
| 703 | <or>[condition...]</or> |
| 704 | |
| 705 | - true if any of the conditions contained in it is true |
| 706 | |
| 707 | <not>[condition]</not> |
| 708 | |
| 709 | - true if the condition contained in it is false |
| 710 | |
| 711 | <less-than>...</less-than> |
| 712 | <less-than-equals>...</less-than-equals> |
| 713 | <equals>...</equals> |
| 714 | <not-equals>...</not-equals> |
| 715 | <greater-than>...</greater-than> |
| 716 | <greater-than-equals>...</greater-than-equals> |
| 717 | </pre> |
| 718 | <p> |
| 719 | - all of these take two child elements; the first, "property", is |
| 720 | the property to test; the second argument may be "property" or |
| 721 | "value". If it is also "property" (i.e. property[1]), the named |
| 722 | property's value will be used; otherwise, the literal value |
| 723 | provided will be used |
| 724 | - be warned that any string comparison other than equals/not-equals |
| 725 | is guaranteed to be flaky |
| 726 | </p> |
| 727 | |
| 728 | <HR WIDTH="20%"> |
| 729 | <H2><A NAME="transformations">Transformations:</A></H2> |
| 730 | <HR WIDTH="20%"> |
| 731 | <p> |
| 732 | A transformation is a rotation, an x-shift, or a y-shift. Transformations |
| 733 | can be static or they can be based on properties. Static rotations are |
| 734 | useful for flipping textures horizontally or vertically. Transformations |
| 735 | based on properties are useful for driving instrument needles. I.E. rotate the |
| 736 | number of degrees equal to the airspeed. X and y shifts are relative to the |
| 737 | center of the instrument. Each specified transformation type takes an <offset>.</p><p> |
| 738 | Offsets are relative to the center of the instrument. A shift without an offset |
| 739 | has no effect. For example, let's say we have a texture that is a circle. If we |
| 740 | use this texture in two layers, one defined as having a size of 128x128 and |
| 741 | the second layer is defined as 64x64 and neither is supplied a shift and offset |
| 742 | the net result appears as 2 concentric circles. |
| 743 | </p> |
| 744 | |
| 745 | <HR WIDTH="20%"> |
| 746 | <H2><A NAME="needle_placement">About Transformations and Needle Placement:</A></H2> |
| 747 | <HR WIDTH="20%"> |
| 748 | |
| 749 | <p> |
| 750 | When describing placement of instrument needles, a transformation offset must |
| 751 | be applied to shift the needles fulcrum or else the needle will rotate around it's |
| 752 | middle. The offset will be of <type> x-shift or y-shift depending on the orientation of |
| 753 | the needle section in the cropped texture. |
| 754 | </p> |
| 755 | |
| 756 | <p> |
| 757 | This example comes from the altimeter.xml |
| 758 | </p> |
| 759 | |
| 760 | <pre> |
| 761 | <layer> |
| 762 | <name>long needle (hundreds)</name> <!-- the altimeter has more than one needle --> |
| 763 | <texture> |
| 764 | <path>Aircraft/c172/Instruments/Textures/misc-1.rgb</path> |
| 765 | <x1>0.8</x1> |
| 766 | <y1>0.78125</y1> |
| 767 | <x2>0.8375</x2> |
| 768 | <y2>1.0</y2> |
| 769 | </texture> |
| 770 | <w>8</w> |
| 771 | <h>56</h> |
| 772 | <transformations> <!-- begin defining transformations --> |
| 773 | <transformation> <!-- start definition of transformation that drives the needle --> |
| 774 | <type>rotation</type> |
| 775 | <property>/steam/altitude-ft</property> <!-- bind it to a property --> |
| 776 | <max>100000.0</max> <!-- upper limit of instrument --> |
| 777 | <scale>0.36</scale> <!-- once around == 1000 ft --> |
| 778 | </transformation> <!-- close this transformation --> |
| 779 | <transformation> <!-- this one shifts the fulcrum of the needle --> |
| 780 | <type>y-shift</type> <!-- y-shift relative to needle --> |
| 781 | <offset>24.0</offset> <!-- amount of shift --> |
| 782 | </transformation> |
| 783 | </transformations> |
| 784 | </layer> |
| 785 | </pre> |
| 786 | <br> |
| 787 | |
| 788 | <p> |
| 789 | This needles has its origin in the center of the instrument. If the needles fulcrum was |
| 790 | towards the edge of the instrument, the transformations to place the pivot point must |
| 791 | precede those which drive the needle, |
| 792 | </p> |
| 793 | |
| 794 | <HR WIDTH="20%"> |
| 795 | <H2><A NAME="interpolation">Interpolation Tables:</A></H2> |
| 796 | <HR WIDTH="20%"> |
| 797 | |
| 798 | <p> |
| 799 | Non linear transformations are now possible via the use of interpolation tables. |
| 800 | </p> |
| 801 | |
| 802 | <pre> |
| 803 | <transformation> |
| 804 | ... |
| 805 | <interpolation> |
| 806 | <entry> |
| 807 | <ind>0.0</ind> <!-- raw value --> |
| 808 | <dep>0.0</dep> <!-- displayed value --> |
| 809 | </entry> |
| 810 | <entry> |
| 811 | <ind>10.0</ind> |
| 812 | <dep>100.0</dep> |
| 813 | </entry> |
| 814 | <entry> |
| 815 | <ind>20.0</ind> |
| 816 | <dep>-5.0</dep> |
| 817 | </entry> |
| 818 | <entry> |
| 819 | <ind>30.0</ind> |
| 820 | <dep>1000.0</dep> |
| 821 | </entry> |
| 822 | </interpolation> |
| 823 | </transformation> |
| 824 | </pre> |
| 825 | <br> |
| 826 | |
| 827 | <p> |
| 828 | Of course, interpolation tables are useful for non-linear stuff, as in |
| 829 | the above example, but I kind-of like the idea of using them for |
| 830 | pretty much everything, including non-trivial linear movement -- many |
| 831 | instrument markings aren't evenly spaced, and the interpolation tables |
| 832 | are much nicer than the older min/max/scale/offset stuff and should |
| 833 | allow for a more realistic panel without adding a full equation parser |
| 834 | to the property manager. |
| 835 | </p> |
| 836 | <p> |
| 837 | If you want to try this out, look at the airspeed.xml file in the base |
| 838 | package, and uncomment the interpolation table in it for a |
| 839 | very funky, non-linear and totally unreliable airspeed indicator. |
| 840 | </p> |
| 841 | |
| 842 | <HR WIDTH="20%"> |
| 843 | <H2><A NAME="actions">Actions:</A></H2> |
| 844 | <HR WIDTH="20%"> |
| 845 | |
| 846 | <p> |
| 847 | An action is a hotspot on an instrument where something will happen |
| 848 | when the user clicks the left or center mouse button. Actions are |
| 849 | always tied to properties: they can toggle a boolean property, adjust |
| 850 | the value of a numeric property, or swap the values of two properties. |
| 851 | The x/y placement for actions specifies the origin of the lower left corner. |
| 852 | In the following example the first action sets up a hotspot 32 pixels wide |
| 853 | and 16 pixels high. It lower left corner is placed 96 pixels (relative to the |
| 854 | defined base size of the instrument) to the right of the center of the |
| 855 | instrument. It is also 32 pixels below the centerline of the instrument. |
| 856 | The actual knob texture over which the action is superimposed is 32x32. |
| 857 | Omitted here is a second action, bound to the same property, with a positive |
| 858 | increment value. This second action is placed to cover the other half of the |
| 859 | knob. The result is that clicking on the left half of the knob texture decreases |
| 860 | the value and clicking the right half increases the value. Also omitted here |
| 861 | is a second pair of actions with the same coordinates but a larger increment |
| 862 | value. This second pair is bound to a different mouse button. The net result |
| 863 | is that we have both fine and coarse adjustments in the same hotspot, each |
| 864 | bound to a different mouse button. |
| 865 | </p> |
| 866 | |
| 867 | <p> |
| 868 | These examples come from the radio stack: |
| 869 | </p> |
| 870 | |
| 871 | <pre> |
| 872 | <actions> <!-- open the actions section --> |
| 873 | <action> <!- first action --> |
| 874 | <name>small nav frequency decrease</name> |
| 875 | <type>adjust</type> |
| 876 | <button>0</button> <!-- bind it to a mouse button --> |
| 877 | <x>96</x> <!-- placement relative to instrument center --> |
| 878 | <y>-32</y> |
| 879 | <w>16</w> <!-- size of hotspot --> |
| 880 | <h>32</h> |
| 881 | <property>/radios/nav1/frequencies/standby-mhz</property> <!-- bind to a property --> |
| 882 | <increment>-0.05</increment> <!-- amount of adjustment per mouse click --> |
| 883 | <min>108.0</min> <!-- lower range --> |
| 884 | <max>117.95</max> <!-- upper range --> |
| 885 | <wrap>1</wrap> <!-- boolean value -- value wraps around when it hits bounds --> |
| 886 | </action> |
| 887 | <action> |
| 888 | <name>swap nav frequencies</name> |
| 889 | <type>swap</type> <!-- define type of action --> |
| 890 | <button>0</button> |
| 891 | <x>48</x> |
| 892 | <y>-32</y> |
| 893 | <w>32</w> |
| 894 | <h>32</h> |
| 895 | <property1>/radios/nav1/frequencies/selected-mhz</property1> <!-- properties to toggle between --> |
| 896 | <property2>/radios/nav1/frequencies/standby-mhz</property2> |
| 897 | </action> |
| 898 | <action> |
| 899 | <name>ident volume on/off</name> |
| 900 | <type>adjust</type> |
| 901 | <button>1</button> |
| 902 | <x>40</x> |
| 903 | <y>-24</y> |
| 904 | <w>16</w> |
| 905 | <h>16</h> |
| 906 | <property>/radios/nav1/ident</property> <!-- this property is for Morse code identification of nav beacons --> |
| 907 | <increment>1.0</increment> <!-- the increment equals the max value so this toggles on/off --> |
| 908 | <min>0</min> |
| 909 | <max>1</max> |
| 910 | <wrap>1</wrap> <!-- a shortcut to avoid having separate actions for on/off --> |
| 911 | </action> |
| 912 | </actions> |
| 913 | </pre> |
| 914 | <br> |
| 915 | |
| 916 | <HR WIDTH="20%"> |
| 917 | <H2><A NAME="more_texture">More About Textures:</A></H2> |
| 918 | <HR WIDTH="20%"> |
| 919 | |
| 920 | <p> |
| 921 | As previously stated, the usual size instrument texture files in FGFS are 256x256 |
| 922 | pixels, red/green/blue/alpha format. However the mechanism for specifying |
| 923 | texture cropping coordinates is decimal in nature. When calling a section |
| 924 | of a texture file the 0,0 lower left convention is used. |
| 925 | There is a pair of x/y coordinates defining which section of the texture |
| 926 | to use. |
| 927 | </p> |
| 928 | <p> |
| 929 | The following table can be used to calculate texture cropping specifications. |
| 930 | </p> |
| 931 | <pre> |
| 932 | # of divisions | width in pixels | decimal specification |
| 933 | per axis |
| 934 | 1 = 256 pixels 1 |
| 935 | 2 = 128 pixels, 0.5 |
| 936 | 4 = 64 pixels, 0.25 |
| 937 | 8 = 32 pixels, 0.125 |
| 938 | 16 = 16 pixels, 0.0625 |
| 939 | 32 = 8 pixels, 0.03125 |
| 940 | 64 = 4 pixels, 0.015625 |
| 941 | 128 = 2 pixels, 0.0078125 |
| 942 | 256 = 1 pixel, 0.00390625 |
| 943 | </pre> |
| 944 | <br> |
| 945 | |
| 946 | <p> |
| 947 | The displayed size of a texture in pixels is set in the instrument |
| 948 | configuration file. The size of the cropped area in pixels is not |
| 949 | directly related to the final display size. |
| 950 | </p> |
| 951 | <p> |
| 952 | What that table represents is: |
| 953 | </p> |
| 954 | <p> |
| 955 | 1 / (256 / # of pixels) |
| 956 | </p> |
| 957 | <p> |
| 958 | Take as an example, a section 64 pixels wide on the texture file. |
| 959 | 256/64 = 4 |
| 960 | 1/4 = 0.25 |
| 961 | </p> |
| 962 | <p> |
| 963 | Or lets consider 1 pixel wide |
| 964 | 256/1 = 256 |
| 965 | 1/256 = 0.00390625 |
| 966 | </p> |
| 967 | <p> |
| 968 | If the section starts at the extreme left of the texture, the |
| 969 | starting number is 0.0 and the end is 0.25 |
| 970 | If the section *doesn't* start at the edge you need to take the starting |
| 971 | pixel and calculate an offset. Lets say you start 2 pixels from the |
| 972 | edge and you are cropping a section 64 pixels wide... |
| 973 | </p> |
| 974 | |
| 975 | <pre> |
| 976 | 256/2 = 128 |
| 977 | 1/128 = 0.0078125 <- this is the value for a 2 pixel wide offset |
| 978 | |
| 979 | |
| 980 | 0.0078125 <- start at |
| 981 | 0.25 <- add value for 64 px wide |
| 982 | 0.2571825 <- end at |
| 983 | </pre> |
| 984 | <br> |
| 985 | |
| 986 | <HR WIDTH="20%"> |
| 987 | <H2><A NAME="generating_textures">Generating Textures:</A></H2> |
| 988 | <HR WIDTH="20%"> |
| 989 | |
| 990 | <p> |
| 991 | A common procedure for generating gauge faces is to use a |
| 992 | vector graphics package such as xfig, exporting the result as a |
| 993 | postscript file. 3D modeling tools may also be used and I prefer them |
| 994 | for pretty items such as levers, switches, bezels and so forth. |
| 995 | Ideally, the size of the item in the final render |
| 996 | should be of proportions that fit into the recommended pixel widths. |
| 997 | The resulting files can be imported into a graphics manipulation |
| 998 | package such as GIMP, et al for final processing. |
| 999 | </P> |
| 1000 | |
| 1001 | <HR WIDTH="20%"> |
| 1002 | <H2><A NAME="contribute">Contributing Panels And Instruments</A></H2> |
| 1003 | <HR WIDTH="20%"> |
| 1004 | |
| 1005 | <p> |
| 1006 | There are two main considerations when contributing panels and instruments. |
| 1007 | Firstly, original artwork is a major plus since you as the creator can dictate the terms |
| 1008 | of distribution. All Artwork must have a license compatible with the GPL. |
| 1009 | Artwork of unverifiable origin is not acceptable. |
| 1010 | Secondly, texture sizes must meet the lowest common denominator of 256e2 pixels. |
| 1011 | Artwork from third parties may be acceptable if it meets these criteria. |
| 1012 | </p> |
| 1013 | |
| 1014 | <HR WIDTH="20%"> |
| 1015 | <H2><A NAME="units">UNITS:</A></H2> |
| 1016 | <HR WIDTH="20%"> |
| 1017 | <p> |
| 1018 | Here is a list of property names including appropriate units: |
| 1019 | </p> |
| 1020 | |
| 1021 | <PRE> |
| 1022 | /autopilot/locks/nav1 => /autopilot/locks/nav[0] |
| 1023 | /autopilot/settings/altitude += "-ft" |
| 1024 | /autopilot/settings/climb-rate += "-fpm" |
| 1025 | /autopilot/settings/heading-bug += "-deg" |
| 1026 | /consumables/fuel/tank1/level => /consumables/fuel/tank[0]/level-gal_us |
| 1027 | /consumables/fuel/tank2/level => /consumables/fuel/tank[1]/level-gal_us |
| 1028 | /engines/engine0/cht => /engines/engine[0]/cht-degf |
| 1029 | /engines/engine0/egt => /engines/engine[0]/egt-degf |
| 1030 | /engines/engine0/fuel-flow => /engines/engine[0]/fuel-flow-gph |
| 1031 | /engines/engine0/mp => /engines/engine[0]/mp-osi |
| 1032 | /engines/engine0/rpm => /engines/engine[0]/rpm |
| 1033 | /environment/clouds/altitude += "-ft" |
| 1034 | /environment/magnetic-dip += "-deg" |
| 1035 | /environment/magnetic-variation += "-deg" |
| 1036 | /environment/visibility += "-m" |
| 1037 | /environment/wind-down += "-fps" |
| 1038 | /environment/wind-east += "-fps" |
| 1039 | /environment/wind-north += "-fps" |
| 1040 | /orientation/heading += "-deg" |
| 1041 | /orientation/heading-magnetic += "-deg" |
| 1042 | /orientation/pitch += "-deg" |
| 1043 | /orientation/roll += "-deg" |
| 1044 | /position/altitude += "-ft" |
| 1045 | /position/altitude-agl += "-ft" |
| 1046 | /position/latitude += "-deg" |
| 1047 | /position/longitude += "-deg" |
| 1048 | /radios/adf/frequencies/selected += "-khz" |
| 1049 | /radios/adf/frequencies/standby += "-khz" |
| 1050 | /radios/adf/rotation += "-deg" |
| 1051 | /radios/nav1/* => /radios/nav[0]/* |
| 1052 | /radios/nav2/* => /radios/nav[1]/* |
| 1053 | /radios/nav[*]/dme/distance += "-nm" |
| 1054 | /radios/nav[*]/frequencies/selected += "-mhz" |
| 1055 | /radios/nav[*]/frequencies/standby += "-mhz" |
| 1056 | /radios/nav[*]/radials/actual += "-deg" |
| 1057 | /radios/nav[*]/radials/selected += "-deg" |
| 1058 | /sim/model/h-rotation => /sim/model/heading-offset-deg |
| 1059 | /sim/model/p-rotation => /sim/model/roll-offset-deg |
| 1060 | /sim/model/r-rotation => /sim/model/pitch-offset-deg |
| 1061 | /sim/model/x-offset += "-m" |
| 1062 | /sim/model/y-offset += "-m" |
| 1063 | /sim/model/z-offset += "-m" |
| 1064 | /sim/view/goal-offset += "-deg" |
| 1065 | /sim/view/offset += "-deg" |
| 1066 | /steam/adf += "-deg" |
| 1067 | /steam/airspeed += "-kt" |
| 1068 | /steam/altitude += "-ft" |
| 1069 | /steam/gyro-compass += "-deg" |
| 1070 | /steam/gyro-compass-error += "-deg" |
| 1071 | /steam/mag-compass += "-deg" |
| 1072 | /steam/vertical-speed += "-fpm" |
| 1073 | /velocities/airspeed += "-kt" |
| 1074 | /velocities/side-slip += "-rad" |
| 1075 | /velocities/speed-down += "-fps" |
| 1076 | /velocities/speed-east += "-fps" |
| 1077 | /velocities/speed-north += "-fps" |
| 1078 | /velocities/uBody += "-fps" |
| 1079 | /velocities/vBody += "-fps" |
| 1080 | /velocities/wBody += "-fps" |
| 1081 | /velocities/vertical-speed += "-fps" |
| 1082 | </pre> |
| 1083 | <br> |
| 1084 | <p> |
| 1085 | * If there are *any* XML parsing errors, the panel will fail to load, |
| 1086 | so it's worth downloading a parser like Expat (http://www.jclark.com/xml/) |
| 1087 | for checking your XML. FlightGear will print the location of errors, but |
| 1088 | the messages are a little cryptic right now. |
| 1089 | </P> |
| 1090 | <p> |
| 1091 | ** NOTE: There is one built-in layer -- for the mag compass ribbon -- |
| 1092 | and all other layers are defined in the XML files. In the future, |
| 1093 | there may also be built-in layers for special things like a |
| 1094 | weather-radar display or a GPS (though the GPS could be handled with |
| 1095 | text properties). |
| 1096 | </p> |
| 1097 | </BODY> |
| 1098 | </HTML> |