 |
JSBSim Flight Dynamics Model
1.1.11 (13 Feb 2022)
An Open Source Flight Dynamics and Control Software Library in C++
|
41 #include "models/FGModel.h"
42 #include "math/FGMatrix33.h"
180 bool Run(
bool Holding)
override;
181 bool InitModel(
void)
override;
182 enum tType {ttNone, ttStandard, ttCulp, ttMilspec, ttTustin} turbType;
195 virtual void SetWindNED(
double wN,
double wE,
double wD) { vWindNED(1)=wN; vWindNED(2)=wE; vWindNED(3)=wD;}
198 virtual void SetWindNED(
int idx,
double wind) { vWindNED(idx)=wind;}
207 virtual double GetWindNED(
int idx)
const {
return vWindNED(idx);}
223 virtual void SetWindspeed(
double speed);
225 virtual double GetWindspeed(
void)
const;
230 virtual void SetGustNED(
int idx,
double gust) { vGustNED(idx)=gust;}
233 virtual void SetTurbNED(
int idx,
double turb) { vTurbulenceNED(idx)=turb;}
236 virtual void SetGustNED(
double gN,
double gE,
double gD) { vGustNED(eNorth)=gN; vGustNED(eEast)=gE; vGustNED(eDown)=gD;}
239 virtual double GetGustNED(
int idx)
const {
return vGustNED(idx);}
242 virtual double GetTurbNED(
int idx)
const {
return vTurbulenceNED(idx);}
250 virtual tType GetTurbType()
const {
return turbType;}
252 virtual void SetTurbGain(
double tg) {TurbGain = tg;}
253 virtual double GetTurbGain()
const {
return TurbGain;}
255 virtual void SetTurbRate(
double tr) {TurbRate = tr;}
256 virtual double GetTurbRate()
const {
return TurbRate;}
258 virtual void SetRhythmicity(
double r) {Rhythmicity=r;}
259 virtual double GetRhythmicity()
const {
return Rhythmicity;}
261 virtual double GetTurbPQR(
int idx)
const {
return vTurbPQR(idx);}
262 virtual double GetTurbMagnitude(
void)
const {
return vTurbulenceNED.
Magnitude();}
263 virtual double GetTurbDirection(
void)
const {
return TurbDirection;}
264 virtual const FGColumnVector3& GetTurbPQR(
void)
const {
return vTurbPQR;}
266 virtual void SetWindspeed20ft(
double ws) { windspeed_at_20ft = ws;}
267 virtual double GetWindspeed20ft()
const {
return windspeed_at_20ft;}
271 virtual int GetProbabilityOfExceedence()
const {
return probability_of_exceedence_index;}
291 enum eGustFrame {gfNone=0, gfBody, gfWind, gfLocal};
302 vWind.InitMatrix(0.0);
353 void NumberOfUpDownburstCells(
int num);
370 double MagnitudedAccelDt, MagnitudeAccel, Magnitude, TurbDirection;
375 double wind_from_clockwise;
376 double spike, target_time, strength;
382 std::vector <struct UpDownBurst*> UpDownBurstCells;
385 double windspeed_at_20ft;
386 int probability_of_exceedence_index;
397 void Turbulence(
double h);
401 double CosineGustProfile(
double startDuration,
double steadyDuration,
402 double endDuration,
double elapsedTime);
403 double DistanceFromRingCenter(
double lat,
double lon);
405 virtual void bind(
void);
406 void Debug(
int from)
override;
Encapsulates the JSBSim simulation executive.
This class implements a 3 element column vector.
Base class for all scheduled JSBSim models.
virtual void SetGustNED(int idx, double gust)
Sets a gust component in NED frame.
virtual void SetWindPsi(double dir)
Sets the direction that the wind is coming from.
virtual double GetTotalWindNED(int idx) const
Retrieves a total wind component in NED frame.
virtual void SetTurbNED(int idx, double turb)
Sets a turbulence component in NED frame.
virtual void StartGust(bool running)
Initiates the execution of the gust.
virtual void EndGustDuration(double dur)
Specifies the length of time it takes for the gust to return to zero velocity.
virtual void StartupGustDuration(double dur)
Specifies the duration of the startup portion of the gust.
virtual const FGColumnVector3 & GetTotalWindNED(void) const
Retrieves the total wind components in NED frame.
virtual void SetWindNED(double wN, double wE, double wD)
Sets the wind components in NED frame.
virtual void GustYComponent(double y)
Specifies the Y component of velocity in the specified gust frame (ft/sec).
Handles matrix math operations.
virtual void SetWindNED(int idx, double wind)
Sets a wind component in NED frame.
double Magnitude(void) const
Length of the vector.
FGColumnVector3 vWindTransformed
struct OneMinusCosineProfile oneMCosineProfile
virtual const FGColumnVector3 & GetGustNED(void) const
Retrieves the gust components in NED frame.
Stores information about a specified Up- or Down-burst.
virtual double GetGustNED(int idx) const
Retrieves a gust component in NED frame.
virtual void SetGustNED(double gN, double gE, double gD)
Sets the gust components in NED frame.
virtual double GetWindPsi(void) const
Retrieves the direction that the wind is coming from.
virtual void GustMagnitude(double mag)
Specifies the magnitude of the gust in feet/second.
struct OneMinusCosineProfile gustProfile
Stores the information about a single one minus cosine gust instance.
virtual double GetTurbNED(int idx) const
Retrieves a turbulence component in NED frame.
virtual void SetTurbType(tType tt)
Turbulence models available: ttNone, ttStandard, ttBerndt, ttCulp, ttMilspec, ttTustin.
virtual void SetWindNED(const FGColumnVector3 &wind)
Sets the wind components in NED frame.
virtual const FGColumnVector3 & GetWindNED(void) const
Retrieves the wind components in NED frame.
virtual void GustFrame(eGustFrame gFrame)
Specifies the frame that the gust direction vector components are specified in.
virtual void GustXComponent(double x)
Specifies the X component of velocity in the specified gust frame (ft/sec).
bool Run(bool Holding) override
Runs the winds model; called by the Executive Can pass in a value indicating if the executive is dire...
virtual double GetWindNED(int idx) const
Retrieves a wind component in NED frame.
virtual void GustZComponent(double z)
Specifies the Z component of velocity in the specified gust frame (ft/sec).
virtual void SetProbabilityOfExceedence(int idx)
allowable range: 0-7, 3=light, 4=moderate, 6=severe turbulence
Models atmospheric disturbances: winds, gusts, turbulence, downbursts, etc.
FGWinds(FGFDMExec *)
Constructor.
virtual void SteadyGustDuration(double dur)
Specifies the length of time that the gust is at a steady, full strength.