Special Aircraft Service

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 [2] 3 4 5 6   Go Down

Author Topic: Christmas project :- weather  (Read 19080 times)

0 Members and 1 Guest are viewing this topic.

Stainless

  • moderator
  • member
  • Offline Offline
  • Posts: 1534
Re: Christmas project :- weather
« Reply #12 on: December 24, 2015, 04:26:15 AM »

First stage working.

You can place local maxima and minima (high and low pressure zones) and the app computes a fairly realistic pressure map.

From the isobars in this map, flying conditions would be ......  challenging.



Logged

Koty

  • Mr. MiG
  • Modder
  • member
  • Offline Offline
  • Posts: 2274
  • It's a MiG!
Re: Christmas project :- weather
« Reply #13 on: December 25, 2015, 05:29:51 AM »

500 to 1100? Yep, challanging indeed. (It does induce wind, right?)

Now try working on clouds and thermals - if you have speciffied the zones for them to happen - with lower pressure they are stronger and vice versa with high pressure (but you might already know). Above those zones low clouds (150 - 600 m) of small size are created. ;)

Keep up the good work :)
Logged
If I don't have to do it, I won't. If I have to do it, I'll make it quick.

Zoran395

  • Mapper
  • member
  • Offline Offline
  • Posts: 355
Re: Christmas project :- weather
« Reply #14 on: December 25, 2015, 06:36:23 AM »

Very interesting indeed!

I am a fan of realistic meteorological situations, in particular seasonal variations.

Funny enough I am working on a mission/campaign conversion script which has:

Code: [Select]
# From the .properties file, returns "Moderate", "Light" or "High" for setting meteorological conditions
WindDescription=`grep -i 'nWeather: ' "Temp_${prop}" | cut -d ' ' -f 7`
# Generates a random windspeed in m/s, within the range defined by the $windstrength. Ranges are bases on modern data
case $WindDescription in
[Ll]ight) WindSpeed=`shuf -i 10-29 -n 1 | sed 's/^\(.\{1\}\)/\1./'`;Gust=`shuf -i 1-5 -n 1`;Turbulence=`shuf -i 1-5 -n 1`;;
[Mm]oderate) WindSpeed=`shuf -i 30-49 -n 1 | sed 's/^\(.\{1\}\)/\1./'`;Gust=`shuf -i 1-8 -n 1`;Turbulence=`shuf -i 1-8 -n 1`;;
[Hh]igh) WindSpeed=`shuf -i 50-80 -n 1 | sed 's/^\(.\{1\}\)/\1./'`;Gust=`shuf -i 1-10 -n 1`;Turbulence=`shuf -i 1-10 -n 1`;;
esac
# Generates a random wind direction based on meteorological data.
# Angles in the array reflect the distribution pattern of wind direction in the Leningrad area (modern data used)
WindDirectionData=("255.0 Westerly" "270.0 Westerly" "275.0 Westerly" "260.0 Westerly" "265.0 Westerly" "280.0 Westerly" "282.0 Westerly" "285.0 Westerly" "90.0 Easterly" "92.0 Easterly" "95.0 Easterly" "100.0 Easterly" "85.0 Easterly" "80.0 Easterly" "180.0 Southerly" "182.0 Southerly" "185.0 Southerly" "190.0 Southerly" "175.0 Southerly" "170.0 Southerly" "225.0 South Westerly" "227.0 South Westerly" "230.0 South Westerly" "220.0 South Westerly" "235.0 South Westerly" "140.0 South Easterly" "137.0 South Easterly" "135.0 South Easterly" "130.0 South Easterly" "310.0 North Westerly" "317.0 North Westerly" "315.0 North Westerly" "320.0 North Westerly" "360.0 Northerly" "358.0 Northerly" "45.0 North Easterly" "50.0 North Easterly")
# Picks a value in the array
WindDirectionDataSelected=${WindDirectionData[$RANDOM % ${#WindDirectionData[@]} ]}
# Assigns angular value to the variable $WindDirection
WindDirection=${WindDirectionDataSelected%% *}
# Assigns string value to the variable $WindOrientation for use in mission briefing
WindOrientation=${WindDirectionDataSelected#* }
# Appends the generated meteorological data to the final outfile
printf "%s\n" [WEATHER] "  WindDirection ${WindDirection}" "  WindSpeed ${WindSpeed}" "  Gust ${Gust}" "  Turbulence ${Turbulence}"  >> $targ

Lots of fun as you can see!
All the best for your project  :)
Logged

Stainless

  • moderator
  • member
  • Offline Offline
  • Posts: 1534
Re: Christmas project :- weather
« Reply #15 on: December 26, 2015, 02:29:12 AM »

You can also combine this data with the location based atmospheric data to give winter / summer / day / night / latitude / longitude based variations.

The next stage is to generate a wind map.

It's actually counter-intuitive. You would think that the wind goes from high pressure to low pressure, it doesn't. It goes along the isobars.

With a wind map in place you can do things like detect up-drafts caused by low level air packets striking steep terrain.

I need to do some more research into micro-bursts and down drafts before I can add them,(any helpers?)  but we are getting there.
Logged

Stainless

  • moderator
  • member
  • Offline Offline
  • Posts: 1534
Re: Christmas project :- weather
« Reply #16 on: January 01, 2016, 12:41:13 PM »

Okay I have pressure gradient encoded now, a precursor for the wind calculation.

Encoded as a 2D vector. Red is x , green is y.



Logged

SAS~Tom2

  • SAS Honourable Member
  • member
  • Offline Offline
  • Posts: 7954
  • no sweat
Re: Christmas project :- weather
« Reply #17 on: January 01, 2016, 01:52:25 PM »

Mighty impressive Sir! 
Logged

PapaG39

  • Supporter
  • member
  • Offline Offline
  • Posts: 342
Re: Christmas project :- weather
« Reply #18 on: January 01, 2016, 04:38:24 PM »

Ha ha..Pardner I think you have really bitten off a big bite there...

I can remember flying the bush in Alaska where I could be at 1000 ft holding a 15 degree right crab, and look down at the snow blowing
from the opposite direction and changing directions whereby it looked like a large snake slithering across the tundra.

Flying across the hills the altimeter would read different altitudes from one side of a hill to the next side..

Weather can be a big factor & i'm wondering if we are ready to throw something like that in the il2 frey...ha ha
could be interesting though...Better send everyone out for an instrument rating though me thinks...ha ha

Have fun though...
Logged
A Pilots Prayer:  "May you not run out of airspeed, altitude and ideas all at the same time".

SAS~Tom2

  • SAS Honourable Member
  • member
  • Offline Offline
  • Posts: 7954
  • no sweat
Re: Christmas project :- weather
« Reply #19 on: January 01, 2016, 07:31:43 PM »

An excellent (almost) freeware sim with a superb weather engine would be the latest Falcon BMS4.33...

In theory, you can built your own weather there by checking reallife weather and building it into a mission.
Also even the default mission section is mighty powerful with regard to weather, you can fly from sunny to fair to inclement with all sorts of settings within one single mission. You have also multiple cloud layers and diverse turbulence settings. ..weather setup allows more settings than I could comprehend so far.



Maybe worth a check.
Logged

Stainless

  • moderator
  • member
  • Offline Offline
  • Posts: 1534
Re: Christmas project :- weather
« Reply #20 on: January 02, 2016, 03:57:14 AM »

The idea of this is that it's a simple approximation to a very , very complex problem, but it has real effect on the flying experience.

So my existing atmospheric code will be modified to include the new information this code provides.

So the atmospheric variables used in the simulation will be modified by the local weather conditions. This will then automatically effect things like propeller and engine efficiency, pressure based altimeters, jet engine efficiency, fuel use, damn anywhere pressure and temperature are used in an equation.

Then I can easily use the terrain to modify the velocity of the air, producing updrafts and downdrafts.

So now I have a simple approximation to the atmosphere in three dimensions.

AND it actually effects the pilot experience.

Then I can start simulating other more ephemeral effects. Icing, misting, contrails, etc.

As long as there are 36 hours per day and I don't have a life.  :D

 
Logged

Stainless

  • moderator
  • member
  • Offline Offline
  • Posts: 1534
Re: Christmas project :- weather
« Reply #21 on: January 02, 2016, 05:39:31 AM »

Wind speed computed. Assuming northern hemisphere for the moment, that will change.

Suprised me that the wind direction isn't at 90 degrees to the isobars, but turns out that is correct. Funny how detail comes out of simple code.



Logged

Koty

  • Mr. MiG
  • Modder
  • member
  • Offline Offline
  • Posts: 2274
  • It's a MiG!
Re: Christmas project :- weather
« Reply #22 on: January 02, 2016, 01:53:54 PM »

Awesome!!
...just...
AWESOME!!

keep it up :)
Logged
If I don't have to do it, I won't. If I have to do it, I'll make it quick.

Plowshare

  • Modder
  • member
  • Offline Offline
  • Posts: 639
Re: Christmas project :- weather
« Reply #23 on: January 02, 2016, 02:21:14 PM »

Stainless:

Unless I'm missing something aren't the winds blowing from the wrong direction for the northern hemisphere? Wind blows in a counterclockwise, or anticlockwise, direction in to a low and clockwise out from a high. Your graphics show what it would look like in the southern hemisphere. I think.

Bob
Logged
Pages: 1 [2] 3 4 5 6   Go Up
 

Page created in 0.031 seconds with 24 queries.