Merge branch 'master' of git://gitorious.org/fg/fgdata
|
@ -4,7 +4,7 @@
|
|||
<sim>
|
||||
<model>
|
||||
<logo>
|
||||
<name type="string">Yin and Yan</name>
|
||||
<name type="string">Yin and Yang</name>
|
||||
<texture>../../Generic/Logos/yinyan.png</texture>
|
||||
</logo>
|
||||
</model>
|
||||
|
|
|
@ -107,6 +107,7 @@ var active_walker = func {
|
|||
var Walker = {
|
||||
new : func (view_name, constraints = nil, managers = nil) {
|
||||
var obj = { parents : [Walker] };
|
||||
obj.view_name = view_name;
|
||||
obj.view = view.views[view.indexof(view_name)];
|
||||
obj.constraints = constraints;
|
||||
obj.managers = managers;
|
||||
|
@ -180,17 +181,26 @@ var Walker = {
|
|||
var cur = props.globals.getNode("/sim/current-view");
|
||||
me.heading = cur.getNode("heading-offset-deg").getValue();
|
||||
|
||||
me.position[0] -=
|
||||
me.speed_fwd * dt * math.cos(me.heading * TO_RAD) +
|
||||
me.speed_side * dt * math.sin(me.heading * TO_RAD);
|
||||
me.position[1] -=
|
||||
me.speed_fwd * dt * math.sin(me.heading * TO_RAD) -
|
||||
me.speed_side * dt * math.cos(me.heading * TO_RAD);
|
||||
var new_pos =
|
||||
[me.position[0] -
|
||||
(me.speed_fwd * dt * math.cos(me.heading * TO_RAD) +
|
||||
me.speed_side * dt * math.sin(me.heading * TO_RAD)),
|
||||
me.position[1] -
|
||||
(me.speed_fwd * dt * math.sin(me.heading * TO_RAD) -
|
||||
me.speed_side * dt * math.cos(me.heading * TO_RAD)),
|
||||
me.position[2]];
|
||||
|
||||
var cur_height = me.position[2];
|
||||
if (me.constraints != nil) {
|
||||
me.position = me.constraints.constrain(me.position);
|
||||
me.goal_height = me.position[2] + me.eye_height;
|
||||
new_pos = me.constraints.constrain(new_pos);
|
||||
if (new_pos == NO_POS) {
|
||||
printlog("warn",
|
||||
"WalkView: Constraint for " ~ me.view_name ~
|
||||
" returned NO_POS.");
|
||||
} else {
|
||||
me.position = new_pos;
|
||||
me.goal_height = me.position[2] + me.eye_height;
|
||||
}
|
||||
}
|
||||
# Change the view height smoothly
|
||||
if (math.abs(me.goal_height - cur_height) > 2.0 * dt) {
|
||||
|
@ -399,6 +409,27 @@ var ActionConstraint = {
|
|||
}
|
||||
};
|
||||
|
||||
# Conditional constraint
|
||||
# The area is only available when the predicate function returns true.
|
||||
# constraint - the area in question : constraint
|
||||
# predicate() - boolean function that determines if the area is available.
|
||||
var ConditionalConstraint = {
|
||||
new : func (constraint, predicate = nil) {
|
||||
var obj = { parents : [ConditionalConstraint] };
|
||||
obj.constraint = constraint;
|
||||
obj.predicate = predicate;
|
||||
return obj;
|
||||
},
|
||||
constrain : func (pos) {
|
||||
if (me.predicate == nil or me.predicate()) {
|
||||
return me.constraint.constrain(pos);
|
||||
} else {
|
||||
return NO_POS;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
###############################################################################
|
||||
# Manager classes.
|
||||
|
||||
|
@ -443,6 +474,8 @@ var JSBSimPointmass = {
|
|||
var TO_RAD = math.pi/180;
|
||||
var TO_DEG = 180/math.pi;
|
||||
|
||||
var NO_POS = [-9999.0, -9999.0, -9999.0];
|
||||
|
||||
var walkers = {};
|
||||
|
||||
var closerXY = func (pos, p1, p2) {
|
||||
|
|
|
@ -1,243 +1,243 @@
|
|||
AC3Db
|
||||
MATERIAL "ac3dmat1" rgb 1 1 1 amb 0.2 0.2 0.2 emis 0 0 0 spec 0 0 0 shi 10 trans 0
|
||||
MATERIAL "ac3dmat14" rgb 0.8 0.8 0.8 amb 0.2 0.2 0.2 emis 0 0 0 spec 0 0 0 shi 10 trans 0
|
||||
MATERIAL "WhiteLightOff" rgb 1 1 1 amb 1 1 1 emis 0 0 0 spec 0 0 0 shi 72 trans 0
|
||||
OBJECT world
|
||||
kids 3
|
||||
OBJECT poly
|
||||
name "rect"
|
||||
loc 0 -0.0136416 0.00484141
|
||||
texture "flaps.rgb"
|
||||
crease 45.000000
|
||||
numvert 4
|
||||
0 -0.0403456 -0.0189484
|
||||
0 -0.0403456 0.0400651
|
||||
0 0.066308 0.0400651
|
||||
0 0.066308 -0.0189484
|
||||
numsurf 1
|
||||
SURF 0x20
|
||||
mat 0
|
||||
refs 4
|
||||
3 1 1
|
||||
2 0 1
|
||||
1 0 0
|
||||
0 1 0
|
||||
kids 0
|
||||
OBJECT poly
|
||||
name "FlapPos"
|
||||
loc -0.00118963 0.0362646 0.0251696
|
||||
crease 45.000000
|
||||
numvert 16
|
||||
0.00443064 0.000999995 -0.00400197
|
||||
0.00802631 0.000999995 -0.00400197
|
||||
0.00802631 0.000999995 0.00400197
|
||||
0.00443064 0.000999995 0.00400197
|
||||
0.00443064 -0.000999998 0.00400197
|
||||
0.00802631 -0.000999998 0.00400197
|
||||
0.00802631 -0.000999998 -0.00400197
|
||||
0.00443064 -0.000999998 -0.00400197
|
||||
-0.00802631 0.000999998 -0.00122597
|
||||
0.00481799 0.000999998 -0.00122597
|
||||
0.00481799 0.000999998 0.00148963
|
||||
-0.00802631 0.000999998 0.00148963
|
||||
-0.00802631 -0.000999995 0.00148963
|
||||
0.00481799 -0.000999995 0.00148963
|
||||
0.00481799 -0.000999995 -0.00122597
|
||||
-0.00802631 -0.000999995 -0.00122597
|
||||
numsurf 12
|
||||
SURF 0x30
|
||||
mat 2
|
||||
refs 4
|
||||
7 0 0
|
||||
6 1 0
|
||||
5 1 1
|
||||
4 0 1
|
||||
SURF 0x30
|
||||
mat 2
|
||||
refs 4
|
||||
0 0 0
|
||||
3 1 0
|
||||
2 1 1
|
||||
1 0 1
|
||||
SURF 0x30
|
||||
mat 2
|
||||
refs 4
|
||||
3 0 0
|
||||
4 1 0
|
||||
5 1 1
|
||||
2 0 1
|
||||
SURF 0x30
|
||||
mat 2
|
||||
refs 4
|
||||
1 0 0
|
||||
6 1 0
|
||||
7 1 1
|
||||
0 0 1
|
||||
SURF 0x30
|
||||
mat 2
|
||||
refs 4
|
||||
0 0 0
|
||||
7 1 0
|
||||
4 1 1
|
||||
3 0 1
|
||||
SURF 0x30
|
||||
mat 2
|
||||
refs 4
|
||||
2 0 0
|
||||
5 1 0
|
||||
6 1 1
|
||||
1 0 1
|
||||
SURF 0x30
|
||||
mat 2
|
||||
refs 4
|
||||
15 0 0
|
||||
14 1 0
|
||||
13 1 1
|
||||
12 0 1
|
||||
SURF 0x30
|
||||
mat 2
|
||||
refs 4
|
||||
8 0 0
|
||||
11 1 0
|
||||
10 1 1
|
||||
9 0 1
|
||||
SURF 0x30
|
||||
mat 2
|
||||
refs 4
|
||||
11 0 0
|
||||
12 1 0
|
||||
13 1 1
|
||||
10 0 1
|
||||
SURF 0x30
|
||||
mat 2
|
||||
refs 4
|
||||
9 0 0
|
||||
14 1 0
|
||||
15 1 1
|
||||
8 0 1
|
||||
SURF 0x30
|
||||
mat 2
|
||||
refs 4
|
||||
8 0 0
|
||||
15 1 0
|
||||
12 1 1
|
||||
11 0 1
|
||||
SURF 0x30
|
||||
mat 2
|
||||
refs 4
|
||||
10 0 0
|
||||
13 1 0
|
||||
14 1 1
|
||||
9 0 1
|
||||
kids 0
|
||||
OBJECT poly
|
||||
name "FlapSwitch"
|
||||
loc 0.0267165 0.0384582 -0.000771669
|
||||
crease 45.000000
|
||||
numvert 20
|
||||
0.0355965 -0.0038875 -0.0105119
|
||||
0.0355965 -0.0038875 0.0103359
|
||||
7.87415e-005 0.00666422 0.0103359
|
||||
7.87415e-005 0.00666422 -0.0105119
|
||||
-0.00171348 -0.00349997 -0.0105119
|
||||
-0.00171348 -0.00349997 0.0103359
|
||||
0.0351283 -0.00666425 0.0103359
|
||||
0.0351283 -0.00666425 -0.0105119
|
||||
-0.0355964 -0.00219359 0.000157867
|
||||
0.00320959 -0.00219359 0.000157867
|
||||
0.00320959 -0.00219359 0.00315787
|
||||
-0.0355964 -0.00219359 0.00315787
|
||||
-0.0355964 0.00232242 0.00315787
|
||||
0.00320959 0.00232242 0.00315787
|
||||
0.00320959 0.00232242 0.000157867
|
||||
-0.0355964 0.00232242 0.000157867
|
||||
0.0352444 -0.00388747 0.0105119
|
||||
0.0352444 -0.00388747 -0.0103359
|
||||
-0.000273386 0.00666425 -0.0103359
|
||||
-0.000273386 0.00666425 0.0105119
|
||||
numsurf 12
|
||||
SURF 0x10
|
||||
mat 1
|
||||
refs 4
|
||||
0 0.603516 0.175781
|
||||
1 0.603516 0.0878903
|
||||
6 0.691406 0.0878903
|
||||
7 0.691406 0.175781
|
||||
SURF 0x10
|
||||
mat 1
|
||||
refs 4
|
||||
1 0.603516 0.175781
|
||||
2 0.603516 0.0878903
|
||||
5 0.691406 0.0878903
|
||||
6 0.691406 0.175781
|
||||
SURF 0x10
|
||||
mat 1
|
||||
refs 4
|
||||
2 0.603516 0.175781
|
||||
3 0.603516 0.0878903
|
||||
4 0.691406 0.0878903
|
||||
5 0.691406 0.175781
|
||||
SURF 0x10
|
||||
mat 1
|
||||
refs 4
|
||||
3 0.603516 0.175781
|
||||
0 0.603516 0.0878903
|
||||
7 0.691406 0.0878903
|
||||
4 0.691406 0.175781
|
||||
SURF 0x10
|
||||
mat 1
|
||||
refs 4
|
||||
6 0.691406 0.175781
|
||||
5 0.691406 0.0878903
|
||||
4 0.603516 0.0878903
|
||||
7 0.603516 0.175781
|
||||
SURF 0x30
|
||||
mat 1
|
||||
refs 4
|
||||
13 0 0
|
||||
10 1 0
|
||||
9 1 1
|
||||
14 0 1
|
||||
SURF 0x30
|
||||
mat 1
|
||||
refs 4
|
||||
15 0 0
|
||||
8 1 0
|
||||
11 1 1
|
||||
12 0 1
|
||||
SURF 0x30
|
||||
mat 1
|
||||
refs 4
|
||||
14 0 0
|
||||
9 1 0
|
||||
8 1 1
|
||||
15 0 1
|
||||
SURF 0x30
|
||||
mat 1
|
||||
refs 4
|
||||
12 0 0
|
||||
11 1 0
|
||||
10 1 1
|
||||
13 0 1
|
||||
SURF 0x30
|
||||
mat 1
|
||||
refs 4
|
||||
15 0 0
|
||||
12 1 0
|
||||
13 1 1
|
||||
14 0 1
|
||||
SURF 0x30
|
||||
mat 1
|
||||
refs 4
|
||||
8 0 0
|
||||
9 1 0
|
||||
10 1 1
|
||||
11 0 1
|
||||
SURF 0x20
|
||||
mat 0
|
||||
refs 4
|
||||
19 0 0
|
||||
18 0 0
|
||||
17 0 0
|
||||
16 0 0
|
||||
kids 0
|
||||
AC3Db
|
||||
MATERIAL "ac3dmat1" rgb 1 1 1 amb 0.2 0.2 0.2 emis 0 0 0 spec 0 0 0 shi 10 trans 0
|
||||
MATERIAL "WhiteLightOff" rgb 1 1 1 amb 1 1 1 emis 0 0 0 spec 0 0 0 shi 72 trans 0
|
||||
OBJECT world
|
||||
kids 3
|
||||
OBJECT poly
|
||||
name "rect"
|
||||
loc 0 -0.0136416 0.00484141
|
||||
texture "flaps.png"
|
||||
crease 45.000000
|
||||
numvert 4
|
||||
0 -0.0403456 -0.0189484
|
||||
0 -0.0403456 0.0400651
|
||||
0 0.066308 0.0400651
|
||||
0 0.066308 -0.0189484
|
||||
numsurf 1
|
||||
SURF 0x20
|
||||
mat 0
|
||||
refs 4
|
||||
3 1 1
|
||||
2 0 1
|
||||
1 0 0
|
||||
0 1 0
|
||||
kids 0
|
||||
OBJECT poly
|
||||
name "FlapPos"
|
||||
loc -0.00118963 0.0362646 0.0251696
|
||||
crease 45.000000
|
||||
numvert 16
|
||||
0.00443064 0.000999995 -0.00400197
|
||||
0.00802631 0.000999995 -0.00400197
|
||||
0.00802631 0.000999995 0.00400197
|
||||
0.00443064 0.000999995 0.00400197
|
||||
0.00443064 -0.000999998 0.00400197
|
||||
0.00802631 -0.000999998 0.00400197
|
||||
0.00802631 -0.000999998 -0.00400197
|
||||
0.00443064 -0.000999998 -0.00400197
|
||||
-0.00802631 0.000999998 -0.00122597
|
||||
0.00481799 0.000999998 -0.00122597
|
||||
0.00481799 0.000999998 0.00148963
|
||||
-0.00802631 0.000999998 0.00148963
|
||||
-0.00802631 -0.000999995 0.00148963
|
||||
0.00481799 -0.000999995 0.00148963
|
||||
0.00481799 -0.000999995 -0.00122597
|
||||
-0.00802631 -0.000999995 -0.00122597
|
||||
numsurf 12
|
||||
SURF 0x30
|
||||
mat 1
|
||||
refs 4
|
||||
7 0 0
|
||||
6 1 0
|
||||
5 1 1
|
||||
4 0 1
|
||||
SURF 0x30
|
||||
mat 1
|
||||
refs 4
|
||||
0 0 0
|
||||
3 1 0
|
||||
2 1 1
|
||||
1 0 1
|
||||
SURF 0x30
|
||||
mat 1
|
||||
refs 4
|
||||
3 0 0
|
||||
4 1 0
|
||||
5 1 1
|
||||
2 0 1
|
||||
SURF 0x30
|
||||
mat 1
|
||||
refs 4
|
||||
1 0 0
|
||||
6 1 0
|
||||
7 1 1
|
||||
0 0 1
|
||||
SURF 0x30
|
||||
mat 1
|
||||
refs 4
|
||||
0 0 0
|
||||
7 1 0
|
||||
4 1 1
|
||||
3 0 1
|
||||
SURF 0x30
|
||||
mat 1
|
||||
refs 4
|
||||
2 0 0
|
||||
5 1 0
|
||||
6 1 1
|
||||
1 0 1
|
||||
SURF 0x30
|
||||
mat 1
|
||||
refs 4
|
||||
15 0 0
|
||||
14 1 0
|
||||
13 1 1
|
||||
12 0 1
|
||||
SURF 0x30
|
||||
mat 1
|
||||
refs 4
|
||||
8 0 0
|
||||
11 1 0
|
||||
10 1 1
|
||||
9 0 1
|
||||
SURF 0x30
|
||||
mat 1
|
||||
refs 4
|
||||
11 0 0
|
||||
12 1 0
|
||||
13 1 1
|
||||
10 0 1
|
||||
SURF 0x30
|
||||
mat 1
|
||||
refs 4
|
||||
9 0 0
|
||||
14 1 0
|
||||
15 1 1
|
||||
8 0 1
|
||||
SURF 0x30
|
||||
mat 1
|
||||
refs 4
|
||||
8 0 0
|
||||
15 1 0
|
||||
12 1 1
|
||||
11 0 1
|
||||
SURF 0x30
|
||||
mat 1
|
||||
refs 4
|
||||
10 0 0
|
||||
13 1 0
|
||||
14 1 1
|
||||
9 0 1
|
||||
kids 0
|
||||
OBJECT poly
|
||||
name "FlapSwitch"
|
||||
loc 0.0267165 0.0384582 -0.000771669
|
||||
texture "manilla.png"
|
||||
crease 45.000000
|
||||
numvert 20
|
||||
0.0355965 -0.0038875 -0.0105119
|
||||
0.0355965 -0.0038875 0.0103359
|
||||
7.87415e-005 0.00666422 0.0103359
|
||||
7.87415e-005 0.00666422 -0.0105119
|
||||
-0.00171348 -0.00349997 -0.0105119
|
||||
-0.00171348 -0.00349997 0.0103359
|
||||
0.0351283 -0.00666425 0.0103359
|
||||
0.0351283 -0.00666425 -0.0105119
|
||||
-0.0355964 -0.00219359 0.000157867
|
||||
0.00320959 -0.00219359 0.000157867
|
||||
0.00320959 -0.00219359 0.00315787
|
||||
-0.0355964 -0.00219359 0.00315787
|
||||
-0.0355964 0.00232242 0.00315787
|
||||
0.00320959 0.00232242 0.00315787
|
||||
0.00320959 0.00232242 0.000157867
|
||||
-0.0355964 0.00232242 0.000157867
|
||||
0.0352444 -0.00388747 0.0105119
|
||||
0.0352444 -0.00388747 -0.0103359
|
||||
-0.000273386 0.00666425 -0.0103359
|
||||
-0.000273386 0.00666425 0.0105119
|
||||
numsurf 12
|
||||
SURF 0x10
|
||||
mat 1
|
||||
refs 4
|
||||
0 0.603516 0.175781
|
||||
1 0.603516 0.0878903
|
||||
6 0.691406 0.0878903
|
||||
7 0.691406 0.175781
|
||||
SURF 0x10
|
||||
mat 1
|
||||
refs 4
|
||||
1 0.989715 0.969592
|
||||
2 -0.00300926 0.996381
|
||||
5 0.0211005 0.720806
|
||||
6 0.996856 0.894456
|
||||
SURF 0x10
|
||||
mat 1
|
||||
refs 4
|
||||
2 0.603516 0.175781
|
||||
3 0.603516 0.0878903
|
||||
4 0.691406 0.0878903
|
||||
5 0.691406 0.175781
|
||||
SURF 0x10
|
||||
mat 1
|
||||
refs 4
|
||||
3 -0.00605563 1.00611
|
||||
0 0.986668 0.979323
|
||||
7 0.993809 0.904188
|
||||
4 0.018054 0.730537
|
||||
SURF 0x10
|
||||
mat 1
|
||||
refs 4
|
||||
6 0.308594 0.175781
|
||||
5 0.308594 0.0878903
|
||||
4 0.396484 0.0878903
|
||||
7 0.396484 0.175781
|
||||
SURF 0x30
|
||||
mat 1
|
||||
refs 4
|
||||
13 0 0
|
||||
10 1 0
|
||||
9 1 1
|
||||
14 0 1
|
||||
SURF 0x30
|
||||
mat 1
|
||||
refs 4
|
||||
15 0 0
|
||||
8 1 0
|
||||
11 1 1
|
||||
12 0 1
|
||||
SURF 0x30
|
||||
mat 1
|
||||
refs 4
|
||||
14 0 0
|
||||
9 1 0
|
||||
8 1 1
|
||||
15 0 1
|
||||
SURF 0x30
|
||||
mat 1
|
||||
refs 4
|
||||
12 0 0
|
||||
11 1 0
|
||||
10 1 1
|
||||
13 0 1
|
||||
SURF 0x30
|
||||
mat 1
|
||||
refs 4
|
||||
15 0 0
|
||||
12 1 0
|
||||
13 1 1
|
||||
14 0 1
|
||||
SURF 0x30
|
||||
mat 1
|
||||
refs 4
|
||||
8 0 0
|
||||
9 1 0
|
||||
10 1 1
|
||||
11 0 1
|
||||
SURF 0x20
|
||||
mat 1
|
||||
refs 4
|
||||
19 0.994515 -0.00785261
|
||||
18 0.994515 1.00635
|
||||
17 -0.0110846 1.00635
|
||||
16 -0.0110846 -0.00785267
|
||||
kids 0
|
||||
|
|
BIN
Aircraft/Instruments-3d/flaps/flaps.png
Normal file
After Width: | Height: | Size: 19 KiB |
BIN
Aircraft/Instruments-3d/flaps/manilla.png
Normal file
After Width: | Height: | Size: 18 KiB |
BIN
Aircraft/Instruments-3d/magneto-switch/mag_switch.png
Normal file
After Width: | Height: | Size: 36 KiB |
BIN
Aircraft/Instruments-3d/magneto-switch/metal_black.png
Normal file
After Width: | Height: | Size: 8.6 KiB |
|
@ -234,6 +234,29 @@ properties' values.
|
|||
<property>/instrumentation/kln89/scan-pull</property>
|
||||
</binding>
|
||||
</action>
|
||||
|
||||
<action>
|
||||
<name>Photocell Obscure</name>
|
||||
<!--This action represents the user obscuring the light-sensitive photocell
|
||||
in order to test the night-time brightness level of the display-->
|
||||
<button>0</button>
|
||||
<x>-408</x>
|
||||
<y>64</y>
|
||||
<w>40</w>
|
||||
<h>40</h>
|
||||
<binding>
|
||||
<command>property-assign</command>
|
||||
<property>/instrumentation/kln89/photocell-obscured</property>
|
||||
<value >1</value>
|
||||
</binding>
|
||||
<mod-up>
|
||||
<binding>
|
||||
<command>property-assign</command>
|
||||
<property>/instrumentation/kln89/photocell-obscured</property>
|
||||
<value>0</value>
|
||||
</binding>
|
||||
</mod-up>
|
||||
</action>
|
||||
|
||||
</actions>
|
||||
|
||||
|
|
BIN
Aircraft/c172p/Models/Pedals/pedal.png
Normal file
After Width: | Height: | Size: 32 KiB |
BIN
Aircraft/c172p/Models/Yoke/yoke.png
Normal file
After Width: | Height: | Size: 112 KiB |
|
@ -34,14 +34,9 @@
|
|||
<type>select</type>
|
||||
<object-name>Yoke</object-name>
|
||||
<condition>
|
||||
<and>
|
||||
<not>
|
||||
<property>sim/model/hide-yoke</property>
|
||||
</not>
|
||||
<not>
|
||||
<property>/sim/panel-hotspots</property>
|
||||
</not>
|
||||
</and>
|
||||
<not>
|
||||
<property>sim/model/hide-yoke</property>
|
||||
</not>
|
||||
</condition>
|
||||
</animation>
|
||||
|
||||
|
|
Before Width: | Height: | Size: 458 KiB After Width: | Height: | Size: 706 KiB |
Before Width: | Height: | Size: 123 KiB After Width: | Height: | Size: 90 KiB |
|
@ -196,37 +196,37 @@ Started October 23 2001 by John Check, fgpanels@rockfish.net
|
|||
</kr87>
|
||||
</nasal>
|
||||
<payload>
|
||||
<weight>
|
||||
<name type="string">Pilot</name>
|
||||
<weight-lb alias="/fdm/jsbsim/inertia/pointmass-weight-lbs[0]"/>
|
||||
<min-lb type="double">0.0</min-lb>
|
||||
<max-lb type="double">300.0</max-lb>
|
||||
</weight>
|
||||
<weight>
|
||||
<name type="string">Co-Pilot</name>
|
||||
<weight-lb alias="/fdm/jsbsim/inertia/pointmass-weight-lbs[1]"/>
|
||||
<min-lb type="double">0.0</min-lb>
|
||||
<max-lb type="double">300.0</max-lb>
|
||||
</weight>
|
||||
<weight>
|
||||
<name type="string">Left Passenger</name>
|
||||
<weight-lb alias="/fdm/jsbsim/inertia/pointmass-weight-lbs[2]"/>
|
||||
<min-lb type="double">0.0</min-lb>
|
||||
<max-lb type="double">300.0</max-lb>
|
||||
</weight>
|
||||
<weight>
|
||||
<name type="string">Right Passenger</name>
|
||||
<weight-lb alias="/fdm/jsbsim/inertia/pointmass-weight-lbs[3]"/>
|
||||
<min-lb type="double">0.0</min-lb>
|
||||
<max-lb type="double">300.0</max-lb>
|
||||
</weight>
|
||||
<weight>
|
||||
<name type="string">Baggage</name>
|
||||
<weight-lb alias="/fdm/jsbsim/inertia/pointmass-weight-lbs[4]"/>
|
||||
<min-lb type="double">0.0</min-lb>
|
||||
<max-lb type="double">150.0</max-lb> <!-- WARNING: Max baggage "by the book" is 120lbs or less! -->
|
||||
</weight>
|
||||
</payload>
|
||||
<weight>
|
||||
<name type="string">Pilot</name>
|
||||
<weight-lb alias="/fdm/jsbsim/inertia/pointmass-weight-lbs[0]"/>
|
||||
<min-lb type="double">0.0</min-lb>
|
||||
<max-lb type="double">300.0</max-lb>
|
||||
</weight>
|
||||
<weight>
|
||||
<name type="string">Co-Pilot</name>
|
||||
<weight-lb alias="/fdm/jsbsim/inertia/pointmass-weight-lbs[1]"/>
|
||||
<min-lb type="double">0.0</min-lb>
|
||||
<max-lb type="double">300.0</max-lb>
|
||||
</weight>
|
||||
<weight>
|
||||
<name type="string">Left Passenger</name>
|
||||
<weight-lb alias="/fdm/jsbsim/inertia/pointmass-weight-lbs[2]"/>
|
||||
<min-lb type="double">0.0</min-lb>
|
||||
<max-lb type="double">300.0</max-lb>
|
||||
</weight>
|
||||
<weight>
|
||||
<name type="string">Right Passenger</name>
|
||||
<weight-lb alias="/fdm/jsbsim/inertia/pointmass-weight-lbs[3]"/>
|
||||
<min-lb type="double">0.0</min-lb>
|
||||
<max-lb type="double">300.0</max-lb>
|
||||
</weight>
|
||||
<weight>
|
||||
<name type="string">Baggage</name>
|
||||
<weight-lb alias="/fdm/jsbsim/inertia/pointmass-weight-lbs[4]"/>
|
||||
<min-lb type="double">0.0</min-lb>
|
||||
<max-lb type="double">150.0</max-lb> <!-- WARNING: Max baggage "by the book" is 120lbs or less! -->
|
||||
</weight>
|
||||
</payload>
|
||||
|
||||
<input>
|
||||
<keyboard>
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
<property>/sim/rendering/landmass-shader</property>
|
||||
<property>/sim/rendering/shader-effects</property>
|
||||
<less-equal>
|
||||
<value type="float">4.0</value>
|
||||
<value type="float">4.5</value>
|
||||
<float-property>/sim/rendering/quality-level</float-property>
|
||||
</less-equal>
|
||||
<or>
|
||||
|
|
|
@ -21,20 +21,41 @@
|
|||
<to>/environment/clouds/layer[0]/elevation-ft</to>
|
||||
</params>
|
||||
<name>MetarController:clouds:altitude_interpolate</name>
|
||||
<type>noise-spike</type>
|
||||
<max-rate-of-change>8.333</max-rate-of-change>
|
||||
<type>exponential</type>
|
||||
<filter-time>
|
||||
<condition>
|
||||
<!-- dont't interpolate to -9999 or if more than 2000ft offset -->
|
||||
<or>
|
||||
<less-than>
|
||||
<property alias="../../../../../params/from"/>
|
||||
<value>-9000</value>
|
||||
</less-than>
|
||||
<less-than>
|
||||
<property alias="../../../../../params/to"/>
|
||||
<value>-9000</value>
|
||||
</less-than>
|
||||
<greater-than>
|
||||
<expression>
|
||||
<abs>
|
||||
<difference>
|
||||
<property alias="../../../../../../../../params/from"/>
|
||||
<property alias="../../../../../../../../params/to"/>
|
||||
</difference>
|
||||
</abs>
|
||||
</expression>
|
||||
<value>2000</value>
|
||||
</greater-than>
|
||||
</or>
|
||||
</condition>
|
||||
<value>0</value>
|
||||
</filter-time>
|
||||
|
||||
<filter-time>60</filter-time>
|
||||
|
||||
<enable>
|
||||
<condition>
|
||||
<property>/environment/metar/valid</property>
|
||||
<property>/environment/params/metar-updates-environment</property>
|
||||
<greater-than>
|
||||
<property alias="../../../../params/from"/>
|
||||
<value>-9000</value>
|
||||
</greater-than>
|
||||
<greater-than>
|
||||
<property alias="../../../../params/to"/>
|
||||
<value>-9000</value>
|
||||
</greater-than>
|
||||
</condition>
|
||||
</enable>
|
||||
<input alias="../params/from"/>
|
||||
|
|
|
@ -1,44 +0,0 @@
|
|||
<?xml version="1.0" ?>
|
||||
<!--
|
||||
This file is part of FlightGear, the free flight simulator
|
||||
http://www.flightgear.org/
|
||||
|
||||
Copyright (C) 2009 Torsten Dreyer, Torsten (at) t3r _dot_ de
|
||||
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License as
|
||||
published by the Free Software Foundation; either version 2 of the
|
||||
License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
General Public License for more details.
|
||||
-->
|
||||
<PropertyList>
|
||||
<params>
|
||||
<from>environment/metar/clouds/layer[0]/elevation-ft</from>
|
||||
<to>/environment/clouds/layer[0]/elevation-ft</to>
|
||||
</params>
|
||||
<name>MetarController:clouds:altitude_set</name>
|
||||
<type>gain</type>
|
||||
<gain>1.0</gain>
|
||||
<enable>
|
||||
<condition>
|
||||
<property>/environment/metar/valid</property>
|
||||
<property>/environment/params/metar-updates-environment</property>
|
||||
<or>
|
||||
<less-than>
|
||||
<property alias="../../../../../params/from"/>
|
||||
<value>-9000</value>
|
||||
</less-than>
|
||||
<less-than>
|
||||
<property alias="../../../../../params/to"/>
|
||||
<value>-9000</value>
|
||||
</less-than>
|
||||
</or>
|
||||
</condition>
|
||||
</enable>
|
||||
<input alias="../params/from"/>
|
||||
<output alias="../params/to"/>
|
||||
</PropertyList>
|
|
@ -76,6 +76,26 @@
|
|||
<weather-scenario>Fair weather</weather-scenario>
|
||||
<config>
|
||||
|
||||
<!-- definitions for the metar generated fog/mist/haze layer -->
|
||||
<fog-mist-haze-layer>
|
||||
<offset-from-station-elevation-ft>-200</offset-from-station-elevation-ft>
|
||||
<visibility-above-layer-m>20000</visibility-above-layer-m>
|
||||
|
||||
<fog-thickness-ft>500</fog-thickness-ft>
|
||||
<fog-2dlayer-alpha>0.6</fog-2dlayer-alpha>
|
||||
<fog-2dlayer-coverage>broken</fog-2dlayer-coverage>
|
||||
<fog-bc-2dlayer-coverage>scattered</fog-bc-2dlayer-coverage>
|
||||
<fog-shallow-thickness-ft>30</fog-shallow-thickness-ft>
|
||||
|
||||
<mist-thickness-ft>2000</mist-thickness-ft>
|
||||
<mist-2dlayer-alpha>0.8</mist-2dlayer-alpha>
|
||||
<mist-2dlayer-coverage>overcast</mist-2dlayer-coverage>
|
||||
|
||||
<haze-thickness-ft>2000</haze-thickness-ft>
|
||||
<haze-2dlayer-alpha>0.6</haze-2dlayer-alpha>
|
||||
<haze-2dlayer-coverage>overcast</haze-2dlayer-coverage>
|
||||
</fog-mist-haze-layer>
|
||||
|
||||
<boundary-transition-ft>500</boundary-transition-ft>
|
||||
|
||||
<boundary>
|
||||
|
|
|
@ -67,8 +67,9 @@
|
|||
|
||||
<filter>
|
||||
<!--
|
||||
transfer the sea-level temperature to each layer of
|
||||
interpolation controller.
|
||||
transfer the sea-level dewpoint to each layer of
|
||||
interpolation controller. This is most certainly
|
||||
wrong in most cases.
|
||||
-->
|
||||
<name>MetarController:dewpoint-sea-level-degc</name>
|
||||
<type>noise-spike</type>
|
||||
|
@ -93,7 +94,7 @@
|
|||
<!--
|
||||
transfer the visibility to each layer of
|
||||
interpolation controller. We are not very creative here and
|
||||
use the same visibility for all layers but top three which
|
||||
use the same visibility for all layers but top four which
|
||||
are left untouched.
|
||||
-->
|
||||
<name>MetarController:visibility-m</name>
|
||||
|
@ -109,14 +110,9 @@
|
|||
<output>/environment/config/boundary/entry[0]/visibility-m</output>
|
||||
<output>/environment/config/boundary/entry[1]/visibility-m</output>
|
||||
<output>/environment/config/aloft/entry[0]/visibility-m</output>
|
||||
<output>/environment/config/aloft/entry[1]/visibility-m</output>
|
||||
<output>/environment/config/aloft/entry[2]/visibility-m</output>
|
||||
<output>/environment/config/aloft/entry[3]/visibility-m</output>
|
||||
<output>/environment/config/aloft/entry[4]/visibility-m</output>
|
||||
</filter>
|
||||
|
||||
<!-- split the wind vector into it's components -->
|
||||
|
||||
<!-- interpolate the wind vector's components -->
|
||||
<filter>
|
||||
<name>MetarController:wind-from-north-fps</name>
|
||||
<type>exponential</type>
|
||||
|
@ -282,33 +278,6 @@
|
|||
</filter>
|
||||
|
||||
<!-- Clouds -->
|
||||
<!-- don't interpolate to/from altitude -9999 -->
|
||||
<filter include="clouds-altitude-set.xml"/>
|
||||
<filter include="clouds-altitude-set.xml">
|
||||
<params>
|
||||
<from>/environment/metar/clouds/layer[1]/elevation-ft</from>
|
||||
<to>/environment/clouds/layer[1]/elevation-ft</to>
|
||||
</params>
|
||||
</filter>
|
||||
<filter include="clouds-altitude-set.xml">
|
||||
<params>
|
||||
<from>/environment/metar/clouds/layer[2]/elevation-ft</from>
|
||||
<to>/environment/clouds/layer[2]/elevation-ft</to>
|
||||
</params>
|
||||
</filter>
|
||||
<filter include="clouds-altitude-set.xml">
|
||||
<params>
|
||||
<from>/environment/metar/clouds/layer[3]/elevation-ft</from>
|
||||
<to>/environment/clouds/layer[3]/elevation-ft</to>
|
||||
</params>
|
||||
</filter>
|
||||
<filter include="clouds-altitude-set.xml">
|
||||
<params>
|
||||
<from>/environment/metar/clouds/layer[4]/elevation-ft</from>
|
||||
<to>/environment/clouds/layer[4]/elevation-ft</to>
|
||||
</params>
|
||||
</filter>
|
||||
|
||||
<filter include="clouds-altitude-interpolate.xml"/>
|
||||
<filter include="clouds-altitude-interpolate.xml">
|
||||
<params>
|
||||
|
@ -378,4 +347,18 @@
|
|||
<to>environment/clouds/layer[4]/coverage-type</to>
|
||||
</params>
|
||||
</filter>
|
||||
<filter>
|
||||
<name>MetarController:cloud-visibility-m</name>
|
||||
<type>exponential</type>
|
||||
<filter-time>5</filter-time>
|
||||
<enable>
|
||||
<condition>
|
||||
<property>/environment/metar/valid</property>
|
||||
<property>/environment/params/metar-updates-environment</property>
|
||||
</condition>
|
||||
</enable>
|
||||
<input>/environment/metar/clouds/layer[0]/visibility-m</input>
|
||||
<output>/environment/clouds/layer[0]/visibility-m</output>
|
||||
</filter>
|
||||
|
||||
</PropertyList>
|
||||
|
|
19
Input/Joysticks/Accelerometers/accelerometers.xml
Normal file
|
@ -0,0 +1,19 @@
|
|||
<?xml version="1.0"?>
|
||||
|
||||
<!--
|
||||
************************************************************************
|
||||
Override default joystick bindings for laptop accelerometers.
|
||||
|
||||
This prevents it generating inputs that override keyboard settings.
|
||||
|
||||
************************************************************************
|
||||
$Id$
|
||||
-->
|
||||
|
||||
<PropertyList>
|
||||
|
||||
<name>ST LIS3LV02DL Accelerometer</name>
|
||||
|
||||
</PropertyList>
|
||||
|
||||
<!-- end of joystick.xml -->
|
|
@ -95,6 +95,7 @@ ________________________________________________________________________________
|
|||
<PropertyList>
|
||||
<name>Microsoft SideWinder Force Feedback 2</name>
|
||||
<name>Microsoft SideWinder Force Feedback 2 Joystick</name>
|
||||
<name>SideWinder Force Feedback 2 Joystick</name>
|
||||
|
||||
<data>
|
||||
<mode type="int">0</mode>
|
||||
|
|
|
@ -120,7 +120,6 @@
|
|||
<property>/controls/flight/aileron</property>
|
||||
<dead-band type="double">0.01</dead-band>
|
||||
<offset type="double">0.0</offset>
|
||||
<squared type="bool">true</squared>
|
||||
</binding>
|
||||
</axis>
|
||||
|
||||
|
@ -139,7 +138,6 @@
|
|||
<dead-band type="double">0.01</dead-band>
|
||||
<offset type="double">0.0</offset>
|
||||
<factor type="double">-1.0</factor>
|
||||
<squared type="bool">true</squared>
|
||||
</binding>
|
||||
</axis>
|
||||
|
||||
|
@ -158,7 +156,6 @@
|
|||
<dead-band type="double">0.01</dead-band>
|
||||
<offset type="double">0.0</offset>
|
||||
<factor type="double">1.0</factor>
|
||||
<squared type="bool">true</squared>
|
||||
</binding>
|
||||
<!-- binding>
|
||||
<command>nasal</command>
|
||||
|
|
256
Input/Joysticks/SpeedLink/ps2.xml
Normal file
|
@ -0,0 +1,256 @@
|
|||
<?xml version="1.0"?>
|
||||
<!--
|
||||
************************************************************************
|
||||
* Bindings for Sony Playstation 2 DualShock Analog Controller (SCPH-1200)
|
||||
* connected via Speedlink PS2 to PC adapter SL6502
|
||||
* (USB hardware id: 0e8f:0003, as of linux kernel 2.6.2x)
|
||||
* http://www.speedlink.com/?p=2&cat=319&pid=20205&paus=1
|
||||
* (working link as of 29.10.2010)
|
||||
*
|
||||
* Tested under Linux and Windows XP (32bit)
|
||||
*
|
||||
* Axis 0 (left joystick): ailerons
|
||||
* Axis 1 (left joystick): elevator
|
||||
* Axis 2: not used, or we won't have a stable rudder
|
||||
* Axis 3 (right joystick): rudder
|
||||
* Axes 4 and 5 (d-pad): view direction (6 and 7 respectively under Windows)
|
||||
* NOTE to Windows users: axis 7 is inverted and currently there is
|
||||
* no way to fix it per OS basis.
|
||||
*
|
||||
* Buttons according to the gamepad:
|
||||
*
|
||||
* Button 3 (square): throttle up
|
||||
* Button 2 (cross): throttle down
|
||||
* Button 1 (circle): flap down
|
||||
* Button 0 (triangle): flap up
|
||||
* Button 6 (L1): elevator trim up
|
||||
* Button 7 (R1): elevator trim down
|
||||
* Button 4 (L2): left brake only
|
||||
* Button 5 (R2): right brake only
|
||||
* Button 9 (start): gear toggle
|
||||
* Button 8 (select): currently unused
|
||||
* Button 10 (left joystick button): view change
|
||||
* Button 11 (right joystick button): parking brake toggle
|
||||
|
||||
************************************************************************
|
||||
-->
|
||||
|
||||
<PropertyList>
|
||||
<name>GreenAsia Inc. USB Joystick </name>
|
||||
<name>USB Joystick </name>
|
||||
<name>SPEED-LINK DUAL SHOCK ADAPTER</name>
|
||||
|
||||
<nasal>
|
||||
<script>
|
||||
gui.popupTip("Enable analog mode!", 10);
|
||||
</script>
|
||||
</nasal>
|
||||
|
||||
<axis n="0">
|
||||
<desc>Aileron</desc>
|
||||
<binding>
|
||||
<command>property-scale</command>
|
||||
<property>/controls/flight/aileron</property>
|
||||
<factor type="double">0.6</factor>
|
||||
<squared type="bool">true</squared>
|
||||
<dead-band type="double">0.2</dead-band>
|
||||
</binding>
|
||||
</axis>
|
||||
|
||||
<axis n="1">
|
||||
<desc>Elevator</desc>
|
||||
<binding>
|
||||
<command>property-scale</command>
|
||||
<property>/controls/flight/elevator</property>
|
||||
<factor type="double">-0.6</factor>
|
||||
<squared type="bool">true</squared>
|
||||
<dead-band type="double">0.2</dead-band>
|
||||
</binding>
|
||||
</axis>
|
||||
|
||||
# <axis n="3">
|
||||
# <desc>Rudder</desc>
|
||||
# <binding>
|
||||
# <command>property-scale</command>
|
||||
# <property>/controls/flight/rudder</property>
|
||||
# <factor type="double">0.5</factor>
|
||||
# </binding>
|
||||
# </axis>
|
||||
|
||||
<axis>
|
||||
<desc>View direction</desc>
|
||||
<number>
|
||||
<windows>6</windows>
|
||||
<unix>4</unix>
|
||||
</number>
|
||||
<low>
|
||||
<repeatable>true</repeatable>
|
||||
<binding>
|
||||
<command>property-adjust</command>
|
||||
<property>/sim/current-view/goal-heading-offset-deg</property>
|
||||
<step type="double">2.0</step>
|
||||
</binding>
|
||||
</low>
|
||||
<high>
|
||||
<repeatable>true</repeatable>
|
||||
<binding>
|
||||
<command>property-adjust</command>
|
||||
<property>/sim/current-view/goal-heading-offset-deg</property>
|
||||
<step type="double">-2.0</step>
|
||||
</binding>
|
||||
</high>
|
||||
</axis>
|
||||
|
||||
<axis>
|
||||
<desc>View elevation</desc>
|
||||
<number>
|
||||
<windows>7</windows>
|
||||
<unix>5</unix>
|
||||
</number>
|
||||
<low>
|
||||
<repeatable>true</repeatable>
|
||||
<binding>
|
||||
<command>property-adjust</command>
|
||||
<property>/sim/current-view/goal-pitch-offset-deg</property>
|
||||
<step type="double">2.0</step>
|
||||
</binding>
|
||||
</low>
|
||||
<high>
|
||||
<repeatable>true</repeatable>
|
||||
<binding>
|
||||
<command>property-adjust</command>
|
||||
<property>/sim/current-view/goal-pitch-offset-deg</property>
|
||||
<step type="double">-2.0</step>
|
||||
</binding>
|
||||
</high>
|
||||
</axis>
|
||||
|
||||
<button n="6">
|
||||
<desc>Elevator trim up</desc>
|
||||
<repeatable type="bool">true</repeatable>
|
||||
<binding>
|
||||
<command>property-adjust</command>
|
||||
<property>/controls/flight/elevator-trim</property>
|
||||
<step type="double">0.001</step>
|
||||
</binding>
|
||||
</button>
|
||||
|
||||
<button n="7">
|
||||
<desc>Elevator trim down</desc>
|
||||
<repeatable type="bool">true</repeatable>
|
||||
<binding>
|
||||
<command>property-adjust</command>
|
||||
<property>/controls/flight/elevator-trim</property>
|
||||
<step type="double">-0.001</step>
|
||||
</binding>
|
||||
</button>
|
||||
|
||||
<button n="0">
|
||||
<desc>Flaps up</desc>
|
||||
<repeatable>false</repeatable>
|
||||
<binding>
|
||||
<command>nasal</command>
|
||||
<script>controls.flapsDown(-1)</script>
|
||||
</binding>
|
||||
<mod-up>
|
||||
<binding>
|
||||
<command>nasal</command>
|
||||
<script>controls.flapsDown(0)</script>
|
||||
</binding>
|
||||
</mod-up>
|
||||
</button>
|
||||
|
||||
<button n="1">
|
||||
<desc>Flaps down</desc>
|
||||
<binding>
|
||||
<command>nasal</command>
|
||||
<script>controls.flapsDown(1)</script>
|
||||
</binding>
|
||||
<mod-up>
|
||||
<binding>
|
||||
<command>nasal</command>
|
||||
<script>controls.flapsDown(0)</script>
|
||||
</binding>
|
||||
</mod-up>
|
||||
</button>
|
||||
|
||||
<button n="4">
|
||||
<desc>Left brake</desc>
|
||||
<binding>
|
||||
<command>nasal</command>
|
||||
<script>controls.applyBrakes(1,-1)</script>
|
||||
</binding>
|
||||
<mod-up>
|
||||
<binding>
|
||||
<command>nasal</command>
|
||||
<script>controls.applyBrakes(0, -1)</script>
|
||||
</binding>
|
||||
</mod-up>
|
||||
</button>
|
||||
|
||||
<button n="5">
|
||||
<desc>Right brake</desc>
|
||||
<binding>
|
||||
<command>nasal</command>
|
||||
<script>controls.applyBrakes(1,1)</script>
|
||||
</binding>
|
||||
<mod-up>
|
||||
<binding>
|
||||
<command>nasal</command>
|
||||
<script>controls.applyBrakes(0, 1)</script>
|
||||
</binding>
|
||||
</mod-up>
|
||||
</button>
|
||||
|
||||
<button n="9">
|
||||
<desc>Landing gear toggle</desc>
|
||||
<repeatable>false</repeatable>
|
||||
<binding>
|
||||
<command>nasal</command>
|
||||
<script>controls.gearToggle()</script>
|
||||
</binding>
|
||||
</button>
|
||||
|
||||
<button n="3">
|
||||
<desc>Throttle up</desc>
|
||||
<repeatable>true</repeatable>
|
||||
<binding>
|
||||
<command>nasal</command>
|
||||
<script>_ = sprintf("Throttle = %.3f", controls.adjThrottle(0.5))</script>
|
||||
</binding>
|
||||
</button>
|
||||
|
||||
<button n="2">
|
||||
<desc>Throttle down</desc>
|
||||
<repeatable>true</repeatable>
|
||||
<binding>
|
||||
<command>nasal</command>
|
||||
<script>_ = sprintf("Throttle = %.3f", controls.adjThrottle(-0.5))</script>
|
||||
</binding>
|
||||
</button>
|
||||
|
||||
<button n="8">
|
||||
<desc>Not used</desc>
|
||||
<repeatable>false</repeatable>
|
||||
<binding>
|
||||
</binding>
|
||||
</button>
|
||||
|
||||
<button n="10">
|
||||
<desc>View</desc>
|
||||
<repeatable>false</repeatable>
|
||||
<binding>
|
||||
<command>nasal</command>
|
||||
<script>view.stepView(1)</script>
|
||||
</binding>
|
||||
</button>
|
||||
|
||||
<button n="11">
|
||||
<desc>Parking brake toggle</desc>
|
||||
<repeatable>false</repeatable>
|
||||
<binding>
|
||||
<command>property-toggle</command>
|
||||
<property>/controls/gear/brake-parking</property>
|
||||
</binding>
|
||||
</button>
|
||||
</PropertyList>
|
|
@ -37,6 +37,7 @@
|
|||
|
||||
<PropertyList>
|
||||
<name type="string">Thrustmaster T.16000M</name>
|
||||
<name type="string">T.16000M</name>
|
||||
|
||||
<axis>
|
||||
<number>
|
||||
|
|
639
Input/Joysticks/ThrustMaster/Top-Gun-Afterburner-USB.xml
Normal file
|
@ -0,0 +1,639 @@
|
|||
<?xml version="1.0"?>
|
||||
<!--
|
||||
|
||||
Original file by frohlich
|
||||
|
||||
$Id$
|
||||
|
||||
Bindings for THRUSTMASTER Top Gun Afterburner USB stick/throttle combination.
|
||||
|
||||
This file is based on the Cyborg-Gold-3d-USB configuration file. So it provides
|
||||
maximum compatibility.
|
||||
|
||||
_______________________________________ Layout _______________________________________
|
||||
|
||||
|
||||
axis 0: aileron
|
||||
axis 1: elevator
|
||||
axis 2: rudder
|
||||
axis 3: throttle
|
||||
|
||||
|
||||
no modifier F3 F4 F3+F4
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
button 0 (trigger): brakes parking brake speed brake thrust revers.
|
||||
button 1 (top middle): flaps up gear up previous view *
|
||||
button 2 (front right): reset view dir tail wheel lock cockpit view reset all trim
|
||||
button 3 (top right): flaps down gear down next view *
|
||||
button 4 (thr. down/back): brakes left * zoom out *
|
||||
button 5 (thr. middle/back): brakes right * zoom in *
|
||||
button 6 (thr. upper/back): //////////////////////// modifier 0 /////////////////////////
|
||||
button 7 (thr. front): //////////////////////// modifier 1 /////////////////////////
|
||||
hat left (axis5): look left leaner mixture aileron trim rudder trim
|
||||
hat right (axis5): look right richer mixture aileron trim rudder trim
|
||||
hat back (axis6): look down dec prop pitch elevator trim *
|
||||
hat forward (axis6): look up inc prop pitch elevator trim *
|
||||
|
||||
|
||||
F3 and F4 are used like "Shift", "Control", or "Alternate" on computer keyboards.
|
||||
For example: press F3 and keep holding it down while pressing the fire
|
||||
button/trigger -> toggle parking brake
|
||||
|
||||
When flying the Harrier, "F3/hat left" and "right" control the thrust vector.
|
||||
|
||||
Also this configurations will make use of the raster positions on the throttle.
|
||||
The idle position and below is really zero thrust command.
|
||||
Positions bewteen idle and afterburner will scale the thrust value between 0 and 0.98
|
||||
and thus provides military power for jet engines. The afterburner raster will
|
||||
really turn on afterburning.
|
||||
|
||||
Also to avoid additional deadband values in the linux kernel
|
||||
to the deadband values configured here in flightgear.
|
||||
You may need to issue the following command before starting flightgear:
|
||||
|
||||
jscal -s 7,1,0,-5,5,4194304,4194304,1,0,-5,5,4194304,4194304,1,0,-5,5,4194304,4194304,1,0,128,128,4194304,4194304,1,0,112,142,5534751,5534751,1,0,0,0,536870912,536870912,1,0,0,0,536870912,536870912 /dev/input/js0
|
||||
|
||||
This will also avoid the useless deadband area in the middle of the throttle position.
|
||||
Also this will make the raster positions of the throttle match the programmed values here.
|
||||
|
||||
___________________________________ Customization ____________________________________
|
||||
|
||||
|
||||
|
||||
If you want to change some (or all) of the bindings, the recommended way is
|
||||
to copy this file to your home directory, make your changes there, and include
|
||||
it from your personal preferences.xml file. Use the tags <js-named n="100">
|
||||
and </js-named> around the definitions, but within the <PropertyList> scope.
|
||||
(You can use any number lower than 999.)
|
||||
|
||||
<PropertyList>
|
||||
<input>
|
||||
<joysticks include="your-modified-copy.xml"/>
|
||||
</input>
|
||||
</PropertyList>
|
||||
|
||||
|
||||
The property "/input/joysticks/js[0]/saitek-cyborg-3D-modifier" indicates
|
||||
the "shift" level. F3 sets bit 0, F4 sets bit 1. The property is 'nil' or
|
||||
zero if none of the shift buttons is pressed, 1 if F3 is pressed, 2 if F4
|
||||
is pressed, and 3 if both F3 and F4 are pressed.
|
||||
|
||||
Note that you have to enclose nasal scripts in <script><![CDATA[...]]></script>
|
||||
if they contain characters that interfere with the xml markup. This is the case
|
||||
if you are, for exmaple, using < (lower than). Alternatively, you can 'escape'
|
||||
the character with "<".
|
||||
|
||||
|
||||
|
||||
|
||||
____________________________________ References ______________________________________
|
||||
|
||||
|
||||
|
||||
Joysticks: $FG_ROOT/Docs/README.Joystick.html
|
||||
Properties: see property browser (fgfs menu: "File"->"Browse internal properties")
|
||||
|
||||
Nasal: http://www.plausible.org/nasal/
|
||||
Nasal examples: $FG_ROOT/Nasal/
|
||||
|
||||
|
||||
______________________________________________________________________________________
|
||||
|
||||
~~ Melchior FRANZ <mfranz@aon.at>
|
||||
slightly modified for the thrustmaster joystick Mathias Froehlich <Mathias.Froehlich@web.de>
|
||||
-->
|
||||
|
||||
<PropertyList>
|
||||
<name type="string">ThrustMaster HOTAS Force Feedback Joystick</name>
|
||||
|
||||
<axis>
|
||||
<desc>Aileron</desc>
|
||||
<number>
|
||||
<unix>0</unix>
|
||||
<mac>0</mac>
|
||||
<windows>0</windows>
|
||||
</number>
|
||||
<binding>
|
||||
<command>property-scale</command>
|
||||
<property>/controls/flight/aileron</property>
|
||||
<power type="double">2.0</power>
|
||||
</binding>
|
||||
</axis>
|
||||
|
||||
<axis>
|
||||
<desc>Elevator</desc>
|
||||
<number>
|
||||
<unix>1</unix>
|
||||
<mac>1</mac>
|
||||
<windows>1</windows>
|
||||
</number>
|
||||
<binding>
|
||||
<command>property-scale</command>
|
||||
<property>/controls/flight/elevator</property>
|
||||
<factor type="double">-1.0</factor>
|
||||
<power type="double">2.0</power>
|
||||
</binding>
|
||||
</axis>
|
||||
|
||||
<axis>
|
||||
<desc>Rudder</desc>
|
||||
<number>
|
||||
<unix>3</unix>
|
||||
<mac>3</mac>
|
||||
<windows>3</windows>
|
||||
</number>
|
||||
<binding>
|
||||
<command>property-scale</command>
|
||||
<property>/controls/flight/rudder</property>
|
||||
<offset type="double">0.0</offset>
|
||||
<factor type="double">1.0</factor>
|
||||
<power type="double">2.0</power>
|
||||
</binding>
|
||||
</axis>
|
||||
|
||||
<axis>
|
||||
<!--
|
||||
We have a throttle with two raster positions.
|
||||
|
||||
The areas are:
|
||||
1 - 0.99: idle
|
||||
0.99 - 0.9: idle deadband
|
||||
0.9 - -0.55: normal thrust
|
||||
-0.55 - -0.9: afterburner deadband
|
||||
-0.9 - -1: afterburner
|
||||
-->
|
||||
<desc>Throttle</desc>
|
||||
<number>
|
||||
<unix>2</unix>
|
||||
<mac>2</mac>
|
||||
<windows>2</windows>
|
||||
</number>
|
||||
<dead-band type="double">0.0</dead-band>
|
||||
<binding>
|
||||
<command>nasal</command>
|
||||
<script>
|
||||
<![CDATA[
|
||||
if (1==1) {
|
||||
val = cmdarg().getNode("setting").getValue();
|
||||
abend = -1;
|
||||
abstart = -0.9;
|
||||
milend = -0.55;
|
||||
milstart = 0.9;
|
||||
if (val < abstart) {
|
||||
# afterburner
|
||||
a = 0.03/(abend-abstart);
|
||||
b = 1-a*abend;
|
||||
props.setAll("/controls/engines/engine", "augmentation", "true");
|
||||
props.setAll("/controls/engines/engine", "throttle", a*val+b);
|
||||
} else {
|
||||
# no afterburner
|
||||
props.setAll("/controls/engines/engine", "augmentation", "false");
|
||||
if (val < milend) {
|
||||
# afterburner deadband
|
||||
props.setAll("/controls/engines/engine", "throttle", 0.9699999999);
|
||||
} else {
|
||||
if (val < milstart) {
|
||||
a = 0.96999999999/(milend-milstart);
|
||||
b = -a*milstart;
|
||||
props.setAll("/controls/engines/engine", "throttle", a*val+b);
|
||||
#props.setAll("/controls/engines/engine", "cutoff", 0);
|
||||
#props.setAll("/controls/engines/engine", "starter", 0);
|
||||
} else {
|
||||
if (val < 0.99) {
|
||||
props.setAll("/controls/engines/engine", "throttle", 0.4);
|
||||
#props.setAll("/controls/engines/engine", "cutoff", 0);
|
||||
#props.setAll("/controls/engines/engine", "starter", 1);
|
||||
} else {
|
||||
props.setAll("/controls/engines/engine", "throttle", 0);
|
||||
#props.setAll("/controls/engines/engine", "cutoff", 1);
|
||||
#props.setAll("/controls/engines/engine", "starter", 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]]>
|
||||
</script>
|
||||
</binding>
|
||||
</axis>
|
||||
|
||||
<button n="0"><!-- trigger -->
|
||||
<desc>Brakes</desc>
|
||||
<repeatable type="bool">true</repeatable>
|
||||
<binding>
|
||||
<command>nasal</command>
|
||||
<script>
|
||||
mod = getprop("/input/joysticks/js[0]/thrustmaster-top-gun-afterburner-modifier");
|
||||
if (mod == nil or mod == 0) {
|
||||
interpolate("/controls/gear/brake-left", 1, 0.075);
|
||||
interpolate("/controls/gear/brake-right", 1, 0.075);
|
||||
} elsif (mod == 1) {
|
||||
setprop("/controls/gear/brake-left", 1);
|
||||
setprop("/controls/gear/brake-right", 1);
|
||||
} elsif (mod == 2) {
|
||||
#
|
||||
} elsif (mod == 3) {
|
||||
#
|
||||
}
|
||||
</script>
|
||||
</binding>
|
||||
<mod-up>
|
||||
<binding>
|
||||
<command>nasal</command>
|
||||
<script>
|
||||
mod = getprop("/input/joysticks/js[0]/thrustmaster-top-gun-afterburner-modifier");
|
||||
if (mod == nil or mod == 0) {
|
||||
interpolate("/controls/gear/brake-left", 0, 0.075);
|
||||
interpolate("/controls/gear/brake-right", 0, 0.075);
|
||||
} elsif (mod == 1) {
|
||||
brake = !getprop("/controls/gear/brake-parking");
|
||||
setprop("/controls/gear/brake-parking", brake);
|
||||
if (brake) {
|
||||
gui.popupTip("Parking Brake ON");
|
||||
} else {
|
||||
gui.popupTip("Parking Brake OFF");
|
||||
}
|
||||
setprop("/controls/gear/brake-left", 0);
|
||||
setprop("/controls/gear/brake-right", 0);
|
||||
} elsif (mod == 2) {
|
||||
speedbrake = !getprop("/controls/flight/speedbrake");
|
||||
setprop("/controls/flight/speedbrake", speedbrake);
|
||||
} elsif (mod == 3) {
|
||||
reverser = !getprop("/controls/engines/engine[0]/reverser");
|
||||
props.setAll("/controls/engines/engine", "reverser", reverser);
|
||||
if (reverser) {
|
||||
gui.popupTip("Thrust Reverser ON");
|
||||
} else {
|
||||
gui.popupTip("Thrust Reverser OFF");
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</binding>
|
||||
</mod-up>
|
||||
</button>
|
||||
|
||||
<button n="1"><!-- top middle -->
|
||||
<desc>Flaps/gear up; previous view</desc>
|
||||
<repeatable type="bool">false</repeatable>
|
||||
<binding>
|
||||
<command>nasal</command>
|
||||
<script>
|
||||
mod = getprop("/input/joysticks/js[0]/thrustmaster-top-gun-afterburner-modifier");
|
||||
if (mod == nil or mod == 0) {
|
||||
controls.flapsDown(-1);
|
||||
gui.popupTip("Fermeture volets - Raise flaps");
|
||||
} elsif (mod == 1) {
|
||||
controls.gearDown(-1);
|
||||
gui.popupTip("Train rentre - Gear up");
|
||||
} elsif (mod == 2) {
|
||||
view.stepView(-1);
|
||||
} elsif (mod == 3) {
|
||||
#
|
||||
}
|
||||
</script>
|
||||
</binding>
|
||||
<mod-up>
|
||||
<binding>
|
||||
<command>nasal</command>
|
||||
<script>
|
||||
mod = getprop("/input/joysticks/js[0]/thrustmaster-top-gun-afterburner-modifier");
|
||||
if (mod == nil or mod == 0) {
|
||||
controls.flapsDown(0);
|
||||
gui.popupTip("Fermeture volets - Raise flaps");
|
||||
} elsif (mod == 1) {
|
||||
controls.gearDown(0);
|
||||
gui.popupTip("Train rentre - Gear up");
|
||||
} elsif (mod == 2) {
|
||||
#
|
||||
} elsif (mod == 3) {
|
||||
#
|
||||
}
|
||||
</script>
|
||||
</binding>
|
||||
</mod-up>
|
||||
</button>
|
||||
|
||||
<button n="2"><!-- front right -->
|
||||
<desc>Reset view; toggle tail-wheel lock; reset trim</desc>
|
||||
<repeatable type="bool">false</repeatable>
|
||||
<binding>
|
||||
<command>nasal</command>
|
||||
<script>
|
||||
mod = getprop("/input/joysticks/js[0]/thrustmaster-top-gun-afterburner-modifier");
|
||||
if (mod == nil or mod == 0) {
|
||||
view.resetView();
|
||||
} elsif (mod == 1) {
|
||||
twlock = !getprop("/controls/gear/tailwheel-lock");
|
||||
setprop("/controls/gear/tailwheel-lock", twlock);
|
||||
if (twlock) {
|
||||
gui.popupTip("Tail Wheel LOCKED");
|
||||
} else {
|
||||
gui.popupTip("Tail Wheel UNLOCKED");
|
||||
}
|
||||
} elsif (mod == 2) {
|
||||
setprop("/sim/current-view/view-number", 0);
|
||||
view.resetView();
|
||||
} elsif (mod == 3) {
|
||||
setprop("/controls/flight/elevator-trim", 0);
|
||||
setprop("/controls/flight/aileron-trim", 0);
|
||||
setprop("/controls/flight/rudder-trim", 0);
|
||||
}
|
||||
</script>
|
||||
</binding>
|
||||
</button>
|
||||
|
||||
<button n="3"><!-- top right -->
|
||||
<desc>Flaps/gear down; next view</desc>
|
||||
<repeatable type="bool">false</repeatable>
|
||||
<binding>
|
||||
<command>nasal</command>
|
||||
<script>
|
||||
mod = getprop("/input/joysticks/js[0]/thrustmaster-top-gun-afterburner-modifier");
|
||||
if (mod == nil or mod == 0) {
|
||||
controls.flapsDown(1);
|
||||
gui.popupTip("Ouverture volets - Lower flaps");
|
||||
} elsif (mod == 1) {
|
||||
controls.gearDown(1);
|
||||
gui.popupTip("Train sorti - Gear down");
|
||||
} elsif (mod == 2) {
|
||||
view.stepView(1);
|
||||
} elsif (mod == 3) {
|
||||
#
|
||||
}
|
||||
</script>
|
||||
</binding>
|
||||
<mod-up>
|
||||
<binding>
|
||||
<command>nasal</command>
|
||||
<script>
|
||||
mod = getprop("/input/joysticks/js[0]/thrustmaster-top-gun-afterburner-modifier");
|
||||
if (mod == nil or mod == 0) {
|
||||
controls.flapsDown(0);
|
||||
gui.popupTip("Ouverture volets - Lower flaps");
|
||||
} elsif (mod == 1) {
|
||||
controls.gearDown(0);
|
||||
gui.popupTip("Train sorti - Gear down");
|
||||
} elsif (mod == 2) {
|
||||
#
|
||||
} elsif (mod == 3) {
|
||||
#
|
||||
}
|
||||
</script>
|
||||
</binding>
|
||||
</mod-up>
|
||||
</button>
|
||||
|
||||
<button n="4"><!-- throttle down/back -->
|
||||
<desc>Brakes left</desc>
|
||||
<repeatable type="bool">true</repeatable>
|
||||
<binding>
|
||||
<command>nasal</command>
|
||||
<script>
|
||||
mod = getprop("/input/joysticks/js[0]/thrustmaster-top-gun-afterburner-modifier");
|
||||
if (mod == nil or mod == 0) {
|
||||
interpolate("/controls/gear/brake-left", 1, 0.075);
|
||||
} elsif (mod == 1) {
|
||||
#
|
||||
} elsif (mod == 2) {
|
||||
view.increase();
|
||||
} elsif (mod == 3) {
|
||||
#
|
||||
}
|
||||
</script>
|
||||
</binding>
|
||||
<mod-up>
|
||||
<binding>
|
||||
<command>nasal</command>
|
||||
<script>
|
||||
mod = getprop("/input/joysticks/js[0]/thrustmaster-top-gun-afterburner-modifier");
|
||||
if (mod == nil or mod == 0) {
|
||||
interpolate("/controls/gear/brake-left", 0, 0.075);
|
||||
} elsif (mod == 1) {
|
||||
#
|
||||
} elsif (mod == 2) {
|
||||
#
|
||||
} elsif (mod == 3) {
|
||||
#
|
||||
}
|
||||
</script>
|
||||
</binding>
|
||||
</mod-up>
|
||||
</button>
|
||||
|
||||
<button n="5"><!-- throttle middle/back -->
|
||||
<desc>Brakes right</desc>
|
||||
<repeatable type="bool">true</repeatable>
|
||||
<binding>
|
||||
<command>nasal</command>
|
||||
<script>
|
||||
mod = getprop("/input/joysticks/js[0]/thrustmaster-top-gun-afterburner-modifier");
|
||||
if (mod == nil or mod == 0) {
|
||||
interpolate("/controls/gear/brake-right", 1, 0.075);
|
||||
} elsif (mod == 1) {
|
||||
#
|
||||
} elsif (mod == 2) {
|
||||
view.decrease();
|
||||
} elsif (mod == 3) {
|
||||
#
|
||||
}
|
||||
</script>
|
||||
</binding>
|
||||
<mod-up>
|
||||
<binding>
|
||||
<command>nasal</command>
|
||||
<script>
|
||||
mod = getprop("/input/joysticks/js[0]/thrustmaster-top-gun-afterburner-modifier");
|
||||
if (mod == nil or mod == 0) {
|
||||
interpolate("/controls/gear/brake-right", 0, 0.075);
|
||||
} elsif (mod == 1) {
|
||||
#
|
||||
} elsif (mod == 2) {
|
||||
#
|
||||
} elsif (mod == 3) {
|
||||
#
|
||||
}
|
||||
</script>
|
||||
</binding>
|
||||
</mod-up>
|
||||
</button>
|
||||
|
||||
<button n="6"><!-- throttle upper/back -->
|
||||
<desc>Modifier Bit 0</desc>
|
||||
<repeatable type="bool">false</repeatable>
|
||||
<binding>
|
||||
<command>nasal</command>
|
||||
<script>
|
||||
name = "/input/joysticks/js[0]/thrustmaster-top-gun-afterburner-modifier";
|
||||
mod = getprop(name);
|
||||
if (mod == nil) {
|
||||
setprop(name, 1);
|
||||
} elsif (mod == 0 or mod == 2) {
|
||||
setprop(name, mod + 1);
|
||||
}
|
||||
</script>
|
||||
</binding>
|
||||
<mod-up>
|
||||
<binding>
|
||||
<command>nasal</command>
|
||||
<script>
|
||||
name = "/input/joysticks/js[0]/thrustmaster-top-gun-afterburner-modifier";
|
||||
mod = getprop(name);
|
||||
if (mod == nil) {
|
||||
setprop(name, 0);
|
||||
} elsif (mod == 1 or mod == 3) {
|
||||
setprop(name, mod - 1);
|
||||
}
|
||||
</script>
|
||||
</binding>
|
||||
</mod-up>
|
||||
</button>
|
||||
|
||||
<button n="7"><!-- throttle front -->
|
||||
<desc>Modifier Bit 1</desc>
|
||||
<repeatable type="bool">false</repeatable>
|
||||
<binding>
|
||||
<command>nasal</command>
|
||||
<script>
|
||||
name = "/input/joysticks/js[0]/thrustmaster-top-gun-afterburner-modifier";
|
||||
mod = getprop(name);
|
||||
if (mod == nil) {
|
||||
setprop(name, 2);
|
||||
} elsif (mod == 0 or mod == 1) {
|
||||
setprop(name, mod + 2);
|
||||
}
|
||||
</script>
|
||||
</binding>
|
||||
<mod-up>
|
||||
<binding>
|
||||
<command>nasal</command>
|
||||
<script>
|
||||
name = "/input/joysticks/js[0]/thrustmaster-top-gun-afterburner-modifier";
|
||||
mod = getprop(name);
|
||||
if (mod == nil) {
|
||||
setprop(name, 0);
|
||||
} elsif (mod == 2 or mod == 3) {
|
||||
setprop(name, mod - 2);
|
||||
}
|
||||
</script>
|
||||
</binding>
|
||||
</mod-up>
|
||||
</button>
|
||||
|
||||
<axis n="5"><!-- View Direction Hat -->
|
||||
<desc>View direction; mixture; aileron trim; rudder trim</desc>
|
||||
<number>
|
||||
<unix>4</unix>
|
||||
<mac>5</mac>
|
||||
<windows>6</windows>
|
||||
</number>
|
||||
<low>
|
||||
<repeatable>true</repeatable>
|
||||
<binding>
|
||||
<command>nasal</command>
|
||||
<script>
|
||||
<![CDATA[
|
||||
mod = getprop("/input/joysticks/js[0]/thrustmaster-top-gun-afterburner-modifier");
|
||||
if (mod == nil or mod == 0) {
|
||||
v = getprop("/sim/current-view/view-number");
|
||||
if (v == 0 or v == 4) {
|
||||
view.panViewDir(1);
|
||||
} else {
|
||||
view.panViewDir(-1);
|
||||
}
|
||||
} elsif (mod == 1) {
|
||||
controls.adjMixture(-1);
|
||||
if (getprop("/sim/aero") == "harrier") {
|
||||
thv = getprop("/controls/engines/engine[0]/mixture");
|
||||
thv = int(thv * 120 - 20);
|
||||
gui.popupTip("Thrust vector " ~ thv);
|
||||
}
|
||||
} elsif (mod == 2) {
|
||||
controls.aileronTrim(-0.75);
|
||||
} elsif (mod == 3) {
|
||||
controls.rudderTrim(0.75);
|
||||
}
|
||||
]]>
|
||||
</script>
|
||||
</binding>
|
||||
</low>
|
||||
<high>
|
||||
<repeatable>true</repeatable>
|
||||
<binding>
|
||||
<command>nasal</command>
|
||||
<script>
|
||||
<![CDATA[
|
||||
mod = getprop("/input/joysticks/js[0]/thrustmaster-top-gun-afterburner-modifier");
|
||||
if (mod == nil or mod == 0) {
|
||||
v = getprop("/sim/current-view/view-number");
|
||||
if (v == 0 or v == 4) {
|
||||
view.panViewDir(-1);
|
||||
} else {
|
||||
view.panViewDir(1);
|
||||
}
|
||||
} elsif (mod == 1) {
|
||||
controls.adjMixture(1);
|
||||
if (getprop("/sim/aero") == "harrier") {
|
||||
thv = getprop("/controls/engines/engine[0]/mixture");
|
||||
thv = int(thv * 120 - 20);
|
||||
gui.popupTip("Thrust vector " ~ thv);
|
||||
}
|
||||
} elsif (mod == 2) {
|
||||
controls.aileronTrim(0.75);
|
||||
} elsif (mod == 3) {
|
||||
controls.rudderTrim(-0.75);
|
||||
}
|
||||
]]></script>
|
||||
</binding>
|
||||
</high>
|
||||
</axis>
|
||||
|
||||
<axis>
|
||||
<desc>View direction; prop pitch; elevator trim</desc>
|
||||
<number>
|
||||
<unix>5</unix>
|
||||
<mac>6</mac>
|
||||
<windows>7</windows>
|
||||
</number>
|
||||
<low>
|
||||
<repeatable>true</repeatable>
|
||||
<binding>
|
||||
<command>nasal</command>
|
||||
<script>
|
||||
<![CDATA[
|
||||
mod = getprop("/input/joysticks/js[0]/thrustmaster-top-gun-afterburner-modifier");
|
||||
if (mod == nil or mod == 0) {
|
||||
view.panViewPitch(1);
|
||||
} elsif (mod == 1) {
|
||||
controls.adjPropeller(1);
|
||||
} elsif (mod == 2) {
|
||||
controls.elevatorTrim(0.75);
|
||||
} elsif (mod == 3) {
|
||||
#
|
||||
}
|
||||
]]>
|
||||
</script>
|
||||
</binding>
|
||||
</low>
|
||||
<high>
|
||||
<repeatable>true</repeatable>
|
||||
<binding>
|
||||
<command>nasal</command>
|
||||
<script>
|
||||
<![CDATA[
|
||||
mod = getprop("/input/joysticks/js[0]/thrustmaster-top-gun-afterburner-modifier");
|
||||
if (mod == nil or mod == 0) {
|
||||
view.panViewPitch(-1);
|
||||
} elsif (mod == 1) {
|
||||
controls.adjPropeller(-1);
|
||||
} elsif (mod == 2) {
|
||||
controls.elevatorTrim(-0.75);
|
||||
} elsif (mod == 3) {
|
||||
#
|
||||
}
|
||||
]]>
|
||||
</script>
|
||||
</binding>
|
||||
</high>
|
||||
</axis>
|
||||
|
||||
</PropertyList>
|
|
@ -244,7 +244,7 @@ var dialog = {
|
|||
var odd = 1;
|
||||
foreach (var mp; model.list) {
|
||||
var col = 0;
|
||||
var color = mp.available ? me.fg[odd = !odd] : me.fg[2];
|
||||
var color = mp.node.getNode("model-installed").getValue() ? me.fg[odd = !odd] : me.fg[2];
|
||||
foreach (var column; me.columns) {
|
||||
var p = typeof(column.property) == "func" ? column.property() : column.property;
|
||||
var w = nil;
|
||||
|
@ -261,6 +261,10 @@ var dialog = {
|
|||
}
|
||||
row += 1;
|
||||
}
|
||||
if (me.x != nil)
|
||||
me.dialog.set("x", me.x);
|
||||
if (me.y != nil)
|
||||
me.dialog.set("y", me.y);
|
||||
me.update(me.loopid += 1);
|
||||
fgcommand("dialog-new", me.dialog.prop());
|
||||
fgcommand("dialog-show", me.dialog.prop());
|
||||
|
@ -291,7 +295,7 @@ var dialog = {
|
|||
{
|
||||
# Node with valid position data (and "distance!=nil").
|
||||
n.setValues({
|
||||
"model-short": mp.available ? mp.model : "[" ~ mp.model ~ "]",
|
||||
"model-short": n.getNode("model-installed").getValue() ? mp.model : "[" ~ mp.model ~ "]",
|
||||
"bearing-to": self.course_to(ac),
|
||||
"distance-to-km": distance / 1000.0,
|
||||
"distance-to-nm": distance * M2NM,
|
||||
|
@ -333,6 +337,10 @@ var dialog = {
|
|||
}
|
||||
},
|
||||
close: func {
|
||||
if (me.dialog != nil) {
|
||||
me.x = me.dialog.prop().getNode("x").getValue();
|
||||
me.y = me.dialog.prop().getNode("y").getValue();
|
||||
}
|
||||
fgcommand("dialog-close", me.dialog.prop());
|
||||
},
|
||||
del: func {
|
||||
|
@ -368,8 +376,6 @@ var dialog = {
|
|||
# multiplayer.model.data: hash, key := /ai/models/* path
|
||||
# multiplayer.model.callsign hash, key := callsign
|
||||
# multiplayer.model.list vector, sorted alphabetically (ASCII, case insensitive)
|
||||
# multiplayer.model.available unsorted list of players with available models
|
||||
# multiplayer.model.unavailable unsorted list of players with unavailable models
|
||||
#
|
||||
# All of them contain hash entries of this form:
|
||||
#
|
||||
|
@ -379,7 +385,6 @@ var dialog = {
|
|||
# root: "/ai/models/multiplayer[4]", # root property
|
||||
# node: {...}, # root property as props.Node hash
|
||||
# model: "bo105", # model name (extracted from path)
|
||||
# available: 2, # whether the model is installed (0: not inst, 1: AI, 2: regular)
|
||||
# sort: "bimaus", # callsign in lower case (for sorting)
|
||||
# }
|
||||
#
|
||||
|
@ -407,8 +412,6 @@ var model = {
|
|||
|
||||
me.data = {};
|
||||
me.callsign = {};
|
||||
me.available = [];
|
||||
me.unavailable = [];
|
||||
|
||||
foreach (var n; props.globals.getNode("ai/models", 1).getChildren("multiplayer")) {
|
||||
if (!n.getNode("valid").getValue())
|
||||
|
@ -420,25 +423,16 @@ var model = {
|
|||
continue;
|
||||
|
||||
var path = n.getNode("sim/model/path").getValue();
|
||||
var available = 0;
|
||||
if (io.stat(string.normpath(me.fg_root ~ "AI/" ~ path)) != nil)
|
||||
available = 1;
|
||||
elsif (io.stat(string.normpath(me.fg_root ~ path)) != nil)
|
||||
available = 2;
|
||||
elsif (!contains(me.warned, path))
|
||||
me.warned[path] = print("MP model not installed: " ~ debug._error(path));
|
||||
|
||||
var model = split(".", split("/", path)[-1])[0];
|
||||
model = me.remove_suffix(model, "-model");
|
||||
model = me.remove_suffix(model, "-anim");
|
||||
|
||||
var root = n.getPath();
|
||||
var data = { node: n, callsign: callsign, model: model, root: root,
|
||||
sort: string.lc(callsign), available: available };
|
||||
sort: string.lc(callsign) };
|
||||
|
||||
me.data[root] = data;
|
||||
me.callsign[callsign] = data;
|
||||
append(available ? me.available : me.unavailable, data);
|
||||
}
|
||||
|
||||
me.list = sort(values(me.data), func(a, b) cmp(a.sort, b.sort));
|
||||
|
|
|
@ -1,31 +0,0 @@
|
|||
var set_runway_from_metar_wind = func {
|
||||
if (!getprop("/environment/metar/valid"))
|
||||
return printlog("info", "metar-rwy: no valid metar");
|
||||
if (!getprop("/sim/startup/options/airport"))
|
||||
return printlog("info", "metar-rwy: no airport requested");
|
||||
if (getprop("/sim/startup/options/runway"))
|
||||
return printlog("info", "metar-rwy: won't override explicit runway");
|
||||
if (getprop("/sim/startup/options/heading-deg") < 9990.0)
|
||||
return printlog("info", "metar-rwy: won't override explicit heading");
|
||||
if (!getprop("/sim/presets/onground"))
|
||||
return printlog("info", "metar-rwy: we aren't on ground");
|
||||
if (getprop("/environment/metar/base-wind-speed-kt") < 1)
|
||||
return;
|
||||
|
||||
var from = getprop("/environment/metar/base-wind-range-from");
|
||||
var to = getprop("/environment/metar/base-wind-range-to");
|
||||
var wind_from = (from + to) * 0.5;
|
||||
|
||||
printlog("info", "metar-rwy: setting new target heading ", wind_from);
|
||||
setprop("/sim/presets/heading-deg", wind_from);
|
||||
setprop("/sim/presets/longitude-deg", -9999);
|
||||
setprop("/sim/presets/latitude-deg", -9999);
|
||||
fgcommand("presets-commit");
|
||||
printlog("info", "metar-rwy: selected runway: ", getprop("/sim/atc/runway"));
|
||||
}
|
||||
|
||||
|
||||
_setlistener("/sim/signals/nasal-dir-initialized", func {
|
||||
set_runway_from_metar_wind();
|
||||
delete(globals, "startup");
|
||||
});
|
|
@ -92,9 +92,8 @@ void main (void)
|
|||
//float pam = (map.a * -2) + 1; //reverse map
|
||||
reflFactor = map.a + transparency_offset;
|
||||
} else {
|
||||
// set the reflectivity proportional to shininess with user
|
||||
// input
|
||||
reflFactor = (gl_FrontMaterial.shininess / 128) + transparency_offset;
|
||||
// set the reflectivity proportional to shininess with user input
|
||||
reflFactor = (gl_FrontMaterial.shininess / 128) * ns.a + transparency_offset;
|
||||
}
|
||||
|
||||
reflFactor = clamp(reflFactor, 0.0, 1.0);
|
||||
|
|
|
@ -51,6 +51,11 @@
|
|||
<text>
|
||||
<label>FlightGear Flight Simulator</label>
|
||||
</text>
|
||||
<text>
|
||||
<label>MMMMMMMMMMMMM</label>
|
||||
<format>Version: %s</format>
|
||||
<property>/sim/version/flightgear</property>
|
||||
</text>
|
||||
<text>
|
||||
<label>(c) 1996-2010, the FlightGear contributors</label>
|
||||
</text>
|
||||
|
@ -60,8 +65,35 @@
|
|||
<text>
|
||||
<label>License: GNU General Public License Version 2</label>
|
||||
</text>
|
||||
|
||||
<text>
|
||||
<label>MMMMMMMMMM</label>
|
||||
<format>SimGear Version: %s</format>
|
||||
<property>/sim/version/simgear</property>
|
||||
</text>
|
||||
<text>
|
||||
<label>MMMMMMMMMMMMMMMMMM</label>
|
||||
<format>OpenSceneGraph Version: %s</format>
|
||||
<property>/sim/version/openscenegraph</property>
|
||||
</text>
|
||||
|
||||
<text>
|
||||
<label>MMMMMMMMMMMMMMMMMM</label>
|
||||
<format>Build Id: %s</format>
|
||||
<property>/sim/version/build-id</property>
|
||||
</text>
|
||||
<text>
|
||||
<label>MMMMMM</label>
|
||||
<format>Build Number: %d</format>
|
||||
<property>/sim/version/build-number</property>
|
||||
</text>
|
||||
<text>
|
||||
<label>MMMMMM</label>
|
||||
<format>Revision: %s</format>
|
||||
<property>/sim/version/revision</property>
|
||||
</text>
|
||||
<hrule/>
|
||||
|
||||
|
||||
<group>
|
||||
<layout>hbox</layout>
|
||||
<halign>center</halign>
|
||||
|
|
|
@ -615,12 +615,6 @@
|
|||
<row>1</row>
|
||||
<col>3</col>
|
||||
<pref-width>55</pref-width>
|
||||
<enable>
|
||||
<equals>
|
||||
<property>/sim/gui/dialogs/weather-scenario/state</property>
|
||||
<value type="int">1</value>
|
||||
</equals>
|
||||
</enable>
|
||||
<property>/environment/config/aloft/entry[4]/visibility-m</property>
|
||||
<live>true</live>
|
||||
<binding>
|
||||
|
@ -729,12 +723,6 @@
|
|||
<row>2</row>
|
||||
<col>3</col>
|
||||
<pref-width>55</pref-width>
|
||||
<enable>
|
||||
<equals>
|
||||
<property>/sim/gui/dialogs/weather-scenario/state</property>
|
||||
<value type="int">1</value>
|
||||
</equals>
|
||||
</enable>
|
||||
<property>/environment/config/aloft/entry[3]/visibility-m</property>
|
||||
<live>true</live>
|
||||
<binding>
|
||||
|
@ -843,12 +831,6 @@
|
|||
<row>3</row>
|
||||
<col>3</col>
|
||||
<pref-width>55</pref-width>
|
||||
<enable>
|
||||
<equals>
|
||||
<property>/sim/gui/dialogs/weather-scenario/state</property>
|
||||
<value type="int">1</value>
|
||||
</equals>
|
||||
</enable>
|
||||
<property>/environment/config/aloft/entry[2]/visibility-m</property>
|
||||
<live>true</live>
|
||||
<binding>
|
||||
|
@ -957,12 +939,6 @@
|
|||
<row>4</row>
|
||||
<col>3</col>
|
||||
<pref-width>55</pref-width>
|
||||
<enable>
|
||||
<equals>
|
||||
<property>/sim/gui/dialogs/weather-scenario/state</property>
|
||||
<value type="int">1</value>
|
||||
</equals>
|
||||
</enable>
|
||||
<property>/environment/config/aloft/entry[1]/visibility-m</property>
|
||||
<live>true</live>
|
||||
<binding>
|
||||
|
@ -1512,11 +1488,21 @@
|
|||
<live>false</live>
|
||||
<property>sim/gui/dialogs/weather-scenario/metar</property>
|
||||
<enable>
|
||||
<equals>
|
||||
<property>/sim/gui/dialogs/weather-scenario/state</property>
|
||||
<value type="int">1</value>
|
||||
</equals>
|
||||
<greater-than>
|
||||
<property>/sim/gui/dialogs/weather-scenario/state</property>
|
||||
<value type="int">1</value>
|
||||
</greater-than>>
|
||||
</enable>
|
||||
<binding>
|
||||
<command>dialog-apply</command>
|
||||
<object-name>metar</object-name>
|
||||
</binding>
|
||||
<binding>
|
||||
<command>nasal</command>
|
||||
<script>
|
||||
setprop( "/environment/metar/data", getprop( "sim/gui/dialogs/weather-scenario/metar") );
|
||||
</script>
|
||||
</binding>
|
||||
</textbox>
|
||||
|
||||
<!-- Automatic Weather -->
|
||||
|
@ -1574,7 +1560,7 @@
|
|||
}
|
||||
|
||||
me.scenarioListenerId = setlistener( me.base ~ "/source-selection", func(n) { me.scenarioListener(n); } );
|
||||
me.metarListenerId = setlistener( "environment/metar/valid", func(n) { me.metarListener(n); }, 1, 0 );
|
||||
me.metarListenerId = setlistener( "environment/metar/valid", func(n) { me.metarListener(n); }, 1, 1 );
|
||||
},
|
||||
|
||||
close : func {
|
||||
|
@ -1584,7 +1570,7 @@
|
|||
|
||||
stateChange : func {
|
||||
var scenarioName = getprop( me.base ~ "/source-selection");
|
||||
var metar = nil;
|
||||
var metar = getprop( "environment/metar/data" );
|
||||
if( scenarioName == "Disabled" ) {
|
||||
setprop( "/environment/params/metar-updates-environment", 0 );
|
||||
setprop( "/environment/realwx/enabled", 0 );
|
||||
|
@ -1596,6 +1582,11 @@
|
|||
setprop( "/environment/realwx/enabled", 1 );
|
||||
setprop( "/environment/config/enabled", 1 );
|
||||
me.baseN.getNode("state",1).setIntValue( 0 );
|
||||
} else if( scenarioName == "Manual input" ) {
|
||||
setprop( "/environment/params/metar-updates-environment", 1 );
|
||||
setprop( "/environment/realwx/enabled", 0 );
|
||||
setprop( "/environment/config/enabled", 1 );
|
||||
me.baseN.getNode("state",1).setIntValue( 2 );
|
||||
} else {
|
||||
setprop( "/environment/params/metar-updates-environment", 1 );
|
||||
setprop( "/environment/realwx/enabled", 0 );
|
||||
|
@ -1647,6 +1638,7 @@
|
|||
var metar = getprop("environment/metar/data");
|
||||
if( metar == nil or metar == "" ) metar = "NIL";
|
||||
metar = normalize_string(metar);
|
||||
printlog( "info", "new METAR: " ~ metar );
|
||||
setprop( me.base ~ "/metar", metar );
|
||||
gui.dialog_update( "weather", "metar" );
|
||||
},
|
||||
|
|
|
@ -681,6 +681,13 @@
|
|||
</binding>
|
||||
</item>
|
||||
|
||||
<item>
|
||||
<label>Print Visible Scene Info</label>
|
||||
<binding>
|
||||
<command>print-visible-scene</command>
|
||||
</binding>
|
||||
</item>
|
||||
|
||||
</menu>
|
||||
|
||||
|
||||
|
|
|
@ -28,7 +28,7 @@ Started September 2000 by David Megginson, david@megginson.com
|
|||
<read type="string"/>
|
||||
<write type="string"/>
|
||||
</validate>
|
||||
<use-custom-scenery-data type="bool">false</use-custom-scenery-data>
|
||||
<use-custom-scenery-data type="bool">true</use-custom-scenery-data>
|
||||
</paths>
|
||||
|
||||
<intl include="Translations/locale.xml"/>
|
||||
|
@ -154,8 +154,12 @@ Started September 2000 by David Megginson, david@megginson.com
|
|||
<contrail-shader userarchive="y">0</contrail-shader>
|
||||
<snow-level-m type="double">2000.0</snow-level-m>
|
||||
<quality-level type="double" userarchive="y">0.0</quality-level>
|
||||
|
||||
</rendering>
|
||||
<osg-displaysettings>
|
||||
<eye-separation type="double" userarchive="y">0.05</eye-separation>
|
||||
<screen-distance type="double" userarchive="y">0.5</screen-distance>
|
||||
<stereo-mode type="string" userarchive="y">OFF</stereo-mode>
|
||||
</osg-displaysettings>
|
||||
</rendering>
|
||||
<model-hz type="int">120</model-hz>
|
||||
<navdb>
|
||||
<localizers>
|
||||
|
|