Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Weather - Fix calculateRoughnessLength detecting buildings above sea level #8709

Merged
merged 1 commit into from
Feb 17, 2022

Conversation

commy2
Copy link
Contributor

@commy2 commy2 commented Nov 28, 2021

When merged this pull request will:

nearObjects apparenlty takes PosAGL, while the functions takes PosASL.

I am pretty sure it actually doesn't matter which position you provide and nearObjects actually ignores z entirely.

This would mean being 1000 meters above a town would give you high "roughness", even though you are well above the buildings.
Seems like the function is half assed and does not take building height into account at all. Could add a distance check to the buildings, but to be completely sure, you likely have to take building geometry into account.

Ngl, I am salty that half-assed stuff like this is in ACE. Would appreciate if anyone has a solution for this.

@PabstMirror PabstMirror changed the title Fix wind above towns Weather - Fix calculateRoughnessLength detecting buildings above sea level Feb 17, 2022
@PabstMirror PabstMirror added this to the 3.14.2 milestone Feb 17, 2022
Copy link
Contributor

@PabstMirror PabstMirror left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tested on stratis hill near airbase - posASL [2442.23,5694.5,77.2363]

(getPosASL player) nearObjects ["Building", 50] = []
(AsltoAGL getPosASL player) nearObjects ["Building", 50] = [..expected..]

@PabstMirror PabstMirror merged commit 0055353 into master Feb 17, 2022
@PabstMirror PabstMirror deleted the fix-wind-building-detection branch February 17, 2022 17:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug-fix Release Notes: **FIXED:**
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Wind roughness broken in airspace above towns and cities
2 participants