#include "FGModel.h"
#include "input_output/FGXMLElement.h"
#include "math/FGColumnVector3.h"
+#include "math/FGMatrix33.h"
/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
DEFINITIONS
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
-#define ID_AIRCRAFT "$Id: FGAircraft.h,v 1.16 2010/11/18 12:38:06 jberndt Exp $"
+#define ID_AIRCRAFT "$Id: FGAircraft.h,v 1.19 2011/11/10 12:06:14 jberndt Exp $"
/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
FORWARD DECLARATIONS
@endcode
@author Jon S. Berndt
- @version $Id: FGAircraft.h,v 1.16 2010/11/18 12:38:06 jberndt Exp $
+ @version $Id: FGAircraft.h,v 1.19 2011/11/10 12:06:14 jberndt Exp $
@see Cooke, Zyda, Pratt, and McGhee, "NPSNET: Flight Simulation Dynamic Modeling
- Using Quaternions", Presence, Vol. 1, No. 4, pp. 404-420 Naval Postgraduate
- School, January 1994
+ Using Quaternions", Presence, Vol. 1, No. 4, pp. 404-420 Naval Postgraduate
+ School, January 1994
@see D. M. Henderson, "Euler Angles, Quaternions, and Transformation Matrices",
JSC 12960, July 1977
@see Richard E. McFarland, "A Standard Kinematic Model for Flight Simulation at
~FGAircraft();
/** Runs the Aircraft model; called by the Executive
+ Can pass in a value indicating if the executive is directing the simulation to Hold.
+ @param Holding if true, the executive has been directed to hold the sim from
+ advancing time. Some models may ignore this flag, such as the Input
+ model, which may need to be active to listen on a socket for the
+ "Resume" command to be given.
@see JSBSim.cpp documentation
@return false if no error */
- bool Run(void);
+ bool Run(bool Holding);
bool InitModel(void);
double GetMoments(int idx) const { return vMoments(idx); }
const FGColumnVector3& GetForces(void) const { return vForces; }
double GetForces(int idx) const { return vForces(idx); }
- FGColumnVector3& GetBodyAccel(void) { return vBodyAccel; }
- double GetBodyAccel(int idx) const { return vBodyAccel(idx); }
- const FGColumnVector3& GetNcg(void) const { return vNcg; }
- double GetNcg(int idx) const { return vNcg(idx); }
const FGColumnVector3& GetXYZrp(void) const { return vXYZrp; }
const FGColumnVector3& GetXYZvrp(void) const { return vXYZvrp; }
const FGColumnVector3& GetXYZep(void) const { return vXYZep; }
void SetWingArea(double S) {WingArea = S;}
- double GetNlf(void) const;
-
- FGColumnVector3& GetNwcg(void) { return vNwcg; }
-
void bind(void);
void unbind(void);
+ struct Inputs {
+ FGColumnVector3 AeroForce;
+ FGColumnVector3 PropForce;
+ FGColumnVector3 GroundForce;
+ FGColumnVector3 ExternalForce;
+ FGColumnVector3 BuoyantForce;
+ FGColumnVector3 AeroMoment;
+ FGColumnVector3 PropMoment;
+ FGColumnVector3 GroundMoment;
+ FGColumnVector3 ExternalMoment;
+ FGColumnVector3 BuoyantMoment;
+ FGMatrix33 Tl2b;
+ double Weight;
+ } in;
+
private:
FGColumnVector3 vMoments;
FGColumnVector3 vForces;
FGColumnVector3 vXYZvrp;
FGColumnVector3 vXYZep;
FGColumnVector3 vDXYZcg;
- FGColumnVector3 vBodyAccel;
- FGColumnVector3 vNcg;
- FGColumnVector3 vNwcg;
double WingArea, WingSpan, cbar, WingIncidence;
double HTailArea, VTailArea, HTailArm, VTailArm;