44#include "models/FGAuxiliary.h"
45#include "input_output/FGLog.h"
54 : fdmex(FDMExec), MassBalance(fdmex->GetMassBalance()), ttype(tNone)
60 vActingXYZn.InitMatrix();
83 vFb = Transform()*vFn;
98const FGMatrix33& FGForce::Transform(
void)
const
113 err <<
"Unrecognized tranform requested from FGForce::Transform()\n";
121void FGForce::UpdateCustomTransformMatrix(
void)
123 double cp,sp,cr,sr,cy,sy;
124 double srsp, crcy, crsy;
126 cp=cos(vOrient(ePitch)); sp=sin(vOrient(ePitch));
127 cr=cos(vOrient(eRoll)); sr=sin(vOrient(eRoll));
128 cy=cos(vOrient(eYaw)); sy=sin(vOrient(eYaw));
138 mT(1,2) = srsp*cy - crsy;
139 mT(2,2) = srsp*sy + crcy;
142 mT(1,3) = crcy*sp + sr*sy;
143 mT(2,3) = crsy*sp - sr*cy;
149void FGForce::SetAnglesToBody(
double broll,
double bpitch,
double byaw)
151 if (ttype == tCustom) {
152 vOrient(ePitch) = bpitch;
153 vOrient(eRoll) = broll;
154 vOrient(eYaw) = byaw;
156 UpdateCustomTransformMatrix();
179void FGForce::Debug(
int from)
181 if (debug_lvl <= 0)
return;
187 if (debug_lvl & 2 ) {
188 FGLogging log(LogLevel::DEBUG);
189 if (from == 0) log <<
"Instantiated: FGForce\n";
190 if (from == 1) log <<
"Destroyed: FGForce\n";
192 if (debug_lvl & 4 ) {
194 if (debug_lvl & 8 ) {
196 if (debug_lvl & 16) {
198 if (debug_lvl & 64) {
This class implements a 3 element column vector.
Encapsulates the JSBSim simulation executive.
std::shared_ptr< FGPropagate > GetPropagate(void) const
Returns the FGPropagate pointer.
std::shared_ptr< FGAuxiliary > GetAuxiliary(void) const
Returns the FGAuxiliary pointer.
virtual ~FGForce()
Destructor.
FGForce(FGFDMExec *FDMExec)
Constructor.
Main namespace for the JSBSim Flight Dynamics Model.