Jump to content

LoGetWindAtPoint in export.lua


LowLee

Recommended Posts

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]

Link to comment
Share on other sites

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]

Link to comment
Share on other sites

  • ED Team

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
Link to comment
Share on other sites

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

Link to comment
Share on other sites

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]

Link to comment
Share on other sites

  • Recently Browsing   0 members

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