JSBSim Flight Dynamics Model 1.3.0 (09 Apr 2026)
An Open Source Flight Dynamics and Control Software Library in C++
Loading...
Searching...
No Matches
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< SGPropertyNode_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
 
const std::string & GetName (void) const
 
unsigned int GetRate (void) const
 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< FGPropertyManager > PropertyManager
 
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 56 of file FGOutputType.cpp.

56 :
57 FGModel(fdmex),
58 SubSystems(0),
59 enabled(true)
60{
61 Aerodynamics = FDMExec->GetAerodynamics();
62 Auxiliary = FDMExec->GetAuxiliary();
63 Aircraft = FDMExec->GetAircraft();
64 Winds = FDMExec->GetWinds();
65 Propulsion = FDMExec->GetPropulsion();
66 MassBalance = FDMExec->GetMassBalance();
67 Propagate = FDMExec->GetPropagate();
68 Accelerations = FDMExec->GetAccelerations();
69 FCS = FDMExec->GetFCS();
70 GroundReactions = FDMExec->GetGroundReactions();
71 ExternalReactions = FDMExec->GetExternalReactions();
72 BuoyantForces = FDMExec->GetBuoyantForces();
73
74 Debug(0);
75}
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:58
+ Here is the call graph for this function:

◆ ~FGOutputType()

~FGOutputType ( )
override

Destructor.

Definition at line 79 of file FGOutputType.cpp.

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

Member Function Documentation

◆ Debug()

void Debug ( int  from)
overrideprotectedvirtual

Reimplemented from FGModel.

Definition at line 249 of file FGOutputType.cpp.

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

◆ 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 216 of file FGOutputType.cpp.

217{
218 return 1.0 / (rate * FDMExec->GetDeltaT());
219}
double GetDeltaT(void) const
Returns the simulation delta T.
Definition FGFDMExec.h:553
+ 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 176 of file FGOutputType.cpp.

177{
178 bool ret = FGModel::InitModel();
179
180 Debug(2);
181 return ret;
182}
+ 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 100 of file FGOutputType.cpp.

101{
102 if (element->FindElementValue("simulation") == string("ON"))
103 SubSystems += ssSimulation;
104 if (element->FindElementValue("aerosurfaces") == string("ON"))
105 SubSystems += ssAerosurfaces;
106 if (element->FindElementValue("rates") == string("ON"))
107 SubSystems += ssRates;
108 if (element->FindElementValue("velocities") == string("ON"))
109 SubSystems += ssVelocities;
110 if (element->FindElementValue("forces") == string("ON"))
111 SubSystems += ssForces;
112 if (element->FindElementValue("moments") == string("ON"))
113 SubSystems += ssMoments;
114 if (element->FindElementValue("atmosphere") == string("ON"))
115 SubSystems += ssAtmosphere;
116 if (element->FindElementValue("massprops") == string("ON"))
117 SubSystems += ssMassProps;
118 if (element->FindElementValue("position") == string("ON"))
119 SubSystems += ssPropagate;
120 if (element->FindElementValue("coefficients") == string("ON") || element->FindElementValue("aerodynamics") == string("ON"))
121 SubSystems += ssAeroFunctions;
122 if (element->FindElementValue("ground_reactions") == string("ON"))
123 SubSystems += ssGroundReactions;
124 if (element->FindElementValue("fcs") == string("ON"))
125 SubSystems += ssFCS;
126 if (element->FindElementValue("propulsion") == string("ON"))
127 SubSystems += ssPropulsion;
128
129 Element *property_element = element->FindElement("property");
130
131 while (property_element) {
132 string property_str = property_element->GetDataLine();
133 SGPropertyNode* node = PropertyManager->GetNode(property_str);
134 if (!node) {
135 FGXMLLogging log(property_element, LogLevel::ERROR);
136 log << LogFormat::RED << LogFormat::BOLD << " No property by the name "
137 << property_str << " has been defined. This property will "
138 << "not be logged. You should check your configuration file.\n"
139 << LogFormat::RESET;
140 } else {
141 if (property_element->HasAttribute("apply")) {
142 string function_str = property_element->GetAttributeValue("apply");
143 auto f = FDMExec->GetTemplateFunc(function_str);
144 if (f)
145 OutputParameters.push_back(new FGFunctionValue(node, f));
146 else {
147 FGXMLLogging log(property_element, LogLevel::ERROR);
148 log << LogFormat::RED << LogFormat::BOLD << " No function by the name "
149 << function_str << " has been defined. This property will "
150 << "not be logged. You should check your configuration file.\n"
151 << LogFormat::RESET;
152 }
153 }
154 else
155 OutputParameters.push_back(new FGPropertyValue(node));
156
157 if (property_element->HasAttribute("caption"))
158 OutputCaptions.push_back(property_element->GetAttributeValue("caption"));
159 else
160 OutputCaptions.push_back("");
161 }
162 property_element = element->FindNextElement("property");
163 }
164
165 double outRate = 1.0;
166 if (element->HasAttribute("rate"))
167 outRate = element->GetAttributeValueAsNumber("rate");
168
169 SetRateHz(outRate);
170
171 return true;
172}
void SetRateHz(double rtHz)
Set the output rate for this output instances.
A node in a property tree.
Definition props.hxx:747
+ 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 186 of file FGOutputType.cpp.

187{
188 if (FGModel::Run(Holding)) return true;
189 if (!enabled) return true;
190
191 RunPreFunctions();
192 Print();
193 RunPostFunctions();
194
195 Debug(4);
196
197 return false;
198}
virtual bool Run(bool Holding)
Runs the model; called by the Executive.
Definition FGModel.cpp:90
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 89 of file FGOutputType.cpp.

90{
91 string outputProp = CreateIndexedPropertyName("simulation/output", idx);
92
93 PropertyManager->Tie(outputProp + "/log_rate_hz", this, &FGOutputType::GetRateHz, &FGOutputType::SetRateHz);
94 PropertyManager->Tie(outputProp + "/enabled", &enabled);
95 OutputIdx = idx;
96}
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< SGPropertyNode_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 223 of file FGOutputType.cpp.

224{
225 for (auto prop: outputProperties)
226 OutputParameters.push_back(new FGPropertyValue(prop));
227}
+ 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 202 of file FGOutputType.cpp.

203{
204 rtHz = rtHz>1000?1000:(rtHz<0?0:rtHz);
205 if (rtHz > 0) {
206 SetRate(0.5 + 1.0/(FDMExec->GetDeltaT()*rtHz));
207 Enable();
208 } else {
209 SetRate(1);
210 Disable();
211 }
212}
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: