FhSim  3.1.0
Marine systems simulation
Loading...
Searching...
No Matches
marenv::wind::WindField Class Referenceabstract

#include <WindField.h>

+ Inheritance diagram for marenv::wind::WindField:
+ Collaboration diagram for marenv::wind::WindField:

Public Member Functions

virtual ~WindField ()=default
 Virtual destructor.
 
virtual Status GetWind (double time, const double position[3], double windVelocity[3]) const =0
 

Protected Member Functions

 WindField ()=default
 The constructor is protected: WindField is an interface.
 

Detailed Description

The interface of a wind field: the velocity of the air in a given position and time.

Conventions, for every implementation: positions and velocities are NED [m, m/s]; the height above the mean sea level is -position[2]. The velocity is the air's (the direction the wind blows towards), not the meteorological "from" direction. At and below the mean sea level a field returns zero.

Wind fields registered in an EnvironmentFacade (EnvironmentFacade::AddWindField()) are summed, as current fields are: a mean wind (ConstantWind, or a field from measurements) and gusts (GustField) are separate fields.

Member Function Documentation

◆ GetWind()

virtual Status marenv::wind::WindField::GetWind ( double  time,
const double  position[3],
double  windVelocity[3] 
) const
pure virtual

Return the wind velocity in a given position and time.

Parameters
[in]timeTime stamp in simulation time [s].
[in]positionThe position to query for, NED [m].
[out]windVelocityThe 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.

Implemented in marenv::wind::ConstantWind, and marenv::wind::GustField.


The documentation for this class was generated from the following file: