diff --git a/Docs/README.xmlhud b/Docs/README.xmlhud index b982687fb..5d17c4ae2 100644 --- a/Docs/README.xmlhud +++ b/Docs/README.xmlhud @@ -2,21 +2,21 @@ Users' Guide to FlightGear Hud configuration December 22 2000 Neetha Girish -This document describes the reconfigurable HUD of -FlightGear implemented through XML config files. +This document describes the reconfigurable HUD of +FlightGear implemented through XML config files. The present reconfigurable HUD code uses most of the code -of version 0.6.1 vintage and I have adapted the same to provide +of version 0.6.1 vintage and I have adapted the same to provide a reconfigurable HUD for fgfs. Corrections and additions are welcome. Some History: Older versions of FGFS had a hard coded display of HUD. -This was a less than ideal state of affairs when it came to +This was a less than ideal state of affairs when it came to using different aircraft Huds. I remember, somewhere in the 0.6.1 HUD code it was written that the HUD code is 'presently' hard coded but ideally should be moved into the aircraft configuration dataset, so that when you choose -an aircraft, its HUD loads. +an aircraft, its HUD loads. This implementation make that possible, all you have to do is to create appropriate 'my_aircraft.xml' files in the HUD directory and without re-compiling the code you could have 'your_aircraft' HUD, by choosing that @@ -30,32 +30,32 @@ climb/dive ladder, since they are all referenced to it. The rewrite of Hud display code was done using pre and post release v0.7.6 code allowing for configuration of the hud via XML. -The present Configurable Hud implements the entire functionality of +The present Configurable Hud implements the entire functionality of fgfs HUD (called default HUD) till this date. Using Default/Custom Hud: The default HUD location is $FG_ROOT/Huds/Default. $FG_ROOT is the place on your filesystem where you installed FG -data files. Alternate huds can be specified on the command line -or set as the default in the $HOME/.fgfsrc or $FG_ROOT/preferences.xml +data files. Alternate huds can be specified on the command line +or set as the default in the $HOME/.fgfsrc or $FG_ROOT/preferences.xml using a property specification. The command line format is as follows: --prop:/sim/hud/path=Huds/Default/default.xml The path description shown is relative to $FG_ROOT. An absolute -path may also be used for locations outside $FG_ROOT. +path may also be used for locations outside $FG_ROOT. For the custom Hud the path will be Huds/Custom/default.xml Hud - Implementation: -All of the hud configuration files are XML-encoded property lists. +All of the hud configuration files are XML-encoded property lists. The root element of each file is always named . Tags are always found in pairs, with the closing tag having a slash prefixing -the tag name, i.e . The top level panel configuration -file is composed of a and zero or more . -Instruments are used by including a <"unique_name"> and a to the +the tag name, i.e . The top level panel configuration +file is composed of a and zero or more . +Instruments are used by including a <"unique_name"> and a to the instruments configuration file. Comments are bracketed with . @@ -65,11 +65,11 @@ Comments are bracketed with . Default Aircraft Hud - + Huds/Instruments/Default/hudladder.xml - + Huds/Instruments/Default/hudcard.xml @@ -84,7 +84,7 @@ Comments are bracketed with . - + The default location for instrument files is $FG_ROOT/Huds/Instruments/Default. The location for custom instrument files is $FG_ROOT/Huds/Instruments/Custom. The location for minimal instrument files is $FG_ROOT/Huds/Instruments/Minimal. @@ -96,18 +96,18 @@ About Instrument Placement: For the sake of simplicity the FGFS HUD overlay is always 640 x 480 res. so all x/y values for instrument placement should fall within these bounds. Being an OpenGL program, 0,0 represents the lower left hand corner of the -screen. +screen. Instrument Implementation: -Instruments are defined in separate configuration files. +Instruments are defined in separate configuration files. The Instruments are basically classified into 4 types( Each of them an xml file) : The Hud Ladder, The Hud Card, -The Hud Label and +The Hud Label and The Turn Bank Indicator .... (Note that that the earlier HUD classes/objects have been retained) -Newer objects may be instantiated using the above classes, Unless a totally +Newer objects may be instantiated using the above classes, Unless a totally new object is required). The Default as well as the Custom directory have the same (in terms of properties) @@ -117,15 +117,15 @@ We have a Base class - Hud Instrument Item. We derive two more base classes - Instrument Scale and Dual Instrument Item from this. (This implementation owes its existence to all those who wrote the HUD code for 0.6.1) -The Hud Instrument Label is an instantiable class derived from Hud Instrument Item - for +The Hud Instrument Label is an instantiable class derived from Hud Instrument Item - for displaying alphanumeric labels (altitude, velocity, Mach no and/or anything else as long you have a call back function to pass the value using the property 'data_source'). -The Hud Card is an instantiable class derived from Instrument scale - for displaying -tapes and guages (single variable display, for displaying aoa, g's, vsi, elevator_posn, etc.). +The Hud Card is an instantiable class derived from Instrument scale - for displaying +tapes and gauges (single variable display, for displaying aoa, g's, vsi, elevator_posn, etc.). The Hud Ladder is an instantiable class derived from Dual Instrument Item - for displaying -pitch reference ladder or climb/dive ladder (two variable display, for dislaying two types of +pitch reference ladder or climb/dive ladder (two variable display, for displaying two types of ladders, the pitch reference ladder or the climb/dive ladder as defined by MIL-1787b). The fgTBI Instrument is an instantiable class derived from Dual Instrument scale again @@ -147,8 +147,8 @@ this defines the objects position centered about the centroid of above rectangle in HUD overlay plane (640x480) coordinates with 0,0 at bottom-left corner. One more, pixels per degree in the ladder class represents the compression factor of the -pitch ladder. In case of conformal HUD (climd/dive ladder) it is <640/horizontal_fov> -or <480/vertical_fov>. In case of pitch reference ladder it is +pitch ladder. In case of conformal HUD (climb/dive ladder) it is <640/horizontal_fov> +or <480/vertical_fov>. In case of pitch reference ladder it is . Example of Hud Ladder xml file. @@ -158,30 +158,30 @@ Example of Hud Ladder xml file. - Pitch Ladder - 260 - 150 - 120 - 180 - 2.68 - roll - pitch - 45.0 - 10.0 - 70 - 0 - false - true - false - false - false - false - false - false - 0.0 - true + Pitch Ladder + 260 + 150 + 120 + 180 + 2.68 + roll + pitch + 45.0 + 10.0 + 70 + 0 + false + true + false + false + false + false + false + false + 0.0 + false + false + true @@ -207,16 +207,16 @@ Example of Hud Card xml file. 430 200 28 - heading - 4 - 360.0 - 0.0 - 1.0 - 5 - 1 - 360 + heading + 4 + 360.0 + 0.0 + 1.0 + 5 + 1 + 360 25.0 - tape + tape false false true @@ -225,21 +225,21 @@ Example of Hud Card xml file. false false false - 0.0 + 0.0 true - fixed + fixed true - + Tape Options: -HUDS_AUTOTICKS = 0x0001 -HUDS_VERT = 0x0002 -HUDS_HORZ = 0x0000 +HUDS_AUTOTICKS = 0x0001 +HUDS_VERT = 0x0002 +HUDS_HORZ = 0x0000 HUDS_TOP = 0x0004 HUDS_BOTTOM = 0x0008 HUDS_LEFT = HUDS_TOP @@ -249,11 +249,11 @@ HUDS_NOTICKS = 0x0010 HUDS_ARITHTIC = 0x0020 HUDS_DECITICS = 0x0040 HUDS_NOTEXT = 0x0080 -HUDS_LEFT | HUDS_VERT = 0x0006 -HUDS_RIGHT | HUDS_VERT = 0x0010 -HUDS_TOP | HUDS_NOTEXT = 0x0084 -HUDS_BOTTOM | HUDS_NOTEXT = 0x0088 -HUDS_VERT | HUDS_LEFT | HUDS_NOTEXT = 0x0086 +HUDS_LEFT | HUDS_VERT = 0x0006 +HUDS_RIGHT | HUDS_VERT = 0x0010 +HUDS_TOP | HUDS_NOTEXT = 0x0084 +HUDS_BOTTOM | HUDS_NOTEXT = 0x0088 +HUDS_VERT | HUDS_LEFT | HUDS_NOTEXT = 0x0086 HUDS_RIGHT | HUDS_VERT | HUDS_NOTEXT = 0x0090 @@ -262,14 +262,14 @@ For clarity, I repeat, Ticks and Caps : 1. Left Tick ->|_____|<- Right Tick | - v + v Bottom Cap -2. Top Cap +2. Top Cap | v _____ - | | + | | 3. Top Tick @@ -277,33 +277,33 @@ For clarity, I repeat, Ticks and Caps : v --- | - |<- Right Cap + |<- Right Cap | --- | v Bottom Tick -4. --- - | - Left Cap -> | - | - --- - +4. --- + | + Left Cap -> | + | + --- + Marker Offset : -To Draw pointer on the scale markings. In the case of a our hud with offset 10.0 +To Draw pointer on the scale markings. In the case of a our hud with offset 10.0 The pointer is away from the scale and points at the markings. - -| - - -| - - <| -< - -| - - -| - + -| - + -| - + <| -< + -| - + -| - Marker offset = 0.0 Marker offset = 10.0 This should be useful when I implement the fixed tape/moving pointer. - + Example of a Label xml file. @@ -314,22 +314,22 @@ Example of a Label xml file. machno 25 - 130 + 130 40 30 - mach - %4.2f - blank + mach + %4.2f + blank NULL 1.0 - 4 - 2 - 0 + 4 + 2 + 0 true - false - false + false + false - + @@ -347,11 +347,11 @@ Example of a Turn Bank Indicator xml file. 45 60 10 - roll + roll sideslip - 45.0 + 45.0 5.0 - 5 + 5 true @@ -359,42 +359,43 @@ Example of a Turn Bank Indicator xml file. -I have still got to implement dials (as in MIL-STD-1787b). +I have still got to implement dials (as in MIL-STD-1787b). REMEMBER IF YOU NEED TO INDICATE ANY OTHER PARAMETER ON THE HUD OTHER THAN WHAT IS PROVIDED AS -CALLBACK FUNCTIONS (PROPERTY NAMES LISTED BELOW) YOU HAVE TO FIDDLE WITH THE CODE, AS YET. LET ME +CALLBACK FUNCTIONS (PROPERTY NAMES LISTED BELOW) YOU HAVE TO FIDDLE WITH THE CODE, AS YET. LET ME KNOW AND I SHALL INCLUDE THAT. -anzg -heading -aoa -climb -altitude -agl -speed -view_direction -aileronval -elevatorval -rudderval -throttleval -aux16 -aux17 -aux9 -aux11 -aux12 -aux10 -aux13 -aux14 -aux15 -aux8 -ax -mach -framerate -fov -vfc_tris_culled -vfc_tris_drawn -latitude -longitude +anzg +heading +aoa +climb +altitude +agl +speed +view_direction +aileronval +elevatorval +rudderval +throttleval +aux16 +aux17 +aux9 +aux11 +aux12 +aux10 +aux13 +aux14 +aux15 +aux8 +ax +mach +framerate +fov +vfc_tris_culled +vfc_tris_drawn +latitude +longitude + @@ -406,4 +407,3 @@ KNOW AND I SHALL INCLUDE THAT. -