Jump to content

LoGetWindAtPoint in export.lua


Recommended Posts

Posted

Hi guys,

 

I know that the LoGetWindAtPoint() function returns the intensity of the wind vector in a precise world point.

I would like to know if there is another function to get the direction of the wind, because the only intensity is useless.

 

:helpsmilie:

Fletto i muscoli...e sono nel vuoto

[sIGPIC][/sIGPIC]

Posted

Export.LoGetWindAtPoint ?

[sIGPIC][/sIGPIC]

 

Commodore 64 | MOS6510 | VIC-II | SID6581 | DD 1541 | KCS Power Cartridge | 64Kb | 32Kb external | Arcade Turbo

Posted

True, but LoGetVectorWindVelocoty() returns the wind of your own position, if you need the wind of another point in the world it's useless.

 

 

 

If you use LoGetWindAtPoint(x, y, z) = number you can get the wind speed of a point in the world but you can't get the direction.

 

 

 

My question is...how to get the wind direction of an arbitrary point of the world?

 

 

----------------

inviato con un telefono a gettoni

Fletto i muscoli...e sono nel vuoto

[sIGPIC][/sIGPIC]

Posted

LoGetVectorWindVelocity returns a vector right? Analyzing the vector should give you both speed and direction.

[sIGPIC][/sIGPIC]

 

Commodore 64 | MOS6510 | VIC-II | SID6581 | DD 1541 | KCS Power Cartridge | 64Kb | 32Kb external | Arcade Turbo

Posted

You are right, but I don't need the wind of my own position, I need the wind in a (x, y, z) point in the world.

 

LoGetVectorWindVeloxity returns the wind vector that there's in my position. If I am flying at 4000m over Tbilisi and I need the wind of Lochini airport I can't use that function.

 

 

----------------

inviato con un telefono a gettoni

Fletto i muscoli...e sono nel vuoto

[sIGPIC][/sIGPIC]

  • ED Team
Posted (edited)

LoGetWindAtPoint return wind vector at desired point

 

local vx,vy,vz,absolute_height = LoGetWindAtPoint(x,y,z,is_radio_alt)

 

to get direction of wind:

 

local direction_in_radians = math.atan2(vz,vx); (or math.atan2(-vz,vx) depends of what sign you prefer )

Edited by Alex O'kean
  • Like 1
sigpic2354_5.gif
Posted

Thanks Alex, is it also possible to get the air pressure at a specific point on the map? Makes using dynamic weather a whole lot easier.

[sIGPIC][/sIGPIC]

 

Commodore 64 | MOS6510 | VIC-II | SID6581 | DD 1541 | KCS Power Cartridge | 64Kb | 32Kb external | Arcade Turbo

Posted

Yes, it will be a great thing to get the pressure too. :smilewink:

 

LoGetWindAtPoint return wind vector at desired point

 

local vx,vy,vz,absolute_height = LoGetWindAtPoint(x,y,z,is_radio_alt)

 

to get direction of wind:

 

local direction_in_radians = math.atan2(vz,vx); (or math.atan2(-vz,vx) depends of what sign you prefer )

 

I thought it was a vector and I was trying to get values with pairs() func.. My fault... sorry :doh::doh:

 

Thanks for the answer Alex!

There is a manual with all the export functions?

Fletto i muscoli...e sono nel vuoto

[sIGPIC][/sIGPIC]

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...