acemod / ACE3

Open-source realism mod for Arma 3
https://ace3.acemod.org
Other
994 stars 735 forks source link

Wind roughness broken in airspace above towns and cities #8705

Closed Evangelion05 closed 2 years ago

Evangelion05 commented 2 years ago

https://github.com/acemod/ACE3/blob/24a28da56647dbc581ab77edd4e2ba925851c890/addons/weather/functions/fnc_calculateRoughnessLength.sqf#L21-L25 机器翻译 nearObjects _windSource must be PositionAGL,But here_this si PositionASL(eyepos)。 This results in high altitude (>50) towns,_nearBuildings always 0。Because it is finding buildings in the air high-altitude sphere。 _this——ASLToATL _this image image

Evangelion05 commented 2 years ago

image

commy2 commented 2 years ago

Coverting ASL of _this to AGL is a bad solution, because the vector math only works in euclidian reference systems, while AGL has a curved topography.

Evangelion05 commented 2 years ago

Coverting ASL of _windSource to AGL,Maybe a solution

commy2 commented 2 years ago

That's what I did in the pull request above: https://github.com/acemod/ACE3/pull/8709/files

I doubt this works either though, because nearObjects probably entirely ignores z-positions. Also, building height is completely ignored here.

Evangelion05 commented 2 years ago

从图片就可以看出Z并没有被忽略。同一2D位置,地面的建筑没有被计算在内,反而空中的建筑会被计算在内。进入宙斯界面后,测风仪显示的仍为玩家位置的风速。

bux commented 2 years ago

@Evangelion05 English please

rautamiekka commented 2 years ago

从图片就可以看出Z并没有被忽略。同一2D位置,地面的建筑没有被计算在内,反而空中的建筑会被计算在内。进入宙斯界面后,测风仪显示的仍为玩家位置的风速。

Google Translate:

It can be seen from the picture that Z has not been ignored. In the same 2D position, buildings on the ground are not counted, but buildings in the sky will be counted. After entering the Zeus interface, the wind gauge still shows the wind speed at the player's position.