Merge branch 'master' of D:\Git_New\fgdata
This commit is contained in:
commit
2501e4e95f
5 changed files with 39 additions and 11 deletions
|
@ -270,7 +270,7 @@ var lowpass = {
|
|||
me.value = v;
|
||||
},
|
||||
_filter_: func(v) {
|
||||
var dt = getprop("/sim/time/delta-sec");
|
||||
var dt = getprop("/sim/time/delta-sec")*getprop("/sim/speed-up");
|
||||
var c = dt / (me.coeff + dt);
|
||||
me.value = v * c + me.value * (1 - c);
|
||||
},
|
||||
|
@ -788,12 +788,31 @@ var autotrim = {
|
|||
# var tyresmoke_0 = aircraft.tyresmoke.new(0);
|
||||
# tyresmoke_0.update();
|
||||
#
|
||||
# PARAMETERS:
|
||||
#
|
||||
# number: index of gear to be animated, i.e. "2" for /gear/gear[2]/...
|
||||
#
|
||||
# auto: 1 when tyresmoke should start on update loop. 0 when you're going
|
||||
# to call the update method from one of your own loops.
|
||||
#
|
||||
# diff_norm: value adjusting the necessary percental change of roll-speed
|
||||
# to trigger tyre smoke. Default value is 0.05. More realistic results can
|
||||
# be achieved with significantly higher values (i.e. use 0.8).
|
||||
#
|
||||
# check_vspeed: 1 when tyre smoke should only be triggered when vspeed is negative
|
||||
# (usually doesn't work for all gear, since vspeed=0.0 after the first gear touches
|
||||
# ground). Use 0 to make tyre smoke independent of vspeed.
|
||||
# Note: in reality, tyre smoke doesn't depend on vspeed, but only on acceleration
|
||||
# and friction.
|
||||
#
|
||||
|
||||
var tyresmoke = {
|
||||
new: func(number, auto = 0) {
|
||||
new: func(number, auto = 0, diff_norm = 0.05, check_vspeed=1) {
|
||||
var m = { parents: [tyresmoke] };
|
||||
me.vertical_speed = props.globals.initNode("velocities/vertical-speed-fps");
|
||||
me.speed = props.globals.initNode("velocities/groundspeed-kt");
|
||||
me.rain = props.globals.initNode("environment/metar/rain-norm");
|
||||
m.vertical_speed = (!check_vspeed) ? nil : props.globals.initNode("velocities/vertical-speed-fps");
|
||||
m.diff_norm = diff_norm;
|
||||
m.speed = props.globals.initNode("velocities/groundspeed-kt");
|
||||
m.rain = props.globals.initNode("environment/metar/rain-norm");
|
||||
|
||||
var gear = props.globals.getNode("gear/gear[" ~ number ~ "]/");
|
||||
m.wow = gear.initNode("wow");
|
||||
|
@ -827,7 +846,7 @@ var tyresmoke = {
|
|||
},
|
||||
update: func {
|
||||
var rollspeed = me.get_rollspeed();
|
||||
var vert_speed = me.vertical_speed.getValue();
|
||||
var vert_speed = (me.vertical_speed) ? me.vertical_speed.getValue() : -999;
|
||||
var groundspeed = me.speed.getValue();
|
||||
var friction_factor = me.friction_factor.getValue();
|
||||
var wow = me.wow.getValue();
|
||||
|
@ -837,7 +856,8 @@ var tyresmoke = {
|
|||
var diff = math.abs(rollspeed - filtered_rollspeed);
|
||||
var diff_norm = diff > 0 ? diff / rollspeed : 0;
|
||||
|
||||
if (wow and vert_speed < -1.2 and diff_norm > 0.05
|
||||
if (wow and vert_speed < -1.2
|
||||
and diff_norm > me.diff_norm
|
||||
and friction_factor > 0.7 and groundspeed > 50
|
||||
and rain < 0.20) {
|
||||
me.tyresmoke.setValue(1);
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
# ---------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
var step_interval = 5; # time between tutorial steps
|
||||
var exit_interval = 1; # time between fulfillment of a step and the start of the next step
|
||||
var step_interval = 0.0; # time between tutorial steps (default is set below)
|
||||
var exit_interval = 0.0; # time between fulfillment of a step and the start of the next step (default is set below)
|
||||
|
||||
var loop_id = 0;
|
||||
var tutorialN = nil;
|
||||
|
@ -67,8 +67,8 @@ var startTutorial = func {
|
|||
last_step_time = time_elapsedN.getValue();
|
||||
steps = tutorialN.getChildren("step");
|
||||
|
||||
step_interval = read_double(tutorialN, "step-time", step_interval);
|
||||
exit_interval = read_double(tutorialN, "exit-time", exit_interval);
|
||||
step_interval = read_double(tutorialN, "step-time", 5.0); # time between tutorial steps
|
||||
exit_interval = read_double(tutorialN, "exit-time", 1.0); # time between fulfillment of steps
|
||||
run_nasal(tutorialN);
|
||||
set_models(tutorialN.getNode("models"));
|
||||
|
||||
|
|
|
@ -225,6 +225,7 @@
|
|||
<enable-skyblend-desc>Enable sky blending</enable-skyblend-desc>
|
||||
<disable-textures-desc>Disable textures</disable-textures-desc>
|
||||
<enable-textures-desc>Enable textures</enable-textures-desc>
|
||||
<materials-file-desc>Specify the materials file used to render the scenery (default: materials.xml)</materials-file-desc>
|
||||
<texture-filtering-desc>Anisotropic Texture Filtering: values should be 1 (default),2,4,8 or 16</texture-filtering-desc>
|
||||
<disable-wireframe-desc>Disable wireframe drawing mode</disable-wireframe-desc>
|
||||
<enable-wireframe-desc>Enable wireframe drawing mode</enable-wireframe-desc>
|
||||
|
|
|
@ -452,6 +452,12 @@
|
|||
<description>strings/enable-textures-desc</description>
|
||||
</option>
|
||||
|
||||
<option>
|
||||
<name>materials-file</name>
|
||||
<arg>file</arg>
|
||||
<description>strings/materials-file-desc</description>
|
||||
</option>
|
||||
|
||||
<option>
|
||||
<name>texture-filtering</name>
|
||||
<arg>value</arg>
|
||||
|
|
|
@ -714,6 +714,7 @@ Started September 2000 by David Megginson, david@megginson.com
|
|||
<ai>
|
||||
<enabled type="bool">true</enabled>
|
||||
<scenario>nimitz_demo</scenario>
|
||||
<groundnet-cache type="bool">true</groundnet-cache>
|
||||
<!-- <scenario>balloon_demo</scenario> -->
|
||||
<!-- <scenario>aircraft_demo</scenario> -->
|
||||
<!-- <scenario>refueling_demo</scenario> -->
|
||||
|
|
Loading…
Reference in a new issue