#include <ConstantWind.h>
|
| | ConstantWind (const Parameters ¶meters) |
| |
| Status | GetWind (double time, const double position[3], double windVelocity[3]) const override |
| |
| double | SpeedAt (double height) const |
| |
|
const Parameters & | GetParameters () const |
| | The parameters given to the constructor.
|
| |
|
virtual | ~WindField ()=default |
| | Virtual destructor.
|
| |
|
|
| WindField ()=default |
| | The constructor is protected: WindField is an interface.
|
| |
A steady, horizontal wind, the same everywhere in the horizontal plane, its speed varying with the height by a profile (WindProfile).
Example usage:
facade.AddWindField("mean", std::make_shared<marenv::wind::ConstantWind>(p));
The wind's parameters.
Definition ConstantWind.h:35
double speed
Mean wind speed at the reference height [m/s], >= 0.
Definition ConstantWind.h:36
double fromRad
The direction the wind comes from [rad], true, clockwise from north (meteorological).
Definition ConstantWind.h:37
◆ ConstantWind()
| marenv::wind::ConstantWind::ConstantWind |
( |
const Parameters & |
parameters | ) |
|
|
explicit |
Constructor.
- Parameters
-
| [in] | parameters | The wind's parameters. |
- Exceptions
-
| std::invalid_argument | for a parameter out of its range. |
◆ GetWind()
| Status marenv::wind::ConstantWind::GetWind |
( |
double |
time, |
|
|
const double |
position[3], |
|
|
double |
windVelocity[3] |
|
) |
| const |
|
overridevirtual |
Return the wind velocity in a given position and time.
- Parameters
-
| [in] | time | Time stamp in simulation time [s]. |
| [in] | position | The position to query for, NED [m]. |
| [out] | windVelocity | The velocity of the air in the given time and position, NED [m/s]. |
- Returns
- marenv::Status::OK on success. See marenv::Status for other values.
Threading contract, as for current::CurrentField::GetCurrent(): GetWind() may be called from several threads at once and must not change the field's state; registration happens during setup.
Implements marenv::wind::WindField.
◆ SpeedAt()
| double marenv::wind::ConstantWind::SpeedAt |
( |
double |
height | ) |
const |
The mean wind speed at the height height above the mean sea level [m/s] (0 at and below the sea level).
- Parameters
-
| [in] | height | Height above the mean sea level [m]. |
The documentation for this class was generated from the following file: