mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Fixed a rarely occurring calculation error.
This commit is contained in:
@ -461,7 +461,7 @@ void __stdcall RVExtension(char *output, int outputSize, const char *function)
|
|||||||
|
|
||||||
if (gridHeight > position[2]) {
|
if (gridHeight > position[2]) {
|
||||||
double angle = atan((gridHeight - position[2]) / 100);
|
double angle = atan((gridHeight - position[2]) / 100);
|
||||||
windAttenuation *= pow(cos(angle), 2);
|
windAttenuation *= pow(abs(cos(angle)), 2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -476,7 +476,7 @@ void __stdcall RVExtension(char *output, int outputSize, const char *function)
|
|||||||
|
|
||||||
if (heightAGL > 0 && heightAGL < 20) {
|
if (heightAGL > 0 && heightAGL < 20) {
|
||||||
double roughnessLength = calculateRoughnessLength(windSourceObstacles[0], windSourceObstacles[1]);
|
double roughnessLength = calculateRoughnessLength(windSourceObstacles[0], windSourceObstacles[1]);
|
||||||
windAttenuation *= (log(heightAGL / roughnessLength) / log(20 / roughnessLength));
|
windAttenuation *= abs(log(heightAGL / roughnessLength) / log(20 / roughnessLength));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user