Advanced weather: Difference between revisions

m
→‎Creating custom Weather Tiles: http://forum.flightgear.org/viewtopic.php?f=69&t=23120&p=210238#p210206
m (→‎Related Discussions: http://forum.flightgear.org/viewtopic.php?f=69&t=23120&p=210238#p210193)
m (→‎Creating custom Weather Tiles: http://forum.flightgear.org/viewtopic.php?f=69&t=23120&p=210238#p210206)
Line 101: Line 101:


== Creating custom Weather Tiles ==
== Creating custom Weather Tiles ==
If you have a function (data table,...) providing the wind vector w =(wx, wy, wz) as a function of position and time, i.e. w (x,y,z,t), is it possible to make that work in FG, yes that is possible.
Advanced Weather allows to specify a weather effect volume by function (like the distribution of lift inside thermals is implemented) and such a dedicated windshear function could be simulated close to the ground. The required tool is Nasal, FGs scripting language.
There are other possibilities, you might for instance try to alter the generic boundary layer code of Advanced Weather to add automatic windshear detection, or you might alter the C++ code of Basic Weather - it really depends on what information you have and what you'd like to do.
You probably want to have a look at the effect volume management routines. Basically you want to write something analogous to thermal_lift_start(), thermal_lift_stop() and thermal_lift_loop() in /Nasal/local_weather/local_weather.nas and use the management routines of effect_volume_loop()
You probably want to have a look at the effect volume management routines. Basically you want to write something analogous to thermal_lift_start(), thermal_lift_stop() and thermal_lift_loop() in /Nasal/local_weather/local_weather.nas and use the management routines of effect_volume_loop()