 |
JSBSim Flight Dynamics Model
1.1.11 (13 Feb 2022)
An Open Source Flight Dynamics and Control Software Library in C++
|
53 #include "FGFDMExec.h"
54 #include "FGJSBBase.h"
55 #include "FGTrimAxis.h"
65 typedef enum { tLongitudinal=0, tFull, tGround, tPullup,
66 tCustom, tTurn, tNone } TrimMode;
127 std::vector<FGTrimAxis> TrimAxes;
130 int DebugLevel, Debug;
131 double Tolerance, A_Tolerance;
132 std::vector<double> sub_iterations, successful;
133 std::vector<bool> solution;
134 unsigned int max_sub_iterations;
135 unsigned int max_iterations;
136 unsigned int total_its;
139 double xlo,xhi,alo,ahi;
161 void setupPullup(
void);
162 void setupTurn(
void);
164 void updateRates(
void);
167 struct ContactPoints {
172 struct RotationParameters {
174 std::vector<ContactPoints>::iterator contactRef;
177 void trimOnGround(
void);
178 RotationParameters calcRotation(std::vector<ContactPoints>& contacts,
225 bool AddState( State state, Control control );
237 bool EditState( State state, Control new_control );
272 A_Tolerance = tt / 10;
279 inline void SetDebug(
int level) { DebugLevel = level; }
280 inline void ClearDebug(
void) { DebugLevel = 0; }
288 inline void SetTargetNlf(
double nlf) { targetNlf=nlf; }
289 inline double GetTargetNlf(
void) {
return targetNlf; }
Encapsulates the JSBSim simulation executive.
bool RemoveState(State state)
Remove a specific state-control pair from the current configuration.
bool EditState(State state, Control new_control)
Change the control used to zero a state previously configured.
void ClearStates(void)
Clear all state-control pairs from the current configuration.
This class implements a 3 element column vector.
FGTrim(FGFDMExec *FDMExec, TrimMode tm=tGround)
Initializes the trimming class.
void SetDebug(int level)
Debug level 1 shows results of each top-level iteration Debug level 2 shows level 1 & results of each...
void SetGammaFallback(bool bb)
automatically switch to trimming longitudinal acceleration with flight path angle (gamma) once it bec...
void DebugState(State state)
Output debug data for one of the axes The State enum is defined in FGTrimAxis.h.
bool DoTrim(void)
Execute the trim.
void SetMode(TrimMode tm)
Clear all state-control pairs and set a predefined trim mode.
void SetTolerance(double tt)
Set the tolerance for declaring a state trimmed.
The trimming routine for JSBSim.
Initializes the simulation run.
void TrimStats()
Iteration statistics.
void SetMaxCycles(int ii)
Set the iteration limit.
void Report(void)
Print the results of the trim.
bool GetGammaFallback(void)
query the fallback state
bool AddState(State state, Control control)
Add a state-control pair to the current configuration.
void SetMaxCyclesPerAxis(int ii)
Set the per-axis iteration limit.