You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The weathermark method used by the veafWeather module doesn't work properly when computing wind direction. It calculates the wind azimuth based on the vector (x, z) given by DCS by doing math.atan(z, x). It's the right principle, but unfortunately, DCS apparently uses Lua version 5.1, and in this version, math.atan takes only one parameter (it should have been math.atan(z/x)). As a result, the angle is often wrong, more or less.
In Lua 5.3 or higher it would have been okay, but here we need to either pass the correct parameter or use the atan2 function.
Remediation will be to rewrite the wind calculation function.
In addition it's the only thing still being used in weathermark, so we would not be to far from dumping the library altogether.
The text was updated successfully, but these errors were encountered:
As pointed by Skynight on the VEAF Discord: https://discord.com/channels/471061487662792715/1333160268829823078
The weathermark method used by the veafWeather module doesn't work properly when computing wind direction. It calculates the wind azimuth based on the vector

(x, z)
given by DCS by doingmath.atan(z, x)
. It's the right principle, but unfortunately, DCS apparently uses Lua version 5.1, and in this version,math.atan
takes only one parameter (it should have beenmath.atan(z/x)
). As a result, the angle is often wrong, more or less.In Lua 5.3 or higher it would have been okay, but here we need to either pass the correct parameter or use the
atan2
function.Remediation will be to rewrite the wind calculation function.
In addition it's the only thing still being used in
weathermark
, so we would not be to far from dumping the library altogether.The text was updated successfully, but these errors were encountered: