Loading [MathJax]/extensions/tex2jax.js
JSBSim Flight Dynamics Model 1.2.2 (22 Mar 2025)
An Open Source Flight Dynamics and Control Software Library in C++
All Classes Functions Variables Enumerations Enumerator Friends Pages
FGOutputType Class Referenceabstract

Detailed Description

Abstract class to provide functions generic to all the output directives.

This class is used by the output manager FGOutput to manage a list of different output classes without needing to know the details of each one of them. It also provides the functions that are common to all the output classes.

The class inherits from FGModelFunctions so it is possible to define functions that execute before or after the output is generated. Such functions need to be tagged with a "pre" or "post" type attribute to denote the sequence in which they should be executed.

The class mimics some functionalities of FGModel (methods InitModel(), Run() and SetRate()). However it does not inherit from FGModel since it is conceptually different from the model paradigm.

Definition at line 91 of file FGOutputType.h.

#include <FGOutputType.h>

+ Inheritance diagram for FGOutputType:
+ Collaboration diagram for FGOutputType:

Public Types

enum  eSubSystems {
  ssSimulation = 1 , ssAerosurfaces = 2 , ssRates = 4 , ssVelocities = 8 ,
  ssForces = 16 , ssMoments = 32 , ssAtmosphere = 64 , ssMassProps = 128 ,
  ssAeroFunctions = 256 , ssPropagate = 512 , ssGroundReactions = 1024 , ssFCS = 2048 ,
  ssPropulsion = 4096
}
 Subsystem types for specifying which will be output in the FDM data logging. More...
 
- Public Types inherited from FGJSBBase
enum  { eL = 1 , eM , eN }
 Moments L, M, N. More...
 
enum  { eP = 1 , eQ , eR }
 Rates P, Q, R. More...
 
enum  { eU = 1 , eV , eW }
 Velocities U, V, W. More...
 
enum  { eX = 1 , eY , eZ }
 Positions X, Y, Z. More...
 
enum  { ePhi = 1 , eTht , ePsi }
 Euler angles Phi, Theta, Psi. More...
 
enum  { eDrag = 1 , eSide , eLift }
 Stability axis forces, Drag, Side force, Lift. More...
 
enum  { eRoll = 1 , ePitch , eYaw }
 Local frame orientation Roll, Pitch, Yaw. More...
 
enum  { eNorth = 1 , eEast , eDown }
 Local frame position North, East, Down. More...
 
enum  { eLat = 1 , eLong , eRad }
 Locations Radius, Latitude, Longitude. More...
 
enum  {
  inNone = 0 , inDegrees , inRadians , inMeters ,
  inFeet
}
 Conversion specifiers. More...
 

Public Member Functions

 FGOutputType (FGFDMExec *fdmex)
 Constructor (implement the FGModel interface).
 
 ~FGOutputType () override
 Destructor.
 
void Disable (void)
 Disables the output generation.
 
void Enable (void)
 Enables the output generation.
 
virtual const std::string & GetOutputName (void) const
 Get the name identifier to which the output will be directed.
 
double GetRateHz (void) const
 Get the output rate in Hz for this output.
 
bool InitModel (void) override
 Init the output model according to its configitation.
 
bool Load (Element *el) override
 Init the output directives from an XML file (implement the FGModel interface).
 
virtual void Print (void)=0
 Generate the output.
 
bool Run (bool Holding) override
 Executes the output directives (implement the FGModel interface).
 
void SetIdx (unsigned int idx)
 Set the idx for this output instance.
 
virtual void SetOutputName (const std::string &name)
 Overwrites the name identifier under which the output will be logged.
 
void SetOutputProperties (std::vector< FGPropertyNode_ptr > &outputProperties)
 Set the list of properties that should be output for this output instance.
 
void SetRateHz (double rtHz)
 Set the output rate for this output instances.
 
virtual void SetStartNewOutput (void)
 Reset the output prior to a restart of the simulation.
 
void SetSubSystems (int subSystems)
 Set the activated subsystems for this output instance.
 
bool Toggle (void)
 Toggles the output generation.
 
- Public Member Functions inherited from FGModel
 FGModel (FGFDMExec *)
 Constructor.
 
 ~FGModel () override
 Destructor.
 
virtual SGPath FindFullPathName (const SGPath &path) const
 
FGFDMExecGetExec (void)
 
const std::string & GetName (void)
 
unsigned int GetRate (void)
 Get the output rate for the model in frames.
 
void SetPropertyManager (std::shared_ptr< FGPropertyManager > fgpm)
 
void SetRate (unsigned int tt)
 Set the ouput rate for the model in frames.
 
- Public Member Functions inherited from FGModelFunctions
std::string GetFunctionStrings (const std::string &delimeter) const
 Gets the strings for the current set of functions.
 
std::string GetFunctionValues (const std::string &delimeter) const
 Gets the function values.
 
std::shared_ptr< FGFunctionGetPreFunction (const std::string &name)
 Get one of the "pre" function.
 
bool Load (Element *el, FGFDMExec *fdmex, std::string prefix="")
 
void PostLoad (Element *el, FGFDMExec *fdmex, std::string prefix="")
 
void PreLoad (Element *el, FGFDMExec *fdmex, std::string prefix="")
 
void RunPostFunctions (void)
 
void RunPreFunctions (void)
 
- Public Member Functions inherited from FGJSBBase
 FGJSBBase ()
 Constructor for FGJSBBase.
 
virtual ~FGJSBBase ()
 Destructor for FGJSBBase.
 
void disableHighLighting (void)
 Disables highlighting in the console output.
 

Public Attributes

enum JSBSim::FGOutputType::eSubSystems subsystems
 

Protected Member Functions

void Debug (int from) override
 
- Protected Member Functions inherited from FGModel
bool Upload (Element *el, bool preLoad)
 Uploads this model in memory.
 

Protected Attributes

std::shared_ptr< FGAccelerationsAccelerations
 
std::shared_ptr< FGAerodynamicsAerodynamics
 
std::shared_ptr< FGAircraftAircraft
 
std::shared_ptr< FGAuxiliaryAuxiliary
 
std::shared_ptr< FGBuoyantForcesBuoyantForces
 
bool enabled
 
std::shared_ptr< FGExternalReactionsExternalReactions
 
std::shared_ptr< FGFCSFCS
 
std::shared_ptr< FGGroundReactionsGroundReactions
 
std::shared_ptr< FGMassBalanceMassBalance
 
std::vector< std::string > OutputCaptions
 
unsigned int OutputIdx
 
std::vector< FGPropertyValue * > OutputParameters
 
std::shared_ptr< FGPropagatePropagate
 
std::shared_ptr< FGPropulsionPropulsion
 
int SubSystems
 
std::shared_ptr< FGWindsWinds
 
- Protected Attributes inherited from FGModel
unsigned int exe_ctr
 
FGFDMExecFDMExec
 
std::string Name
 
std::shared_ptr< FGPropertyManagerPropertyManager
 
unsigned int rate
 
- Protected Attributes inherited from FGModelFunctions
FGPropertyReader LocalProperties
 
std::vector< std::shared_ptr< FGFunction > > PostFunctions
 
std::vector< std::shared_ptr< FGFunction > > PreFunctions
 

Additional Inherited Members

- Static Public Member Functions inherited from FGJSBBase
static const std::string & GetVersion (void)
 Returns the version number of JSBSim.
 
static constexpr double KelvinToFahrenheit (double kelvin)
 Converts from degrees Kelvin to degrees Fahrenheit.
 
static constexpr double CelsiusToRankine (double celsius)
 Converts from degrees Celsius to degrees Rankine.
 
static constexpr double RankineToCelsius (double rankine)
 Converts from degrees Rankine to degrees Celsius.
 
static constexpr double KelvinToRankine (double kelvin)
 Converts from degrees Kelvin to degrees Rankine.
 
static constexpr double RankineToKelvin (double rankine)
 Converts from degrees Rankine to degrees Kelvin.
 
static constexpr double FahrenheitToCelsius (double fahrenheit)
 Converts from degrees Fahrenheit to degrees Celsius.
 
static constexpr double CelsiusToFahrenheit (double celsius)
 Converts from degrees Celsius to degrees Fahrenheit.
 
static constexpr double CelsiusToKelvin (double celsius)
 Converts from degrees Celsius to degrees Kelvin.
 
static constexpr double KelvinToCelsius (double kelvin)
 Converts from degrees Kelvin to degrees Celsius.
 
static constexpr double FeetToMeters (double measure)
 Converts from feet to meters.
 
static bool EqualToRoundoff (double a, double b)
 Finite precision comparison.
 
static bool EqualToRoundoff (float a, float b)
 Finite precision comparison.
 
static bool EqualToRoundoff (float a, double b)
 Finite precision comparison.
 
static bool EqualToRoundoff (double a, float b)
 Finite precision comparison.
 
static constexpr double Constrain (double min, double value, double max)
 Constrain a value between a minimum and a maximum value.
 
static constexpr double sign (double num)
 
- Static Public Attributes inherited from FGJSBBase
static char highint [5] = {27, '[', '1', 'm', '\0' }
 highlights text
 
static char halfint [5] = {27, '[', '2', 'm', '\0' }
 low intensity text
 
static char normint [6] = {27, '[', '2', '2', 'm', '\0' }
 normal intensity text
 
static char reset [5] = {27, '[', '0', 'm', '\0' }
 resets text properties
 
static char underon [5] = {27, '[', '4', 'm', '\0' }
 underlines text
 
static char underoff [6] = {27, '[', '2', '4', 'm', '\0' }
 underline off
 
static char fgblue [6] = {27, '[', '3', '4', 'm', '\0' }
 blue text
 
static char fgcyan [6] = {27, '[', '3', '6', 'm', '\0' }
 cyan text
 
static char fgred [6] = {27, '[', '3', '1', 'm', '\0' }
 red text
 
static char fggreen [6] = {27, '[', '3', '2', 'm', '\0' }
 green text
 
static char fgdef [6] = {27, '[', '3', '9', 'm', '\0' }
 default text
 
static short debug_lvl = 1
 
- Static Protected Member Functions inherited from FGJSBBase
static std::string CreateIndexedPropertyName (const std::string &Property, int index)
 
- Static Protected Attributes inherited from FGJSBBase
static constexpr double radtodeg = 180. / M_PI
 
static constexpr double degtorad = M_PI / 180.
 
static constexpr double hptoftlbssec = 550.0
 
static constexpr double psftoinhg = 0.014138
 
static constexpr double psftopa = 47.88
 
static constexpr double fttom = 0.3048
 
static constexpr double ktstofps = 1852./(3600*fttom)
 
static constexpr double fpstokts = 1.0 / ktstofps
 
static constexpr double inchtoft = 1.0/12.0
 
static constexpr double m3toft3 = 1.0/(fttom*fttom*fttom)
 
static constexpr double in3tom3 = inchtoft*inchtoft*inchtoft/m3toft3
 
static constexpr double inhgtopa = 3386.38
 
static constexpr double slugtolb = 32.174049
 Note that definition of lbtoslug by the inverse of slugtolb and not to a different constant you can also get from some tables will make lbtoslug*slugtolb == 1 up to the magnitude of roundoff.
 
static constexpr double lbtoslug = 1.0/slugtolb
 
static constexpr double kgtolb = 2.20462
 
static constexpr double kgtoslug = 0.06852168
 
static const std::string needed_cfg_version = "2.0"
 
static const std::string JSBSim_version = JSBSIM_VERSION " " __DATE__ " " __TIME__
 

Member Enumeration Documentation

◆ eSubSystems

Subsystem types for specifying which will be output in the FDM data logging.

Enumerator
ssSimulation 

Subsystem: Simulation (= 1)

ssAerosurfaces 

Subsystem: Aerosurfaces (= 2)

ssRates 

Subsystem: Body rates (= 4)

ssVelocities 

Subsystem: Velocities (= 8)

ssForces 

Subsystem: Forces (= 16)

ssMoments 

Subsystem: Moments (= 32)

ssAtmosphere 

Subsystem: Atmosphere (= 64)

ssMassProps 

Subsystem: Mass Properties (= 128)

ssAeroFunctions 

Subsystem: Coefficients (= 256)

ssPropagate 

Subsystem: Propagate (= 512)

ssGroundReactions 

Subsystem: Ground Reactions (= 1024)

ssFCS 

Subsystem: FCS (= 2048)

ssPropulsion 

Subsystem: Propulsion (= 4096)

Definition at line 178 of file FGOutputType.h.

178 {
ssSimulation = 1, ssAerosurfaces = 2, ssRates = 4, ssVelocities = 8, ssForces = 16, ssMoments = 32, ssAtmosphere = 64, ssMassProps = 128, ssAeroFunctions = 256, ssPropagate = 512, ssGroundReactions = 1024, ssFCS = 2048, ssPropulsion = 4096
192 } subsystems;
@ ssPropulsion
Subsystem: Propulsion (= 4096)
@ ssForces
Subsystem: Forces (= 16)
@ ssAtmosphere
Subsystem: Atmosphere (= 64)
@ ssPropagate
Subsystem: Propagate (= 512)
@ ssGroundReactions
Subsystem: Ground Reactions (= 1024)
@ ssFCS
Subsystem: FCS (= 2048)
@ ssMoments
Subsystem: Moments (= 32)
@ ssRates
Subsystem: Body rates (= 4)
@ ssVelocities
Subsystem: Velocities (= 8)
@ ssAerosurfaces
Subsystem: Aerosurfaces (= 2)
@ ssMassProps
Subsystem: Mass Properties (= 128)
@ ssSimulation
Subsystem: Simulation (= 1)
@ ssAeroFunctions
Subsystem: Coefficients (= 256)

Constructor & Destructor Documentation

◆ FGOutputType()

FGOutputType ( FGFDMExec fdmex)

Constructor (implement the FGModel interface).

Parameters
fdmexa pointer to the parent executive object

Definition at line 57 of file FGOutputType.cpp.

57 :
58 FGModel(fdmex),
59 SubSystems(0),
60 enabled(true)
61{
62 Aerodynamics = FDMExec->GetAerodynamics();
63 Auxiliary = FDMExec->GetAuxiliary();
64 Aircraft = FDMExec->GetAircraft();
65 Winds = FDMExec->GetWinds();
66 Propulsion = FDMExec->GetPropulsion();
67 MassBalance = FDMExec->GetMassBalance();
68 Propagate = FDMExec->GetPropagate();
69 Accelerations = FDMExec->GetAccelerations();
70 FCS = FDMExec->GetFCS();
71 GroundReactions = FDMExec->GetGroundReactions();
72 ExternalReactions = FDMExec->GetExternalReactions();
73 BuoyantForces = FDMExec->GetBuoyantForces();
74
75 Debug(0);
76}
std::shared_ptr< FGWinds > GetWinds(void) const
Returns the FGWinds pointer.
std::shared_ptr< FGBuoyantForces > GetBuoyantForces(void) const
Returns the FGBuoyantForces pointer.
std::shared_ptr< FGAircraft > GetAircraft(void) const
Returns the FGAircraft pointer.
std::shared_ptr< FGFCS > GetFCS(void) const
Returns the FGFCS pointer.
std::shared_ptr< FGPropagate > GetPropagate(void) const
Returns the FGPropagate pointer.
std::shared_ptr< FGAerodynamics > GetAerodynamics(void) const
Returns the FGAerodynamics pointer.
std::shared_ptr< FGExternalReactions > GetExternalReactions(void) const
Returns the FGExternalReactions pointer.
std::shared_ptr< FGGroundReactions > GetGroundReactions(void) const
Returns the FGGroundReactions pointer.
std::shared_ptr< FGMassBalance > GetMassBalance(void) const
Returns the FGAircraft pointer.
std::shared_ptr< FGPropulsion > GetPropulsion(void) const
Returns the FGPropulsion pointer.
std::shared_ptr< FGAuxiliary > GetAuxiliary(void) const
Returns the FGAuxiliary pointer.
std::shared_ptr< FGAccelerations > GetAccelerations(void) const
Returns the FGAccelerations pointer.
FGModel(FGFDMExec *)
Constructor.
Definition FGModel.cpp:57
+ Here is the call graph for this function:

◆ ~FGOutputType()

~FGOutputType ( )
override

Destructor.

Definition at line 80 of file FGOutputType.cpp.

81{
82 for (auto param: OutputParameters)
83 delete param;
84
85 Debug(1);
86}

Member Function Documentation

◆ Debug()

void Debug ( int  from)
overrideprotectedvirtual

Reimplemented from FGModel.

Definition at line 250 of file FGOutputType.cpp.

251{
252 if (debug_lvl <= 0) return;
253
254 if (debug_lvl & 1) { // Standard console startup message output
255 if (from == 0) { // Constructor
256 }
257 if (from == 2) {
258 if (SubSystems & ssSimulation) cout << " Simulation parameters logged" << endl;
259 if (SubSystems & ssAerosurfaces) cout << " Aerosurface parameters logged" << endl;
260 if (SubSystems & ssRates) cout << " Rate parameters logged" << endl;
261 if (SubSystems & ssVelocities) cout << " Velocity parameters logged" << endl;
262 if (SubSystems & ssForces) cout << " Force parameters logged" << endl;
263 if (SubSystems & ssMoments) cout << " Moments parameters logged" << endl;
264 if (SubSystems & ssAtmosphere) cout << " Atmosphere parameters logged" << endl;
265 if (SubSystems & ssMassProps) cout << " Mass parameters logged" << endl;
266 if (SubSystems & ssAeroFunctions) cout << " Coefficient parameters logged" << endl;
267 if (SubSystems & ssPropagate) cout << " Propagate parameters logged" << endl;
268 if (SubSystems & ssGroundReactions) cout << " Ground parameters logged" << endl;
269 if (SubSystems & ssFCS) cout << " FCS parameters logged" << endl;
270 if (SubSystems & ssPropulsion) cout << " Propulsion parameters logged" << endl;
271 if (!OutputParameters.empty()) cout << " Properties logged:" << endl;
272 for (auto param: OutputParameters)
273 cout << " - " << param->GetName() << endl;
274 }
275 }
276 if (debug_lvl & 2 ) { // Instantiation/Destruction notification
277 if (from == 0) cout << "Instantiated: FGOutputType" << endl;
278 if (from == 1) cout << "Destroyed: FGOutputType" << endl;
279 }
280 if (debug_lvl & 4 ) { // Run() method entry print for FGModel-derived objects
281 }
282 if (debug_lvl & 8 ) { // Runtime state variables
283 }
284 if (debug_lvl & 16) { // Sanity checking
285 }
286 if (debug_lvl & 64) {
287 if (from == 0) { // Constructor
288 }
289 }
290}

◆ Disable()

void Disable ( void  )
inline

Disables the output generation.

Definition at line 171 of file FGOutputType.h.

171{ enabled = false; }
+ Here is the caller graph for this function:

◆ Enable()

void Enable ( void  )
inline

Enables the output generation.

Definition at line 169 of file FGOutputType.h.

169{ enabled = true; }
+ Here is the caller graph for this function:

◆ GetOutputName()

virtual const std::string & GetOutputName ( void  ) const
inlinevirtual

Get the name identifier to which the output will be directed.

Returns
the name identifier.

Definition at line 134 of file FGOutputType.h.

134{ return Name; }

◆ GetRateHz()

double GetRateHz ( void  ) const

Get the output rate in Hz for this output.

Definition at line 217 of file FGOutputType.cpp.

218{
219 return 1.0 / (rate * FDMExec->GetDeltaT());
220}
double GetDeltaT(void) const
Returns the simulation delta T.
Definition FGFDMExec.h:552
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ InitModel()

bool InitModel ( void  )
overridevirtual

Init the output model according to its configitation.

Reimplemented from FGModel.

Definition at line 177 of file FGOutputType.cpp.

178{
179 bool ret = FGModel::InitModel();
180
181 Debug(2);
182 return ret;
183}
+ Here is the caller graph for this function:

◆ Load()

bool Load ( Element el)
overridevirtual

Init the output directives from an XML file (implement the FGModel interface).

Parameters
elementXML Element that is pointing to the output directives

Reimplemented from FGModel.

Definition at line 101 of file FGOutputType.cpp.

102{
103 if (element->FindElementValue("simulation") == string("ON"))
104 SubSystems += ssSimulation;
105 if (element->FindElementValue("aerosurfaces") == string("ON"))
106 SubSystems += ssAerosurfaces;
107 if (element->FindElementValue("rates") == string("ON"))
108 SubSystems += ssRates;
109 if (element->FindElementValue("velocities") == string("ON"))
110 SubSystems += ssVelocities;
111 if (element->FindElementValue("forces") == string("ON"))
112 SubSystems += ssForces;
113 if (element->FindElementValue("moments") == string("ON"))
114 SubSystems += ssMoments;
115 if (element->FindElementValue("atmosphere") == string("ON"))
116 SubSystems += ssAtmosphere;
117 if (element->FindElementValue("massprops") == string("ON"))
118 SubSystems += ssMassProps;
119 if (element->FindElementValue("position") == string("ON"))
120 SubSystems += ssPropagate;
121 if (element->FindElementValue("coefficients") == string("ON") || element->FindElementValue("aerodynamics") == string("ON"))
122 SubSystems += ssAeroFunctions;
123 if (element->FindElementValue("ground_reactions") == string("ON"))
124 SubSystems += ssGroundReactions;
125 if (element->FindElementValue("fcs") == string("ON"))
126 SubSystems += ssFCS;
127 if (element->FindElementValue("propulsion") == string("ON"))
128 SubSystems += ssPropulsion;
129
130 Element *property_element = element->FindElement("property");
131
132 while (property_element) {
133 string property_str = property_element->GetDataLine();
134 FGPropertyNode* node = PropertyManager->GetNode(property_str);
135 if (!node) {
136 cerr << property_element->ReadFrom()
137 << fgred << highint << endl << " No property by the name "
138 << property_str << " has been defined. This property will " << endl
139 << " not be logged. You should check your configuration file."
140 << reset << endl;
141 } else {
142 if (property_element->HasAttribute("apply")) {
143 string function_str = property_element->GetAttributeValue("apply");
144 auto f = FDMExec->GetTemplateFunc(function_str);
145 if (f)
146 OutputParameters.push_back(new FGFunctionValue(node, f));
147 else {
148 cerr << property_element->ReadFrom()
149 << fgred << highint << " No function by the name "
150 << function_str << " has been defined. This property will "
151 << "not be logged. You should check your configuration file."
152 << reset << endl;
153 }
154 }
155 else
156 OutputParameters.push_back(new FGPropertyValue(node));
157
158 if (property_element->HasAttribute("caption"))
159 OutputCaptions.push_back(property_element->GetAttributeValue("caption"));
160 else
161 OutputCaptions.push_back("");
162 }
163 property_element = element->FindNextElement("property");
164 }
165
166 double outRate = 1.0;
167 if (element->HasAttribute("rate"))
168 outRate = element->GetAttributeValueAsNumber("rate");
169
170 SetRateHz(outRate);
171
172 return true;
173}
static char fgred[6]
red text
Definition FGJSBBase.h:166
static char reset[5]
resets text properties
Definition FGJSBBase.h:156
static char highint[5]
highlights text
Definition FGJSBBase.h:150
void SetRateHz(double rtHz)
Set the output rate for this output instances.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ Print()

virtual void Print ( void  )
pure virtual

Generate the output.

This is a pure method so it must be implemented by the classes that inherits from FGOutputType. The Print name may not be relevant to all outputs but it has been kept for backward compatibility.

Implemented in FGOutputFG, FGOutputSocket, FGOutputTextFile, and FGOutputFile.

+ Here is the caller graph for this function:

◆ Run()

bool Run ( bool  Holding)
overridevirtual

Executes the output directives (implement the FGModel interface).

This method checks that the current time step matches the output rate and calls the registered "pre" functions, the output generation and finally the "post" functions.

Parameters
Holdingif true, the executive has been directed to hold the sim from advancing time.
Returns
false if no error.

Reimplemented from FGModel.

Definition at line 187 of file FGOutputType.cpp.

188{
189 if (FGModel::Run(Holding)) return true;
190 if (!enabled) return true;
191
192 RunPreFunctions();
193 Print();
194 RunPostFunctions();
195
196 Debug(4);
197
198 return false;
199}
virtual bool Run(bool Holding)
Runs the model; called by the Executive.
Definition FGModel.cpp:89
virtual void Print(void)=0
Generate the output.
+ Here is the call graph for this function:

◆ SetIdx()

void SetIdx ( unsigned int  idx)

Set the idx for this output instance.

Parameters
idxID of the output instance that is constructed

Definition at line 90 of file FGOutputType.cpp.

91{
92 string outputProp = CreateIndexedPropertyName("simulation/output", idx);
93
94 PropertyManager->Tie(outputProp + "/log_rate_hz", this, &FGOutputType::GetRateHz, &FGOutputType::SetRateHz);
95 PropertyManager->Tie(outputProp + "/enabled", &enabled);
96 OutputIdx = idx;
97}
double GetRateHz(void) const
Get the output rate in Hz for this output.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SetOutputName()

virtual void SetOutputName ( const std::string &  name)
inlinevirtual

Overwrites the name identifier under which the output will be logged.

This method is taken into account if it is called before FGFDMExec::RunIC() otherwise it is ignored until the next call to SetStartNewOutput().

Parameters
namenew name

Reimplemented in FGOutputFile, and FGOutputSocket.

Definition at line 130 of file FGOutputType.h.

130{ Name = name; }
+ Here is the caller graph for this function:

◆ SetOutputProperties()

void SetOutputProperties ( std::vector< FGPropertyNode_ptr > &  outputProperties)

Set the list of properties that should be output for this output instance.

Parameters
outputPropertieslist of properties that should be output

Definition at line 224 of file FGOutputType.cpp.

225{
226 for (auto prop: outputProperties)
227 OutputParameters.push_back(new FGPropertyValue(prop));
228}
+ Here is the caller graph for this function:

◆ SetRateHz()

void SetRateHz ( double  rtHz)

Set the output rate for this output instances.

Parameters
rtHznew output rate in Hz

Definition at line 203 of file FGOutputType.cpp.

204{
205 rtHz = rtHz>1000?1000:(rtHz<0?0:rtHz);
206 if (rtHz > 0) {
207 SetRate(0.5 + 1.0/(FDMExec->GetDeltaT()*rtHz));
208 Enable();
209 } else {
210 SetRate(1);
211 Disable();
212 }
213}
void SetRate(unsigned int tt)
Set the ouput rate for the model in frames.
Definition FGModel.h:91
void Disable(void)
Disables the output generation.
void Enable(void)
Enables the output generation.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SetStartNewOutput()

virtual void SetStartNewOutput ( void  )
inlinevirtual

Reset the output prior to a restart of the simulation.

This method should be called when the simulation is restarted with, for example, new initial conditions. When this method is executed the output instance can take special actions such as closing the current output file and open a new one with a different name.

Reimplemented in FGOutputFile.

Definition at line 166 of file FGOutputType.h.

166{}

◆ SetSubSystems()

void SetSubSystems ( int  subSystems)
inline

Set the activated subsystems for this output instance.

Parameters
subSystemsbitfield that describes the activated subsystems
outputPropertieslist of properties that should be output

Definition at line 118 of file FGOutputType.h.

118{ SubSystems = subSystems; }
+ Here is the caller graph for this function:

◆ Toggle()

bool Toggle ( void  )
inline

Toggles the output generation.

Returns
the output generation status i.e. true if the output has been enabled, false if the output has been disabled.

Definition at line 175 of file FGOutputType.h.

175{enabled = !enabled; return enabled;}

Member Data Documentation

◆ Accelerations

std::shared_ptr<FGAccelerations> Accelerations
protected

Definition at line 208 of file FGOutputType.h.

◆ Aerodynamics

std::shared_ptr<FGAerodynamics> Aerodynamics
protected

Definition at line 201 of file FGOutputType.h.

◆ Aircraft

std::shared_ptr<FGAircraft> Aircraft
protected

Definition at line 203 of file FGOutputType.h.

◆ Auxiliary

std::shared_ptr<FGAuxiliary> Auxiliary
protected

Definition at line 202 of file FGOutputType.h.

◆ BuoyantForces

std::shared_ptr<FGBuoyantForces> BuoyantForces
protected

Definition at line 212 of file FGOutputType.h.

◆ enabled

bool enabled
protected

Definition at line 199 of file FGOutputType.h.

◆ ExternalReactions

std::shared_ptr<FGExternalReactions> ExternalReactions
protected

Definition at line 211 of file FGOutputType.h.

◆ FCS

std::shared_ptr<FGFCS> FCS
protected

Definition at line 209 of file FGOutputType.h.

◆ GroundReactions

std::shared_ptr<FGGroundReactions> GroundReactions
protected

Definition at line 210 of file FGOutputType.h.

◆ MassBalance

std::shared_ptr<FGMassBalance> MassBalance
protected

Definition at line 206 of file FGOutputType.h.

◆ OutputCaptions

std::vector<std::string> OutputCaptions
protected

Definition at line 198 of file FGOutputType.h.

◆ OutputIdx

unsigned int OutputIdx
protected

Definition at line 195 of file FGOutputType.h.

◆ OutputParameters

std::vector<FGPropertyValue*> OutputParameters
protected

Definition at line 197 of file FGOutputType.h.

◆ Propagate

std::shared_ptr<FGPropagate> Propagate
protected

Definition at line 207 of file FGOutputType.h.

◆ Propulsion

std::shared_ptr<FGPropulsion> Propulsion
protected

Definition at line 205 of file FGOutputType.h.

◆ SubSystems

int SubSystems
protected

Definition at line 196 of file FGOutputType.h.

◆ Winds

std::shared_ptr<FGWinds> Winds
protected

Definition at line 204 of file FGOutputType.h.


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