mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Merge pull request #1424 from acemod/barometricPressureFix
Fixed incorrect barometric pressure calculation
This commit is contained in:
commit
1ec37aabed
@ -47,7 +47,7 @@ _temperature = GVAR(temperature);
|
||||
_barometricPressure = GVAR(barometricPressure);
|
||||
_relativeHumidity = GVAR(relativeHumidity);
|
||||
if (!GVAR(atmosphereModeTBH)) then {
|
||||
_barometricPressure = 1013.25 * exp(-(_altitude) / 7990);
|
||||
_barometricPressure = 1013.25 * (1 - (0.0065 * _altitude) / (273.15 + _temperature + 0.0065 * _altitude)) ^ 5.255754495;
|
||||
_relativeHumidity = 50;
|
||||
};
|
||||
|
||||
|
@ -47,7 +47,7 @@ _temperature = GVAR(temperature);
|
||||
_barometricPressure = GVAR(barometricPressure);
|
||||
_relativeHumidity = GVAR(relativeHumidity);
|
||||
if (!GVAR(atmosphereModeTBH)) then {
|
||||
_barometricPressure = 1013.25 * exp(-(_altitude) / 7990);
|
||||
_barometricPressure = 1013.25 * (1 - (0.0065 * _altitude) / (273.15 + _temperature + 0.0065 * _altitude)) ^ 5.255754495;
|
||||
_relativeHumidity = 50;
|
||||
};
|
||||
|
||||
|
@ -14,4 +14,4 @@
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
(1013.25 * exp(-(GVAR(Altitude) + _this) / 7990) - 10 * overcast)
|
||||
((1013.25 - 10 * overcast) * (1 - (0.0065 * (GVAR(Altitude) + _this)) / (KELVIN(GVAR(currentTemperature)) + 0.0065 * GVAR(Altitude))) ^ 5.255754495);
|
@ -501,7 +501,7 @@ void __stdcall RVExtension(char *output, int outputSize, const char *function)
|
||||
trueSpeed = sqrt(pow(trueVelocity[0], 2) + pow(trueVelocity[1], 2) + pow(trueVelocity[2], 2));
|
||||
|
||||
temperature = bulletDatabase[index].temperature - 0.0065 * position[2];
|
||||
pressure = 1013.25 * exp(-(bulletDatabase[index].altitude + position[2]) / 7990) - 10 * bulletDatabase[index].overcast;
|
||||
pressure = (1013.25 - 10 * bulletDatabase[index].overcast) * pow(1 - (0.0065 * (bulletDatabase[index].altitude + position[2])) / (273.15 + temperature + 0.0065 * bulletDatabase[index].altitude), 5.255754495);
|
||||
|
||||
if (bulletDatabase[index].ballisticCoefficients.size() == bulletDatabase[index].velocityBoundaries.size() + 1) {
|
||||
dragRef = deltaT * bulletDatabase[index].airFriction * bulletSpeed * bulletSpeed;
|
||||
|
Loading…
Reference in New Issue
Block a user