Make random wind a little less extreme.
This commit is contained in:
parent
56a0477f76
commit
e35e54b8c9
1 changed files with 5 additions and 5 deletions
|
@ -556,7 +556,7 @@ setup_wind (double min_hdg, double max_hdg, double speed, double gust)
|
||||||
min_hdg += 10;
|
min_hdg += 10;
|
||||||
if (min_hdg > 360)
|
if (min_hdg > 360)
|
||||||
min_hdg -= 360;
|
min_hdg -= 360;
|
||||||
speed *= 1.2;
|
speed *= 1.1;
|
||||||
fgSetDouble("/environment/config/boundary/entry[1]/wind-from-heading-deg",
|
fgSetDouble("/environment/config/boundary/entry[1]/wind-from-heading-deg",
|
||||||
min_hdg);
|
min_hdg);
|
||||||
fgSetDouble("/environment/config/boundary/entry[1]/wind-speed-kt",
|
fgSetDouble("/environment/config/boundary/entry[1]/wind-speed-kt",
|
||||||
|
@ -565,7 +565,7 @@ setup_wind (double min_hdg, double max_hdg, double speed, double gust)
|
||||||
min_hdg += 20;
|
min_hdg += 20;
|
||||||
if (min_hdg > 360)
|
if (min_hdg > 360)
|
||||||
min_hdg -= 360;
|
min_hdg -= 360;
|
||||||
speed *= 1.5;
|
speed *= 1.1;
|
||||||
fgSetDouble("/environment/config/aloft/entry[0]/wind-from-heading-deg",
|
fgSetDouble("/environment/config/aloft/entry[0]/wind-from-heading-deg",
|
||||||
min_hdg);
|
min_hdg);
|
||||||
fgSetDouble("/environment/config/aloft/entry[0]/wind-speed-kt",
|
fgSetDouble("/environment/config/aloft/entry[0]/wind-speed-kt",
|
||||||
|
@ -574,7 +574,7 @@ setup_wind (double min_hdg, double max_hdg, double speed, double gust)
|
||||||
min_hdg += 10;
|
min_hdg += 10;
|
||||||
if (min_hdg > 360)
|
if (min_hdg > 360)
|
||||||
min_hdg -= 360;
|
min_hdg -= 360;
|
||||||
speed *= 1.2;
|
speed *= 1.1;
|
||||||
fgSetDouble("/environment/config/aloft/entry[1]/wind-from-heading-deg",
|
fgSetDouble("/environment/config/aloft/entry[1]/wind-from-heading-deg",
|
||||||
min_hdg);
|
min_hdg);
|
||||||
fgSetDouble("/environment/config/aloft/entry[1]/wind-speed-kt",
|
fgSetDouble("/environment/config/aloft/entry[1]/wind-speed-kt",
|
||||||
|
@ -583,7 +583,7 @@ setup_wind (double min_hdg, double max_hdg, double speed, double gust)
|
||||||
min_hdg += 10;
|
min_hdg += 10;
|
||||||
if (min_hdg > 360)
|
if (min_hdg > 360)
|
||||||
min_hdg -= 360;
|
min_hdg -= 360;
|
||||||
speed *= 1.2;
|
speed *= 1.1;
|
||||||
fgSetDouble("/environment/config/aloft/entry[2]/wind-from-heading-deg",
|
fgSetDouble("/environment/config/aloft/entry[2]/wind-from-heading-deg",
|
||||||
min_hdg);
|
min_hdg);
|
||||||
fgSetDouble("/environment/config/aloft/entry[2]/wind-speed-kt",
|
fgSetDouble("/environment/config/aloft/entry[2]/wind-speed-kt",
|
||||||
|
@ -1040,7 +1040,7 @@ fgOptRandomWind( const char *arg )
|
||||||
{
|
{
|
||||||
double min_hdg = sg_random() * 360.0;
|
double min_hdg = sg_random() * 360.0;
|
||||||
double max_hdg = min_hdg + (20 - sqrt(sg_random() * 400));
|
double max_hdg = min_hdg + (20 - sqrt(sg_random() * 400));
|
||||||
double speed = 40 - sqrt(sg_random() * 1600.0);
|
double speed = sg_random() * sg_random() * 40;
|
||||||
double gust = speed + (10 - sqrt(sg_random() * 100));
|
double gust = speed + (10 - sqrt(sg_random() * 100));
|
||||||
setup_wind(min_hdg, max_hdg, speed, gust);
|
setup_wind(min_hdg, max_hdg, speed, gust);
|
||||||
return FG_OPTIONS_OK;
|
return FG_OPTIONS_OK;
|
||||||
|
|
Loading…
Add table
Reference in a new issue