From 0c4b68a8842b572513f3cd9685bb8cc03defc66e Mon Sep 17 00:00:00 2001 From: Stuart Buchanan Date: Sat, 17 Dec 2011 19:12:38 +0000 Subject: [PATCH 1/8] Impostor and geometry changes for 3D clouds. --- Effects/cloud.eff | 4 ---- Shaders/3dcloud.frag | 3 ++- Shaders/3dcloud.vert | 21 ++++++++------------- 3 files changed, 10 insertions(+), 18 deletions(-) diff --git a/Effects/cloud.eff b/Effects/cloud.eff index ee9cce00a..0dc464100 100644 --- a/Effects/cloud.eff +++ b/Effects/cloud.eff @@ -57,10 +57,6 @@ usrAttr2 11 - - usrAttr3 - 12 - baseTexture diff --git a/Shaders/3dcloud.frag b/Shaders/3dcloud.frag index 4222fbfc8..6a6a4a2cf 100644 --- a/Shaders/3dcloud.frag +++ b/Shaders/3dcloud.frag @@ -6,6 +6,7 @@ void main(void) vec4 base = texture2D( baseTexture, gl_TexCoord[0].st); vec4 finalColor = base * gl_Color; gl_FragColor.rgb = mix(gl_Fog.color.rgb, finalColor.rgb, fogFactor ); - gl_FragColor.a = mix(0.0, finalColor.a, fogFactor); + //gl_FragColor.a = mix(0.0, finalColor.a, fogFactor); + gl_FragColor.a = finalColor.a; } diff --git a/Shaders/3dcloud.vert b/Shaders/3dcloud.vert index ab724622e..a650e4d00 100644 --- a/Shaders/3dcloud.vert +++ b/Shaders/3dcloud.vert @@ -7,21 +7,16 @@ uniform float range; // From /sim/rendering/clouds3d-vis-range attribute vec3 usrAttr1; attribute vec3 usrAttr2; -attribute vec3 usrAttr3; -float textureIndexX = usrAttr1.r; -float textureIndexY = usrAttr1.g; -float wScale = usrAttr1.b; -float hScale = usrAttr2.r; -float shade_factor = usrAttr2.g; -float cloud_height = usrAttr2.b; -float bottom_factor = usrAttr3.r; -float middle_factor = usrAttr3.g; -float top_factor = usrAttr3.b; +float shade_factor = usrAttr1.g; +float cloud_height = usrAttr1.b; +float bottom_factor = usrAttr2.r; +float middle_factor = usrAttr2.g; +float top_factor = usrAttr2.b; void main(void) { - gl_TexCoord[0] = gl_MultiTexCoord0 + vec4(textureIndexX, textureIndexY, 0.0, 0.0); + gl_TexCoord[0] = gl_MultiTexCoord0; vec4 ep = gl_ModelViewMatrixInverse * vec4(0.0,0.0,0.0,1.0); vec4 l = gl_ModelViewMatrixInverse * vec4(0.0,0.0,1.0,1.0); vec3 u = normalize(ep.xyz - l.xyz); @@ -36,8 +31,8 @@ void main(void) // scaling in the homogeneous component of pos. gl_Position = vec4(0.0, 0.0, 0.0, 1.0); gl_Position.xyz = gl_Vertex.x * u; - gl_Position.xyz += gl_Vertex.y * r * wScale; - gl_Position.xyz += gl_Vertex.z * w * hScale; + gl_Position.xyz += gl_Vertex.y * r; + gl_Position.xyz += gl_Vertex.z * w; // Apply Z scaling to allow sprites to be squashed in the z-axis gl_Position.z = gl_Position.z * gl_Color.w; From 441b0d7b3085ad96674072bed523c51e3c90f5c6 Mon Sep 17 00:00:00 2001 From: James Turner Date: Tue, 27 Dec 2011 22:56:48 +0000 Subject: [PATCH 2/8] Update atc-frequency dialogs for revised command interface. --- gui/dialogs/atc-freq-search.xml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/gui/dialogs/atc-freq-search.xml b/gui/dialogs/atc-freq-search.xml index c3aab8201..3b64f0a6c 100644 --- a/gui/dialogs/atc-freq-search.xml +++ b/gui/dialogs/atc-freq-search.xml @@ -17,9 +17,8 @@ false ICAO - property-assign - /sim/atc/freq-airport - ICAO + ATC-freq-display + ICAO dialog-close @@ -60,6 +59,9 @@ dialog-apply + + ATC-freq-display + dialog-close From bb2786ce247e6a13b0a4e1a84518e62d7b97023c Mon Sep 17 00:00:00 2001 From: Stuart Buchanan Date: Tue, 27 Dec 2011 23:10:11 +0000 Subject: [PATCH 3/8] Revert "Impostor and geometry changes for 3D clouds." This reverts commit 242d9f6c5655ff96dbc9047a135cc62998ddfcb2. --- Effects/cloud.eff | 4 ++++ Shaders/3dcloud.frag | 3 +-- Shaders/3dcloud.vert | 21 +++++++++++++-------- 3 files changed, 18 insertions(+), 10 deletions(-) diff --git a/Effects/cloud.eff b/Effects/cloud.eff index 0dc464100..ee9cce00a 100644 --- a/Effects/cloud.eff +++ b/Effects/cloud.eff @@ -57,6 +57,10 @@ usrAttr2 11 + + usrAttr3 + 12 + baseTexture diff --git a/Shaders/3dcloud.frag b/Shaders/3dcloud.frag index 6a6a4a2cf..4222fbfc8 100644 --- a/Shaders/3dcloud.frag +++ b/Shaders/3dcloud.frag @@ -6,7 +6,6 @@ void main(void) vec4 base = texture2D( baseTexture, gl_TexCoord[0].st); vec4 finalColor = base * gl_Color; gl_FragColor.rgb = mix(gl_Fog.color.rgb, finalColor.rgb, fogFactor ); - //gl_FragColor.a = mix(0.0, finalColor.a, fogFactor); - gl_FragColor.a = finalColor.a; + gl_FragColor.a = mix(0.0, finalColor.a, fogFactor); } diff --git a/Shaders/3dcloud.vert b/Shaders/3dcloud.vert index a650e4d00..ab724622e 100644 --- a/Shaders/3dcloud.vert +++ b/Shaders/3dcloud.vert @@ -7,16 +7,21 @@ uniform float range; // From /sim/rendering/clouds3d-vis-range attribute vec3 usrAttr1; attribute vec3 usrAttr2; +attribute vec3 usrAttr3; -float shade_factor = usrAttr1.g; -float cloud_height = usrAttr1.b; -float bottom_factor = usrAttr2.r; -float middle_factor = usrAttr2.g; -float top_factor = usrAttr2.b; +float textureIndexX = usrAttr1.r; +float textureIndexY = usrAttr1.g; +float wScale = usrAttr1.b; +float hScale = usrAttr2.r; +float shade_factor = usrAttr2.g; +float cloud_height = usrAttr2.b; +float bottom_factor = usrAttr3.r; +float middle_factor = usrAttr3.g; +float top_factor = usrAttr3.b; void main(void) { - gl_TexCoord[0] = gl_MultiTexCoord0; + gl_TexCoord[0] = gl_MultiTexCoord0 + vec4(textureIndexX, textureIndexY, 0.0, 0.0); vec4 ep = gl_ModelViewMatrixInverse * vec4(0.0,0.0,0.0,1.0); vec4 l = gl_ModelViewMatrixInverse * vec4(0.0,0.0,1.0,1.0); vec3 u = normalize(ep.xyz - l.xyz); @@ -31,8 +36,8 @@ void main(void) // scaling in the homogeneous component of pos. gl_Position = vec4(0.0, 0.0, 0.0, 1.0); gl_Position.xyz = gl_Vertex.x * u; - gl_Position.xyz += gl_Vertex.y * r; - gl_Position.xyz += gl_Vertex.z * w; + gl_Position.xyz += gl_Vertex.y * r * wScale; + gl_Position.xyz += gl_Vertex.z * w * hScale; // Apply Z scaling to allow sprites to be squashed in the z-axis gl_Position.z = gl_Position.z * gl_Color.w; From 3fb129923cfbe5c9c1c032f1629bbc6b2ebd13d7 Mon Sep 17 00:00:00 2001 From: Stuart Buchanan Date: Wed, 28 Dec 2011 09:09:28 +0000 Subject: [PATCH 4/8] Fix for issue 526 - Not possible to restart YASim aircraft after fuel starvation --- Nasal/fuel.nas | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/Nasal/fuel.nas b/Nasal/fuel.nas index 17f554a47..edf28ac0b 100644 --- a/Nasal/fuel.nas +++ b/Nasal/fuel.nas @@ -1,3 +1,6 @@ +# Fuel handling for the YASim FDM. Note that other FDMs (e.g. JSBSim) +# handle fuel within the FDM itself. +# # Properties under /consumables/fuel/tank[n]: # + level-lbs - Current fuel load. Can be set by user code. # + selected - boolean indicating tank selection. @@ -22,9 +25,6 @@ var update = func { fuel.setDoubleValue(0); } - if (!consumed_fuel) - return; - var selected_tanks = []; foreach (var t; tanks) { var cap = t.getNode("capacity-gal_us",0); @@ -71,6 +71,10 @@ var fuel_freeze = nil; _setlistener("/sim/signals/fdm-initialized", func { setlistener("/sim/freeze/fuel", func(n) { fuel_freeze = n.getBoolValue() }, 1); + # Fuel sub-system is only used by YASim. Other FDMs (e.g. JSBSim) + # handle fuel themselves. + if (getprop("/sim/flight-model") != "yasim") { return; } + engines = props.globals.getNode("engines", 1).getChildren("engine"); foreach (var e; engines) { e.getNode("fuel-consumed-lbs", 1).setDoubleValue(0); From f73cd19773f444863e87784803d0c2ba024f3910 Mon Sep 17 00:00:00 2001 From: Stuart Buchanan Date: Wed, 28 Dec 2011 11:55:46 +0000 Subject: [PATCH 5/8] Add additional name for the Black Widow "SL-6640 Black Widow Flightstick" --- Input/Joysticks/SpeedLink/black-widow.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/Input/Joysticks/SpeedLink/black-widow.xml b/Input/Joysticks/SpeedLink/black-widow.xml index 382acbdb8..a0b1c9e08 100644 --- a/Input/Joysticks/SpeedLink/black-widow.xml +++ b/Input/Joysticks/SpeedLink/black-widow.xml @@ -44,6 +44,7 @@ $Id$ Mega World USB Game Controllers SpeedLink SL-6640 Black Widow Flight Stick + SL-6640 Black Widow Flightstick Aileron From c228b7ed378c0c696314292e07298a43102bac28 Mon Sep 17 00:00:00 2001 From: Gijs de Rooy Date: Thu, 29 Dec 2011 13:05:52 +0100 Subject: [PATCH 6/8] Clement: Disable swap and frequency knobs when radio is switched off. --- Aircraft/Instruments-3d/VHF-22/ctl22-com1.xml | 64 +++++++++++++++++-- Aircraft/Instruments-3d/VHF-22/ctl22-com2.xml | 64 +++++++++++++++++-- 2 files changed, 118 insertions(+), 10 deletions(-) diff --git a/Aircraft/Instruments-3d/VHF-22/ctl22-com1.xml b/Aircraft/Instruments-3d/VHF-22/ctl22-com1.xml index 526531869..93be263e7 100644 --- a/Aircraft/Instruments-3d/VHF-22/ctl22-com1.xml +++ b/Aircraft/Instruments-3d/VHF-22/ctl22-com1.xml @@ -254,10 +254,16 @@ Syd Adams false - property-swap - instrumentation/comm/frequencies/selected-mhz - instrumentation/comm/frequencies/standby-mhz - + + + systems/electrical/outputs/comm + 1 + + + property-swap + instrumentation/comm/frequencies/selected-mhz + instrumentation/comm/frequencies/standby-mhz + @@ -346,6 +352,12 @@ Syd Adams true 0.2 + + + systems/electrical/outputs/comm + 1 + + property-adjust instrumentation/comm/frequencies/standby-mhz -0.025 @@ -364,6 +376,12 @@ Syd Adams true 0.2 + + + systems/electrical/outputs/comm + 1 + + property-adjust instrumentation/comm/frequencies/standby-mhz 0.025 @@ -382,6 +400,12 @@ Syd Adams true 0.2 + + + systems/electrical/outputs/comm + 1 + + property-adjust instrumentation/comm/frequencies/standby-mhz -0.025 @@ -400,6 +424,12 @@ Syd Adams true 0.2 + + + systems/electrical/outputs/comm + 1 + + property-adjust instrumentation/comm/frequencies/standby-mhz 0.025 @@ -418,6 +448,12 @@ Syd Adams true 0.2 + + + systems/electrical/outputs/comm + 1 + + property-adjust instrumentation/comm/frequencies/standby-mhz -1.0 @@ -436,6 +472,12 @@ Syd Adams true 0.2 + + + systems/electrical/outputs/comm + 1 + + property-adjust instrumentation/comm/frequencies/standby-mhz 1.0 @@ -454,6 +496,12 @@ Syd Adams true 0.2 + + + systems/electrical/outputs/comm + 1 + + property-adjust instrumentation/comm/frequencies/standby-mhz -1.0 @@ -472,6 +520,12 @@ Syd Adams true 0.2 + + + systems/electrical/outputs/comm + 1 + + property-adjust instrumentation/comm/frequencies/standby-mhz 1.0 @@ -482,4 +536,4 @@ Syd Adams - \ No newline at end of file + diff --git a/Aircraft/Instruments-3d/VHF-22/ctl22-com2.xml b/Aircraft/Instruments-3d/VHF-22/ctl22-com2.xml index efe3c57ce..0a109cbce 100644 --- a/Aircraft/Instruments-3d/VHF-22/ctl22-com2.xml +++ b/Aircraft/Instruments-3d/VHF-22/ctl22-com2.xml @@ -254,10 +254,16 @@ Syd Adams false - property-swap - instrumentation/comm[1]/frequencies/selected-mhz - instrumentation/comm[1]/frequencies/standby-mhz - + + + systems/electrical/outputs/comm[1] + 1 + + + property-swap + instrumentation/comm[1]/frequencies/selected-mhz + instrumentation/comm[1]/frequencies/standby-mhz + @@ -346,6 +352,12 @@ Syd Adams true 0.2 + + + systems/electrical/outputs/comm[1] + 1 + + property-adjust instrumentation/comm[1]/frequencies/standby-mhz -0.025 @@ -364,6 +376,12 @@ Syd Adams true 0.2 + + + systems/electrical/outputs/comm[1] + 1 + + property-adjust instrumentation/comm[1]/frequencies/standby-mhz 0.025 @@ -382,6 +400,12 @@ Syd Adams true 0.2 + + + systems/electrical/outputs/comm[1] + 1 + + property-adjust instrumentation/comm[1]/frequencies/standby-mhz -0.025 @@ -400,6 +424,12 @@ Syd Adams true 0.2 + + + systems/electrical/outputs/comm[1] + 1 + + property-adjust instrumentation/comm[1]/frequencies/standby-mhz 0.025 @@ -418,6 +448,12 @@ Syd Adams true 0.2 + + + systems/electrical/outputs/comm[1] + 1 + + property-adjust instrumentation/comm[1]/frequencies/standby-mhz -1.0 @@ -436,6 +472,12 @@ Syd Adams true 0.2 + + + systems/electrical/outputs/comm[1] + 1 + + property-adjust instrumentation/comm[1]/frequencies/standby-mhz 1.0 @@ -454,6 +496,12 @@ Syd Adams true 0.2 + + + systems/electrical/outputs/comm[1] + 1 + + property-adjust instrumentation/comm[1]/frequencies/standby-mhz -1.0 @@ -472,6 +520,12 @@ Syd Adams true 0.2 + + + systems/electrical/outputs/comm[1] + 1 + + property-adjust instrumentation/comm[1]/frequencies/standby-mhz 1.0 @@ -482,4 +536,4 @@ Syd Adams - \ No newline at end of file + From ae5d1ca832ff9b4317d0bf373b6f156ca6a5e161 Mon Sep 17 00:00:00 2001 From: ThorstenB Date: Thu, 29 Dec 2011 14:50:49 +0100 Subject: [PATCH 7/8] Prepare about dialog for 2.6.0 @ 2012 --- gui/dialogs/about.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gui/dialogs/about.xml b/gui/dialogs/about.xml index 0a3764dee..0886cc404 100644 --- a/gui/dialogs/about.xml +++ b/gui/dialogs/about.xml @@ -74,7 +74,7 @@ - + From b22622a07e4bdb2401c42ddeb27e5e63c7706758 Mon Sep 17 00:00:00 2001 From: Gijs de Rooy Date: Thu, 29 Dec 2011 17:02:33 +0100 Subject: [PATCH 8/8] Taxiing tutorial: C172P does not move with throttle near idle. --- Aircraft/c172p/Tutorials/taxiing.xml | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/Aircraft/c172p/Tutorials/taxiing.xml b/Aircraft/c172p/Tutorials/taxiing.xml index aedcf15c9..e611d138a 100644 --- a/Aircraft/c172p/Tutorials/taxiing.xml +++ b/Aircraft/c172p/Tutorials/taxiing.xml @@ -103,10 +103,10 @@ For more information on taxiing, see Section 2-9 of the FAA Airplane Flying Hand /controls/engines/engine/starter false - I've already started the engine. Press Shift-B to release the parking brake, allow the aircraft - to move forward slightly, then hold b to check that the normal brakes work. + I've already started the engine. Press Shift-B to release the parking brake. Throttle up to about + 20% to move forward slightly, then hold b to check that the normal brakes work. - Apply the brakes by pressing b + Apply the brakes by pressing b. @@ -133,6 +133,21 @@ For more information on taxiing, see Section 2-9 of the FAA Airplane Flying Hand + + Throttle up to about 20% to move forward slightly. + + + + /controls/gear/brake-parking + 0 + + + /controls/engines/engine/throttle + 0.15 + + + +