54#include "FGTrimAxis.h"
55#include "FGInitialCondition.h"
67typedef enum { tLongitudinal=0, tFull, tGround, tPullup,
68 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,
210 void SetMode(TrimMode tm);
216 void ClearStates(
void);
225 bool AddState( State state, Control control );
231 bool RemoveState( State state );
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; }
This class implements a 3 element column vector.
Encapsulates the JSBSim simulation executive.
Initializes the simulation run.
The trimming routine for JSBSim.
void SetGammaFallback(bool bb)
automatically switch to trimming longitudinal acceleration with flight path angle (gamma) once it bec...
void SetMaxCycles(int ii)
Set the iteration limit.
void SetMaxCyclesPerAxis(int ii)
Set the per-axis iteration limit.
void SetDebug(int level)
Debug level 1 shows results of each top-level iteration Debug level 2 shows level 1 & results of each...
bool GetGammaFallback(void)
query the fallback state
void DebugState(State state)
Output debug data for one of the axes The State enum is defined in FGTrimAxis.h.
void SetTolerance(double tt)
Set the tolerance for declaring a state trimmed.