About simulated wind#
Parrot Sphinx can simulate the effects of wind on the drone. You can configure its speed magnitude but also its direction. The speed can not only be static but also dynamic according to the provided ExprTk expressions and other available options.
How to configure#
Wind parameters are accessible by the means of sphinx-cli, or any other JSON-RPC tool. For example, to set the mean wind to 5 m/s directed toward East, enter the following:
$ sphinx-cli param -m world wind magnitude_mean 5.0 $ sphinx-cli param -m world wind direction_mean 0. $ sphinx-cli param -m world wind elevation_mean 0.
If you want to add to the mean wind a horizontal 2 m/s wind with an orientation that turns 360° every 60 seconds:
$ sphinx-cli param wind/wind magnitude_expr "2." $ sphinx-cli param wind/wind direction_expr "360 * time / 60" $ sphinx-cli param wind/wind elevation_expr 0.
About the model#
The wind is modeled as the sum of two independent parts:
the mean part. Speed vector that is constant or slowly varying according to drone altitude.
the dynamic part. Speed vector computed from ExprTk expressions. It can typically contain speed variation representing gusts.
These two parts are optional and can be set to zero.
They all are defined by their respective characteristics:
Full magnitude in m/s
Horizontal direction in degrees
Angle in degrees formed by the horizontal plane and the wind direction
Each part of the simulated wind can be smoothed by low-pass filters on magnitude, direction and elevation. The aim is to prevent any brutal discontinuity produced by either by parameter change at run-time, or by the behavior of any ExprTk expression.
Let’s delve into each aspect of the model.
To prevent the wind from changing too fast in a non-realistic way, wind values
can optionally be low-pass filtered by setting their
to a value greater than 1 ms. The equation of the filter is:
is set to 0.001 second (or lower), the filter
is deactivated and the means change instantly creating potential
Height-dependent mean wind#
The mean part of the wind can optionally depend on:
The height \(z\) above the ground
The terrain roughness \(c_r\) defined by the
By default, the height above the ground and terrain roughness are ignored.
To activate their effects, the
enable_terrain_effect parameter must be set
enable_terrain_effect parameter is set to
magnitude_mean parameter defines the mean wind velocity at 10 m above
When activated, the mean wind velocity at height \(z\) is determined using the expression found in section 4.3 of [EN1991-1-4]:
… where \(v_b\) is the characteristic mean wind velocity, at 10 m above ground level in open country terrain with low vegetation. The orography factor \(c_0\) accounts for the increase of mean wind speed over isolated hills and escarpments. In the simulator, for ease of use, the orography factor \(c_0\) is always set to 1, which means that the average slope of the terrain exposed to the wind is always considered to be less than 3°.
terrain_category values are:
Sea, or coastal area, exposed to sea winds; lakes and bodies of water travered by wind over a distance of at least 5 km.
Open countryside, with or without a few isolated obstacles (trees, buildings, etc.) separated from each other by more than 40 times their height.
Countryside with hedges; vineyards; bocage; scattered habitat.
Urbanized or industrial areas; dense bocage; orchards.
Urban areas, of which at least 15% of the surface is covered by buildings whose average height is greater than 15 m.
Example of use:
$ sphinx-cli param wind/wind enable_terrain_effect true $ sphinx-cli param wind/wind terrain_category 2
European Committee for Standardization, EN 1991-1-4:2005+A1:2010 - Eurocode 1. Actions on structures. General actions. Wind actions, CEN, 2005/2010.
You can define periodic wind gusts using the ExprTk function
gust_magnitude(duration, transition, pause).
duration (in s): time of the gust
transition (in s): transition time between no gust and gust (before and after the duration time)
pause (in s): delay between gusts
This function is expected to be used only in the field
It generates a gust of magnitude 1 m/s for the defined period.
You can adjust to the desired speed by simply multiplying the function by
A pause value of 0.0 means a single gust cycle.
a value of 1.0 only during the duration phase.
a value between 0.0 and 1.0 for each transition phase. One at the start of the cycle, another one at the end.
a value of 0.0 the rest of the time or if there is no gust.
The total time for a gust cycle is:
You can optionally add noise to the magnitude (e.g. markov_noise()) for more realistic results.
$ sphinx-cli param wind/wind magnitude_expr "10.0 * gust_magnitude(18, 5, 2) + markov_noise(0.5, 0.05)"
To simulate changes in gust elevation and direction,
use markov_noise() combined
$ sphinx-cli param wind/wind elevation_expr "gust_presence() * markov_noise(0.999, 1.0)" $ sphinx-cli param wind/wind direction_expr "gust_presence() * markov_noise(0.999, 0.5)"
You can also run prerecorded gusts data by setting the
medium_intensity: a medium strength gust of wind between 3 m/s and 7 m/s
high_intensity: a strong gust of wind between 10 m/s and 18 m/s
$ sphinx-cli param wind/wind predefined_gust "medium_intensity"
To deactivate the use of prerecorded data, set
predefined_gust to an
empty string. By default,
predefined_gust is set to an empty string.