• 热门标签

当前位置: 主页 > 航空资料 > 国外资料 >

时间:2010-08-14 08:46来源:蓝天飞行翻译 作者:admin
曝光台 注意防骗 网曝天猫店富美金盛家居专营店坑蒙拐骗欺诈消费者

Project Magenta Revision: 26-May-07
58
Various types of variables can be defined. Single bytes, word, double words and bits.
Syntax:
[offset] [length] [variable_name] [factor]
3102 1 fsBattery
// the variable fsBattery is defined by offset 0x3102 and is one byte long... the value can be 0 to 255
04F4 2 pm4F4
// this would be an example for a WORD (2 bytes)
0808 4 fsYawDamper
// this doe a DWORD (4 bytes)
5600 .0 APUMasterFault
// 0x5600 to 0x56FF are internally reserved for pmSystems variables in this case a bit 0 of 0x5600
// bits would be defined .0 .1 .2 ... .7 and would always be 8 maximum... thus no bit 11
// the values are of course 0 and 1
Section [constants]
This section is used to define constants that can be used in the [logics] section.
The syntax is simply [constant_name]=[value]
E.g.:
[constants]
APUEGTLimit=560
[logics]
if (APUEGT > APUEGTLimit)
____APUEGTLimitLight = 1
else
____APUEGTLimitLight = 0
endif
Or, of course:
[logics]
APUEGTLimitLight = (APUEGT > APUEGTLimit)
Section [elements]
pmSystems itself is not aircraft type-specific. All the graphics and buttons and switches are defined inside
the aircraft configuration files, with the exception of some very particular gauges.
Project Magenta Revision: 26-May-07
59
In development mode, you can press Ctrl-F and the element closest to the mouse pointer is highlighted in
the configuration file... a text editor will then pop up and show it to you.
section mySection
this is a section name that will later be used for bookmarking or fast access
colour 255 RedComponent, BlueComponent, GreenComponent
colour255 60,113,143
definition of a colour via Red/Green/Blue with values from 0 to 255 (thus white is 255, 255, 255)
(in addition to that, predefined values are there such as colNGnorm, col747 etc.)
white (or red, green, blue, black, orange etc.)
defines the current colour used for simple graphics elements and texts
text String, X, Y, [FontSize]
text hello world, 333, 23.6
will write "hello world" on the coordinates X=333 and Y=23.6
vtext hello world, 333, 23.6, 2, 2.2
will write "hello world" vertically on the coordinates X=333 and Y=23.6 (with corrected spacing of 2 vertical
and 2.2 central)... difficult to explain, just try it.
line X1, Y1, X2, Y2
line 10, 20, -44.5, 33
will draw a line from (10,20) to (-44,33)
moveto 10, 20
lineto -44.5, 33
lineto 44.5, 12
will draw a line from (10,20) to (-44,33) and then on to (44.5,12)
box X1, Y1, X2, Y2
box 10, 20, -44.5, 33
rect X1, Y1, X2, Y2
rect 10, 20, -44.5, 33
will draw a box (outline) or rectangle (filled) from (10,20) to (-44,33) ... the sequence of the coordinates is
irrelevant
panelbox X1, Y1, X2, Y2
panelbox -122.0,137.0,71.0,53.0
this will draw a box with a light 3D effect, used for overhead panels, they need a colour command before
them or the box will be transparent white.
multibutton UpperText, LowerText, X, Y, SizeFactor, Colour, Variable1, Variable2
multibutton ON@,OFF,107.4,-121.1,1.1,wo,Eng1Bleed,Eng1BleedFault
this will draw a "multibutton", i.e. a button with an upper and lower lighting display
the upper shows ON with a circle around it, OFF in the lower. X and Y
colours are o = orange, w = white, g = green, b = blue etc.
multibuttonupper
will have the button push activate the upper variable of the multibutton
Project Magenta Revision: 26-May-07
60
multibuttonlower
will have the button push activate the lower variable of the multibutton
textlightbox Text, X, Y, TextFactor, Colour, VariableName, XSize, YSize
textlightbox PRESS,-199.0,-87.8,.8,o,HydEng1Press,8,4
gauge Variable, X, Y, Radius, Max, DegreeStart, DegreeEng,
gauge [variable],[x],[y],[radius],[min],[max],[degreestart],[degreeend],[text],[displayvalue]
(more definitions to come)
Section [logics]
Here we do a lot of the background work that makes the elements change state. The language to describe
the logical connections between variables is similar to what you would expect in BASIC, and the boolean
commands should be easily accessible as well.
Equations:
variable_a = variable_b
variable_a = variable_b + variable_c
variable_a = (variable_b or variable_c) and variable_d
variable_a = variable_b <> variable_c
variable_a = (variable_b < variable_c) and variable_d
Time delayed equations: (sometimes things happen with a slight delay)...
variable_a = variable_b [2]
// this means that the value of variable_b is assigned to the value
// of variable_a 2 (two) seconds after variable_b changed
 
中国航空网 www.aero.cn
航空翻译 www.aviation.cn
本文链接地址:航空资料12(107)