- Update weather
git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@6635 30fe4595-0a0c-4342-8851-515496e4dcbd Former-commit-id: 146b9c8806ab0098d3d62b935d7626fcf2e9f108 Former-commit-id: e5e9bc5508aae10fa122ac3ba5239d3f7e825255
This commit is contained in:
parent
c855b206df
commit
7e406f0886
2 changed files with 4 additions and 20 deletions
|
@ -408,7 +408,7 @@ reTrackInitWeather(void)
|
|||
trackLocal->water = water;
|
||||
trackLocal->airtemperature = 15.0f;
|
||||
trackLocal->dewp = 5.0f;
|
||||
trackLocal->airpressure = 1125.0f;
|
||||
trackLocal->airpressure = 101300;
|
||||
trackLocal->windspeed = rand() % 100;
|
||||
trackLocal->winddir = rand() % 359;
|
||||
trackLocal->relativehumidity = 65.0f;
|
||||
|
@ -654,6 +654,8 @@ reTrackInitRealWeather(void)
|
|||
else
|
||||
trackLocal->airpressure = webMetar->getPressure_hPa();
|
||||
|
||||
trackLocal->airpressure = trackLocal->airpressure * 100;
|
||||
|
||||
trackLocal->rain = webMetar->getRain();
|
||||
trackLocal->snow = webMetar->getSnow();
|
||||
trackLocal->hail = webMetar->getHail();
|
||||
|
|
|
@ -27,12 +27,11 @@ void SimAtmosphereConfig(tTrack *track)
|
|||
SimTimeOfDay = track->local.timeofday;
|
||||
SimClouds = track->local.clouds;
|
||||
Tair = track->local.airtemperature + 273.15;
|
||||
SimAirPressure = track->local.airpressure;
|
||||
|
||||
// Adapt air pressure with track elevation
|
||||
if (track->local.altitude < 500)
|
||||
{
|
||||
SimAirPressure = 101300;
|
||||
|
||||
if (track->local.altitude < 100)
|
||||
SimAirDensity = 1.290f;
|
||||
else if (track->local.altitude < 200)
|
||||
|
@ -45,8 +44,6 @@ void SimAtmosphereConfig(tTrack *track)
|
|||
}
|
||||
else if (track->local.altitude < 1000)
|
||||
{
|
||||
SimAirPressure = 95400;
|
||||
|
||||
if (track->local.altitude < 600)
|
||||
SimAirDensity = 1.225f;
|
||||
else if (track->local.altitude < 700)
|
||||
|
@ -59,8 +56,6 @@ void SimAtmosphereConfig(tTrack *track)
|
|||
}
|
||||
else if (track->local.altitude < 1500)
|
||||
{
|
||||
SimAirPressure = 89800;
|
||||
|
||||
if (track->local.altitude < 1100)
|
||||
SimAirDensity = 1.167f;
|
||||
else if (track->local.altitude < 1200)
|
||||
|
@ -73,8 +68,6 @@ void SimAtmosphereConfig(tTrack *track)
|
|||
}
|
||||
else if (track->local.altitude < 2000)
|
||||
{
|
||||
SimAirPressure = 84600;
|
||||
|
||||
if (track->local.altitude < 1600)
|
||||
SimAirDensity = 1.112f;
|
||||
else if (track->local.altitude < 1700)
|
||||
|
@ -87,7 +80,6 @@ void SimAtmosphereConfig(tTrack *track)
|
|||
}
|
||||
else
|
||||
{
|
||||
SimAirPressure = 79400;
|
||||
SimAirDensity = 1.058f;
|
||||
}
|
||||
|
||||
|
@ -113,16 +105,6 @@ void SimAtmosphereConfig(tTrack *track)
|
|||
Tair -= 3.05;
|
||||
else
|
||||
Tair -= 5.75;
|
||||
|
||||
if(SimRain == 0)
|
||||
Tair = Tair;
|
||||
else if (SimRain == 1)
|
||||
Tair -= 1.55;
|
||||
else if (SimRain == 2)
|
||||
Tair -= 2.75;
|
||||
else
|
||||
Tair -= 3.50;
|
||||
//Tair = 297.15; // 24 degree celsius
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue