diff -Nru flightgear-data-2020.4.0~10216+gitd3f0a87f9+dfsg/debian/changelog flightgear-data-2020.4.0~10219+gitaef16be4f+dfsg/debian/changelog --- flightgear-data-2020.4.0~10216+gitd3f0a87f9+dfsg/debian/changelog 2022-11-20 01:01:00.000000000 +0000 +++ flightgear-data-2020.4.0~10219+gitaef16be4f+dfsg/debian/changelog 2022-11-27 01:01:03.000000000 +0000 @@ -1,3 +1,16 @@ +flightgear-data (1:2020.4.0~10219+gitaef16be4f+dfsg-0ubuntu1~ppa1) jammy; urgency=low + + [ Hans Kunkell ] + * Phi: Fix runways and comms in leaflet popups + + [ Stuart Buchanan ] + * WS30: Water texture for photoscenery + + [ James Turner ] + * Revert "Add option to read upper winds from simbrief" + + -- Saikrishna Arcot Sat, 26 Nov 2022 17:01:03 -0800 + flightgear-data (1:2020.4.0~10216+gitd3f0a87f9+dfsg-0ubuntu1~ppa1) jammy; urgency=low [ Josh Davidson ] diff -Nru flightgear-data-2020.4.0~10216+gitd3f0a87f9+dfsg/defaults.xml flightgear-data-2020.4.0~10219+gitaef16be4f+dfsg/defaults.xml --- flightgear-data-2020.4.0~10216+gitd3f0a87f9+dfsg/defaults.xml 2022-11-13 01:00:59.000000000 +0000 +++ flightgear-data-2020.4.0~10219+gitaef16be4f+dfsg/defaults.xml 2022-11-27 01:01:02.000000000 +0000 @@ -1572,7 +1572,6 @@ false - false diff -Nru flightgear-data-2020.4.0~10216+gitd3f0a87f9+dfsg/Effects/ws30.eff flightgear-data-2020.4.0~10219+gitaef16be4f+dfsg/Effects/ws30.eff --- flightgear-data-2020.4.0~10216+gitd3f0a87f9+dfsg/Effects/ws30.eff 2022-08-22 01:32:45.000000000 +0000 +++ flightgear-data-2020.4.0~10219+gitaef16be4f+dfsg/Effects/ws30.eff 2022-11-27 01:01:02.000000000 +0000 @@ -299,6 +299,8 @@ texture[6]/internal-format + + 8 texture[8]/image @@ -1266,6 +1268,11 @@ sampler-2d 6 + + coastline + sampler-2d + 7 + swatch_size int diff -Nru flightgear-data-2020.4.0~10216+gitd3f0a87f9+dfsg/gui/dialogs/local_weather_winds.xml flightgear-data-2020.4.0~10219+gitaef16be4f+dfsg/gui/dialogs/local_weather_winds.xml --- flightgear-data-2020.4.0~10216+gitd3f0a87f9+dfsg/gui/dialogs/local_weather_winds.xml 2022-08-22 01:32:52.000000000 +0000 +++ flightgear-data-2020.4.0~10219+gitaef16be4f+dfsg/gui/dialogs/local_weather_winds.xml 2022-11-27 01:01:02.000000000 +0000 @@ -286,94 +286,6 @@ - vbox - left - - - hbox - left - - - - - - - - 1.0 - 0.0 - 0.0 - - - - /local-weather/config/wind-model - aloft waypoints - - - - - - - hbox - left - - - - - - - 150 - /nasal/local_weather/simbrief_alias - - - /local-weather/config/wind-model - aloft waypoints - - - - - - - - - - - /sim/gui/dialogs/weather/simbrief-loaded - - - - - - true - /sim/gui/dialogs/weather/simbrief-last-flight - - /sim/gui/dialogs/weather/simbrief-loaded - - - - - - - - - hbox left @@ -414,7 +326,6 @@ diff -Nru flightgear-data-2020.4.0~10216+gitd3f0a87f9+dfsg/Nasal/local_weather/local_weather.nas flightgear-data-2020.4.0~10219+gitaef16be4f+dfsg/Nasal/local_weather/local_weather.nas --- flightgear-data-2020.4.0~10216+gitd3f0a87f9+dfsg/Nasal/local_weather/local_weather.nas 2022-10-30 00:00:04.000000000 +0000 +++ flightgear-data-2020.4.0~10219+gitaef16be4f+dfsg/Nasal/local_weather/local_weather.nas 2022-11-27 01:01:02.000000000 +0000 @@ -3444,11 +3444,6 @@ var set_wind_ipoint_metar = func (lat, lon, d0, v0) { -if (getprop("/sim/gui/dialogs/weather/simbrief-loaded")) { - # METAR winds should not interfere with simbrief winds - return; -} - # insert a plausible pattern of aloft winds based on ground info @@ -3693,92 +3688,6 @@ } -var load_simbrief_weather_from_xml = func { - setprop("/sim/gui/dialogs/weather/simbrief-loaded", "true"); - - # Clear existing wind data (e.g. from metar mode) - windIpointArray = []; - - var file = getprop("/sim/fg-home") ~ "/Export/weater_simbrief.xml"; - - var node = io.readxml(file); - var ofp = node.getChild("OFP"); - - # Read departure/arrival - var departure = ofp.getChild("origin").getChild("icao_code").getValue(); - var arrival = ofp.getChild("destination").getChild("icao_code").getValue(); - - var fixes = ofp.getChild("navlog").getChildren(); - - foreach (var fix; fixes) { - var lat = fix.getChild("pos_lat").getValue(); - var lon = fix.getChild("pos_long").getValue(); - - var wind_data = []; - - var winds = fix.getChild("wind_data").getChildren(); - foreach (var windlevel; winds) { - var level_wind = { altitude: windlevel.getChild("altitude").getValue(), - wind_dir: windlevel.getChild("wind_dir").getValue(), - wind_spd: windlevel.getChild("wind_spd").getValue()}; - append(wind_data, level_wind); - } - - assert(wind_data[0].altitude == 0); - var d0 = wind_data[0].wind_dir; - var v0 = wind_data[0].wind_spd; - - assert(wind_data[1].altitude == 5000); - var d1 = wind_data[1].wind_dir; - var v1 = wind_data[1].wind_spd; - - assert(wind_data[2].altitude == 10000); - var d2 = wind_data[2].wind_dir; - var v2 = wind_data[2].wind_spd; - - assert(wind_data[4].altitude == 18000); - var d3 = wind_data[4].wind_dir; - var v3 = wind_data[4].wind_spd; - - assert(wind_data[5].altitude == 24000); - var d4 = wind_data[5].wind_dir; - var v4 = wind_data[5].wind_spd; - - assert(wind_data[6].altitude == 30000); - var d5 = wind_data[6].wind_dir; - var v5 = wind_data[6].wind_spd; - - assert(wind_data[7].altitude == 34000); - var d6 = wind_data[7].wind_dir; - var v6 = wind_data[7].wind_spd; - - assert(wind_data[8].altitude == 39000); - var d7 = wind_data[8].wind_dir; - var v7 = wind_data[8].wind_spd; - - assert(wind_data[9].altitude == 45000); - var d8 = wind_data[9].wind_dir; - var v8 = wind_data[9].wind_spd; - - set_wind_ipoint(lat, lon, d0, v0, d1, v1, d2, v2, d3, v3, d4, v4, d5, v5, d6, v6, d7, v7, d8, v8); - - if (wind_model_flag == 5) { - setprop(lwi~"ipoint-number", getprop(lwi~"ipoint-number") + 1); - } - } - - setprop("/sim/gui/dialogs/weather/simbrief-last-flight", departure ~ " - " ~ arrival); -} - -var load_simbrief_weather = func { - var alias = getprop("/nasal/local_weather/simbrief_alias"); - - # Thanks to https://github.com/legoboyvdlp/A320-family/blob/65f354ee5fbd944d836a41e54efba854389059f4/Nasal/FMGC/SimbriefParser.nas#L16 - http.save("https://www.simbrief.com/api/xml.fetcher.php?username=" ~ alias, getprop("/sim/fg-home") ~ "/Export/weater_simbrief.xml") - .done(func { - load_simbrief_weather_from_xml(); - }); -} var set_aloft_wrapper = func { diff -Nru flightgear-data-2020.4.0~10216+gitd3f0a87f9+dfsg/Phi/topics/Map/NavdbLayer.js flightgear-data-2020.4.0~10219+gitaef16be4f+dfsg/Phi/topics/Map/NavdbLayer.js --- flightgear-data-2020.4.0~10216+gitd3f0a87f9+dfsg/Phi/topics/Map/NavdbLayer.js 2022-08-22 01:32:47.000000000 +0000 +++ flightgear-data-2020.4.0~10219+gitaef16be4f+dfsg/Phi/topics/Map/NavdbLayer.js 2022-11-27 01:01:02.000000000 +0000 @@ -49,8 +49,27 @@ onEachFeature : function(feature, layer) { if (feature.properties) { var popupString = ''; diff -Nru flightgear-data-2020.4.0~10216+gitd3f0a87f9+dfsg/Shaders/ws30-ALS-detailed.frag flightgear-data-2020.4.0~10219+gitaef16be4f+dfsg/Shaders/ws30-ALS-detailed.frag --- flightgear-data-2020.4.0~10216+gitd3f0a87f9+dfsg/Shaders/ws30-ALS-detailed.frag 2022-08-22 01:32:47.000000000 +0000 +++ flightgear-data-2020.4.0~10219+gitaef16be4f+dfsg/Shaders/ws30-ALS-detailed.frag 2022-11-27 01:01:02.000000000 +0000 @@ -99,6 +99,9 @@ uniform mat4 fg_zUpTransform; uniform vec3 fg_modelOffset; +// Coastline texture - generated from VPBTechnique +uniform sampler2D coastline; + const float EarthRadius = 5800000.0; const float terminator_width = 200000.0; @@ -316,7 +319,7 @@ // Mix factor of base textures for 2 neighbour landclass(es) vec4 mfact; - + bool water = false; // Partial derivatives of s and t of ground texture coords for this fragment, // with respect to window (screen space) x and y axes. @@ -330,12 +333,14 @@ if (fg_photoScenery) { texel = texture(landclass, vec2(gl_TexCoord[0].s, 1.0 - gl_TexCoord[0].t)); + water = (texture(coastline, vec2(tile_coord.s, tile_coord.t)).r > 0.1); } else { // Lookup the base texture texel for this fragment and any neighbors, with mixing texel = get_mixed_texel(0, ground_tex_coord, lc, num_unique_neighbors, lc_n, mfact, dxdy_gc); + water = texture(landclass, vec2(tile_coord.s, tile_coord.t)).z > 0.9; } - if ((water_shader == 1) && (fg_photoScenery == false) && fg_materialParams3[lc].x > 0.5) { + if ((water_shader == 1) && water) { // This is a water fragment, so calculate the fragment color procedurally fragColor = generateWaterTexel(); fragColor.rgb += getClusteredLightsContribution(eyePos.xyz, n, fragColor.rgb); diff -Nru flightgear-data-2020.4.0~10216+gitd3f0a87f9+dfsg/Shaders/ws30-ALS-ultra.frag flightgear-data-2020.4.0~10219+gitaef16be4f+dfsg/Shaders/ws30-ALS-ultra.frag --- flightgear-data-2020.4.0~10216+gitd3f0a87f9+dfsg/Shaders/ws30-ALS-ultra.frag 2022-10-30 00:00:04.000000000 +0000 +++ flightgear-data-2020.4.0~10219+gitaef16be4f+dfsg/Shaders/ws30-ALS-ultra.frag 2022-11-27 01:01:02.000000000 +0000 @@ -416,6 +416,8 @@ // Mix factor of base textures for 2 neighbour landclass(es) vec4 mfact; + + bool water = false; // Partial derivatives of s and t of ground texture coords for this fragment, // with respect to window (screen space) x and y axes. @@ -428,16 +430,18 @@ get_material(lc, ground_tex_coord, dxdy_gc, mat_shininess, mat_ambient, mat_diffuse, mat_specular, dxdy, st); if (fg_photoScenery) { - // The photoscenery orthophots are stored in the landclass texture + // The photoscenery orthophotos are stored in the landclass texture // and use normalised tile coordinates texel = texture(landclass, vec2(tile_coord.s, 1.0 - tile_coord.t)); - + water = (texture(coastline, vec2(tile_coord.s, tile_coord.t)).r > 0.1); + // Do not attempt any mixing flag = 0; mix_flag = 0; } else { // Lookup the base texture texel for this fragment and any neighbors, with mixing texel = get_mixed_texel(0, ground_tex_coord, lc, num_unique_neighbors, lc_n, mfact, dxdy_gc); + water = texture(landclass, vec2(tile_coord.s, tile_coord.t)).z > 0.9; } vec4 color = gl_Color * mat_ambient; @@ -459,7 +463,7 @@ fragColor = mix(generateWaterTexel(), texel, smoothstep(0.1,0.9,(coast.b + coast.a) / steepness)); //fragColor = mix(texel, generateWaterTexel(), smoothstep(waterline_min_steepness,waterline_max_steepness,steepness)); fragColor.rgb += getClusteredLightsContribution(ecPosition.xyz, n, fragColor.rgb); - } else if ((water_shader == 1) && (fg_photoScenery == false) && (fg_materialParams3[lc].x > 0.5)) { + } else if (water) { // This is a water fragment, so calculate the fragment color procedurally // and mix with some sand and cliff colour depending on steepness //vec4 steep_texel = lookup_ground_texture_array(2, ground_tex_coord, lc, dxdy_gc); // Uses the same index as the gradient texture, which it is @@ -470,7 +474,7 @@ // texel = mix(steep_texel, beach_texel, smoothstep(waterline_max_steepness - 0.1, waterline_max_steepness - 0.03, steepness)); // Mix from the beach into the water, which produces a pleasing translucent shallow water effect. - //fragColor = mix(texel, generateWaterTexel(), smoothstep(waterline_min_steepness,waterline_max_steepness,steepness)); + //fragColor = mix(texel, generateWaterTexel(), smoothstep(0.3,1.0,texture(coastline, vec2(tile_coord.s, tile_coord.t)).r)); fragColor = generateWaterTexel(); fragColor.rgb += getClusteredLightsContribution(ecPosition.xyz, n, fragColor.rgb); } else {