71#include "simgear/io/iostreams/sgstream.hxx"
88 Inertial =
FDMExec->GetInertial();
123 VState.vLocation.SetEllipse(
in.SemiMajor,
in.SemiMinor);
124 Inertial->SetAltitudeAGL(VState.vLocation, 4.0);
151 Ti2ec = { cos(epa), sin(epa), 0.0,
152 -sin(epa), cos(epa), 0.0,
154 Tec2i = Ti2ec.Transposed();
156 VState.vInertialPosition = Tec2i * VState.vLocation;
158 UpdateLocationMatrices();
165 VState.qAttitudeECI = Ti2l.GetQuaternion()*VState.qAttitudeLocal;
166 UpdateBodyMatrices();
172 vVel = Tb2l * VState.vUVW;
181 VState.vPQRi = VState.vPQR + Ti2b *
in.vOmegaPlanet;
183 CalculateInertialVelocity();
192 VState.dqPQRidot.assign(5,
in.vPQRidot);
193 VState.dqUVWidot.assign(5,
in.vUVWidot);
194 VState.dqInertialVelocity.assign(5, VState.vInertialVelocity);
195 VState.dqQtrndot.assign(5, VState.vQtrndot);
221 if (Holding)
return false;
223 double dt =
in.DeltaT *
rate;
227 if (!
FDMExec->IntegrationSuspended()) {
228 Integrate(VState.qAttitudeECI, VState.vQtrndot, VState.dqQtrndot, dt, integrator_rotational_position);
229 Integrate(VState.vPQRi,
in.vPQRidot, VState.dqPQRidot, dt, integrator_rotational_rate);
230 Integrate(VState.vInertialPosition, VState.vInertialVelocity, VState.dqInertialVelocity, dt, integrator_translational_position);
231 Integrate(VState.vInertialVelocity,
in.vUVWidot, VState.dqUVWidot, dt, integrator_translational_rate);
239 epa +=
in.vOmegaPlanet(
eZ)*dt;
242 double cos_epa = cos(epa);
243 double sin_epa = sin(epa);
244 Ti2ec = { cos_epa, sin_epa, 0.0,
245 -sin_epa, cos_epa, 0.0,
247 Tec2i = Ti2ec.Transposed();
250 VState.vLocation = Ti2ec*VState.vInertialPosition;
254 UpdateLocationMatrices();
258 UpdateBodyMatrices();
267 VState.vPQR = VState.vPQRi - Ti2b *
in.vOmegaPlanet;
272 VState.qAttitudeLocal = Tl2b.GetQuaternion();
276 vVel = Tb2l * VState.vUVW;
287 VState.vUVW.InitMatrix();
288 CalculateInertialVelocity();
289 VState.vPQR.InitMatrix();
290 VState.vPQRi = Ti2b *
in.vOmegaPlanet;
303void FGPropagate::CalculateQuatdot(
void)
316void FGPropagate::CalculateInertialVelocity(
void)
326void FGPropagate::CalculateUVW(
void)
328 VState.vUVW = Ti2b * (VState.vInertialVelocity - (
in.vOmegaPlanet * VState.vInertialPosition));
335 deque <FGColumnVector3>& ValDot,
337 eIntegrateType integration_type)
339 ValDot.push_front(Val);
342 switch(integration_type) {
345 case eTrapezoidal: Integrand += 0.5*dt*(ValDot[0] + ValDot[1]);
349 case eAdamsBashforth3: Integrand += (1/12.0)*dt*(23.0*ValDot[0] - 16.0*ValDot[1] + 5.0*ValDot[2]);
351 case eAdamsBashforth4: Integrand += (1/24.0)*dt*(55.0*ValDot[0] - 59.0*ValDot[1] + 37.0*ValDot[2] - 9.0*ValDot[3]);
353 case eAdamsBashforth5: Integrand += dt*((1901./720.)*ValDot[0] - (1387./360.)*ValDot[1] + (109./30.)*ValDot[2] - (637./360.)*ValDot[3] + (251./720.)*ValDot[4]);
360 throw(
"Can only use Buss (1 & 2) or local linearization integration methods in for rotational position!");
370 deque <FGQuaternion>& ValDot,
372 eIntegrateType integration_type)
374 ValDot.push_front(Val);
377 switch(integration_type) {
380 case eTrapezoidal: Integrand += 0.5*dt*(ValDot[0] + ValDot[1]);
384 case eAdamsBashforth3: Integrand += (1/12.0)*dt*(23.0*ValDot[0] - 16.0*ValDot[1] + 5.0*ValDot[2]);
386 case eAdamsBashforth4: Integrand += (1/24.0)*dt*(55.0*ValDot[0] - 59.0*ValDot[1] + 37.0*ValDot[2] - 9.0*ValDot[3]);
388 case eAdamsBashforth5: Integrand += dt*((1901./720.)*ValDot[0] - (1387./360.)*ValDot[1] + (109./30.)*ValDot[2] - (637./360.)*ValDot[3] + (251./720.)*ValDot[4]);
396 Integrand = Integrand *
QExp(0.5 * dt * VState.vPQRi);
404 FGColumnVector3 wi = VState.vPQRi;
405 FGColumnVector3 wdoti =
in.vPQRidot;
406 FGColumnVector3 omega = wi + 0.5*dt*wdoti + dt*dt/12.*wdoti*wi;
407 Integrand = Integrand *
QExp(0.5 * dt * omega);
416 FGColumnVector3 wi = 0.5 * VState.vPQRi;
417 FGColumnVector3 wdoti = 0.5 *
in.vPQRidot;
418 double omegak2 =
DotProduct(VState.vPQRi, VState.vPQRi);
419 double omegak = omegak2 > 1E-6 ? sqrt(omegak2) : 1E-6;
420 double rhok = 0.5 * dt * omegak;
421 double C1 = cos(rhok);
422 double C2 = 2.0 * sin(rhok) / omegak;
423 double C3 = 4.0 * (1.0 - C1) / (omegak*omegak);
424 double C4 = 4.0 * (dt - C2) / (omegak*omegak);
425 FGColumnVector3 Omega = C2*wi + C3*wdoti + C4*wi*wdoti;
433 Integrand = Integrand * q;
472void FGPropagate::UpdateLocationMatrices(
void)
474 Tl2ec = VState.vLocation.GetTl2ec();
475 Tec2l = Tl2ec.Transposed();
476 Ti2l = Tec2l * Ti2ec;
477 Tl2i = Ti2l.Transposed();
482void FGPropagate::UpdateBodyMatrices(
void)
484 Ti2b = VState.qAttitudeECI.GetT();
485 Tb2i = Ti2b.Transposed();
487 Tb2l = Tl2b.Transposed();
488 Tec2b = Ti2b * Tec2i;
489 Tb2ec = Tec2b.Transposed();
491 Qec2b = Tec2b.GetQuaternion();
498 VState.qAttitudeECI = Qi;
500 UpdateBodyMatrices();
501 VState.qAttitudeLocal = Tl2b.GetQuaternion();
508 VState.vInertialVelocity = Vi;
510 vVel = Tb2l * VState.vUVW;
516 VState.vPQRi = Ti2b * vRates;
517 VState.vPQR = VState.vPQRi - Ti2b *
in.vOmegaPlanet;
525 return VState.vLocation.GetRadius() - VState.vLocation.GetSeaLevelRadius();
532 double slr = VState.vLocation.GetSeaLevelRadius();
533 VState.vLocation.SetRadius(slr + altASL);
534 UpdateVehicleState();
543 Inertial->GetContactPoint(VState.vLocation, contact, normal,
544 LocalTerrainVelocity, LocalTerrainAngularVelocity);
554 Inertial->GetContactPoint(VState.vLocation, contact, vDummy, vDummy, vDummy);
562 Inertial->SetTerrainElevation(terrainElev);
571 Inertial->GetContactPoint(VState.vLocation, contact, vDummy, vDummy, vDummy);
579 return Inertial->GetAltitudeAGL(VState.vLocation);
593 Inertial->SetAltitudeAGL(VState.vLocation, tt);
594 UpdateVehicleState();
610 UpdateLocationMatrices();
613 VState.vUVW = vstate.
vUVW;
614 vVel = Tb2l * VState.vUVW;
615 VState.vPQR = vstate.
vPQR;
616 VState.vPQRi = VState.vPQR + Ti2b *
in.vOmegaPlanet;
623void FGPropagate::UpdateVehicleState(
void)
627 UpdateLocationMatrices();
628 UpdateBodyMatrices();
629 vVel = Tb2l * VState.
vUVW;
637 VState.vLocation = l;
638 UpdateVehicleState();
645 return VState.qAttitudeLocal.GetEuler() *
radtodeg;
654 <<
"------------------------------------------------------------------" <<
reset << endl;
656 <<
"State Report at sim time: " <<
FDMExec->GetSimTime() <<
" seconds" <<
reset << endl;
659 cout <<
" ECI: " << VState.vInertialPosition.Dump(
", ") <<
" (x,y,z, in ft)" << endl;
660 cout <<
" ECEF: " << VState.vLocation <<
" (x,y,z, in ft)" << endl;
661 cout <<
" Local: " << VState.vLocation.GetGeodLatitudeDeg()
662 <<
", " << VState.vLocation.GetLongitudeDeg()
663 <<
", " <<
GetAltitudeASL() <<
" (geodetic lat, lon, alt ASL in deg and ft)" << endl;
666 <<
"Orientation" <<
underoff << endl;
667 cout <<
" ECI: " << VState.qAttitudeECI.GetEulerDeg().Dump(
", ") <<
" (phi, theta, psi in deg)" << endl;
668 cout <<
" Local: " << VState.qAttitudeLocal.GetEulerDeg().Dump(
", ") <<
" (phi, theta, psi in deg)" << endl;
672 cout <<
" ECI: " << VState.vInertialVelocity.Dump(
", ") <<
" (x,y,z in ft/s)" << endl;
673 cout <<
" ECEF: " << (Tb2ec * VState.vUVW).Dump(
", ") <<
" (x,y,z in ft/s)" << endl;
674 cout <<
" Local: " <<
GetVel() <<
" (n,e,d in ft/sec)" << endl;
675 cout <<
" Body: " <<
GetUVW() <<
" (u,v,w in ft/sec)" << endl;
678 <<
"Body Rates (relative to given frame, expressed in body frame)" <<
underoff << endl;
679 cout <<
" ECI: " << (VState.vPQRi*
radtodeg).Dump(
", ") <<
" (p,q,r in deg/s)" << endl;
680 cout <<
" ECEF: " << (VState.vPQR*
radtodeg).Dump(
", ") <<
" (p,q,r in deg/s)" << endl;
685void FGPropagate::WriteStateFile(
int num)
689 if (num == 0)
return;
691 SGPath path =
FDMExec->GetOutputPath();
693 if (path.isNull()) path = SGPath(
"initfile.");
694 else path.append(
"initfile.");
697 path.concat(to_string((
double)
FDMExec->GetSimTime())+
".xml");
702 if (outfile.is_open()) {
703 outfile <<
"<?xml version=\"1.0\"?>" << endl;
704 outfile <<
"<initialize name=\"reset00\">" << endl;
705 outfile <<
" <ubody unit=\"FT/SEC\"> " << VState.
vUVW(
eU) <<
" </ubody> " << endl;
706 outfile <<
" <vbody unit=\"FT/SEC\"> " << VState.
vUVW(
eV) <<
" </vbody> " << endl;
707 outfile <<
" <wbody unit=\"FT/SEC\"> " << VState.
vUVW(
eW) <<
" </wbody> " << endl;
713 outfile <<
" <altitude unit=\"FT\"> " <<
GetDistanceAGL() <<
" </altitude>" << endl;
714 outfile <<
"</initialize>" << endl;
717 cerr <<
"Could not open and/or write the state to the initial conditions file: "
723 if (outfile.is_open()) {
724 outfile <<
"<?xml version=\"1.0\"?>" << endl;
725 outfile <<
"<initialize name=\"IC File\" version=\"2.0\">" << endl;
726 outfile <<
"" << endl;
727 outfile <<
" <position frame=\"ECEF\">" << endl;
728 outfile <<
" <latitude unit=\"DEG\" type=\"geodetic\"> " << VState.vLocation.GetGeodLatitudeDeg() <<
" </latitude>" << endl;
729 outfile <<
" <longitude unit=\"DEG\"> " << VState.vLocation.GetLongitudeDeg() <<
" </longitude>" << endl;
730 outfile <<
" <altitudeMSL unit=\"FT\"> " <<
GetAltitudeASL() <<
" </altitudeMSL>" << endl;
731 outfile <<
" </position>" << endl;
732 outfile <<
"" << endl;
733 outfile <<
" <orientation unit=\"DEG\" frame=\"LOCAL\">" << endl;
734 outfile <<
" <yaw> " << VState.qAttitudeLocal.GetEulerDeg(
eYaw) <<
" </yaw>" << endl;
735 outfile <<
" <pitch> " << VState.qAttitudeLocal.GetEulerDeg(
ePitch) <<
" </pitch>" << endl;
736 outfile <<
" <roll> " << VState.qAttitudeLocal.GetEulerDeg(
eRoll) <<
" </roll>" << endl;
737 outfile <<
" </orientation>" << endl;
738 outfile <<
"" << endl;
739 outfile <<
" <velocity unit=\"FT/SEC\" frame=\"LOCAL\">" << endl;
740 outfile <<
" <x> " <<
GetVel(
eNorth) <<
" </x>" << endl;
741 outfile <<
" <y> " <<
GetVel(
eEast) <<
" </y>" << endl;
742 outfile <<
" <z> " <<
GetVel(
eDown) <<
" </z>" << endl;
743 outfile <<
" </velocity>" << endl;
744 outfile <<
"" << endl;
745 outfile <<
" <attitude_rate unit=\"DEG/SEC\" frame=\"BODY\">" << endl;
746 outfile <<
" <roll> " << (VState.vPQR*
radtodeg)(
eRoll) <<
" </roll>" << endl;
747 outfile <<
" <pitch> " << (VState.vPQR*
radtodeg)(
ePitch) <<
" </pitch>" << endl;
748 outfile <<
" <yaw> " << (VState.vPQR*
radtodeg)(
eYaw) <<
" </yaw>" << endl;
749 outfile <<
" </attitude_rate>" << endl;
750 outfile <<
"" << endl;
751 outfile <<
"</initialize>" << endl;
754 cerr <<
"Could not open and/or write the state to the initial conditions file: "
759 cerr <<
"When writing a state file, the supplied value must be 1 or 2 for the version number of the resulting IC file" << endl;
765void FGPropagate::bind(
void)
835 PropertyManager->Tie(
"simulation/integrator/rate/rotational", (
int*)&integrator_rotational_rate);
836 PropertyManager->Tie(
"simulation/integrator/rate/translational", (
int*)&integrator_translational_rate);
837 PropertyManager->Tie(
"simulation/integrator/position/rotational", (
int*)&integrator_rotational_position);
838 PropertyManager->Tie(
"simulation/integrator/position/translational", (
int*)&integrator_translational_position);
840 PropertyManager->Tie(
"simulation/write-state-file",
this, (iPMF)0, &FGPropagate::WriteStateFile);
862void FGPropagate::Debug(
int from)
872 if (from == 0) cout <<
"Instantiated: FGPropagate" << endl;
873 if (from == 1) cout <<
"Destroyed: FGPropagate" << endl;
879 <<
" Propagation Report (English units: ft, degrees) at simulation time " <<
FDMExec->GetSimTime() <<
" seconds"
882 cout <<
highint <<
" Earth Position Angle (deg): " << setw(8) << setprecision(3) <<
reset
885 cout <<
highint <<
" Body velocity (ft/sec): " << setw(8) << setprecision(3) <<
reset << VState.vUVW << endl;
886 cout <<
highint <<
" Local velocity (ft/sec): " << setw(8) << setprecision(3) <<
reset << vVel << endl;
887 cout <<
highint <<
" Inertial velocity (ft/sec): " << setw(8) << setprecision(3) <<
reset << VState.vInertialVelocity << endl;
888 cout <<
highint <<
" Inertial Position (ft): " << setw(10) << setprecision(3) <<
reset << VState.vInertialPosition << endl;
889 cout <<
highint <<
" Latitude (deg): " << setw(8) << setprecision(3) <<
reset << VState.vLocation.GetLatitudeDeg() << endl;
890 cout <<
highint <<
" Longitude (deg): " << setw(8) << setprecision(3) <<
reset << VState.vLocation.GetLongitudeDeg() << endl;
894 cout <<
highint <<
" Matrix ECEF to Body (Orientation of Body with respect to ECEF): "
895 <<
reset << endl << Tec2b.Dump(
"\t",
" ") << endl;
896 cout <<
highint <<
" Associated Euler angles (deg): " << setw(8)
900 cout <<
highint <<
" Matrix Body to ECEF (Orientation of ECEF with respect to Body):"
901 <<
reset << endl << Tb2ec.Dump(
"\t",
" ") << endl;
902 cout <<
highint <<
" Associated Euler angles (deg): " << setw(8)
906 cout <<
highint <<
" Matrix Local to Body (Orientation of Body with respect to Local):"
907 <<
reset << endl << Tl2b.Dump(
"\t",
" ") << endl;
908 cout <<
highint <<
" Associated Euler angles (deg): " << setw(8)
912 cout <<
highint <<
" Matrix Body to Local (Orientation of Local with respect to Body):"
913 <<
reset << endl << Tb2l.Dump(
"\t",
" ") << endl;
914 cout <<
highint <<
" Associated Euler angles (deg): " << setw(8)
918 cout <<
highint <<
" Matrix Local to ECEF (Orientation of ECEF with respect to Local):"
919 <<
reset << endl << Tl2ec.Dump(
"\t",
" ") << endl;
920 cout <<
highint <<
" Associated Euler angles (deg): " << setw(8)
924 cout <<
highint <<
" Matrix ECEF to Local (Orientation of Local with respect to ECEF):"
925 <<
reset << endl << Tec2l.Dump(
"\t",
" ") << endl;
926 cout <<
highint <<
" Associated Euler angles (deg): " << setw(8)
930 cout <<
highint <<
" Matrix ECEF to Inertial (Orientation of Inertial with respect to ECEF):"
931 <<
reset << endl << Tec2i.Dump(
"\t",
" ") << endl;
932 cout <<
highint <<
" Associated Euler angles (deg): " << setw(8)
936 cout <<
highint <<
" Matrix Inertial to ECEF (Orientation of ECEF with respect to Inertial):"
937 <<
reset << endl << Ti2ec.Dump(
"\t",
" ") << endl;
938 cout <<
highint <<
" Associated Euler angles (deg): " << setw(8)
942 cout <<
highint <<
" Matrix Inertial to Body (Orientation of Body with respect to Inertial):"
943 <<
reset << endl << Ti2b.Dump(
"\t",
" ") << endl;
944 cout <<
highint <<
" Associated Euler angles (deg): " << setw(8)
948 cout <<
highint <<
" Matrix Body to Inertial (Orientation of Inertial with respect to Body):"
949 <<
reset << endl << Tb2i.Dump(
"\t",
" ") << endl;
950 cout <<
highint <<
" Associated Euler angles (deg): " << setw(8)
954 cout <<
highint <<
" Matrix Inertial to Local (Orientation of Local with respect to Inertial):"
955 <<
reset << endl << Ti2l.Dump(
"\t",
" ") << endl;
956 cout <<
highint <<
" Associated Euler angles (deg): " << setw(8)
960 cout <<
highint <<
" Matrix Local to Inertial (Orientation of Inertial with respect to Local):"
961 <<
reset << endl << Tl2i.Dump(
"\t",
" ") << endl;
962 cout <<
highint <<
" Associated Euler angles (deg): " << setw(8)
966 cout << setprecision(6);
970 if (fabs(VState.vPQR.Magnitude()) > 1000.0) {
972 s <<
"Vehicle rotation rate is excessive (>1000 rad/sec): " << VState.vPQR.Magnitude();
973 cerr << endl << s.str() << endl;
974 throw BaseException(s.str());
976 if (fabs(VState.vUVW.Magnitude()) > 1.0e10) {
978 s <<
"Vehicle velocity is excessive (>1e10 ft/sec): " << VState.vUVW.Magnitude();
979 cerr << endl << s.str() << endl;
980 throw BaseException(s.str());
984 s <<
"Vehicle altitude is excessive (>1e10 ft): " <<
GetDistanceAGL();
985 cerr << endl << s.str() << endl;
986 throw BaseException(s.str());
JSBSim::FGFDMExec * FDMExec
This class implements a 3 element column vector.
FGColumnVector3 & Normalize(void)
Normalize.
const FGQuaternion & GetOrientation(void) const
Gets the initial orientation.
const FGColumnVector3 GetPQRRadpsIC(void) const
Gets the initial body rotation rate.
const FGLocation & GetPosition(void) const
Gets the initial position.
double GetEarthPositionAngleIC(void) const
Gets the initial Earth position angle.
const FGColumnVector3 GetUVWFpsIC(void) const
Gets the initial body velocity.
static constexpr double radtodeg
static char highint[5]
highlights text
static char reset[5]
resets text properties
static char fgblue[6]
blue text
static char underoff[6]
underline off
static char underon[5]
underlines text
FGLocation holds an arbitrary location in the Earth centered Earth fixed reference frame (ECEF).
double GetGeodAltitude(void) const
Gets the geodetic altitude in feet.
double GetLongitudeDeg() const
Get the longitude.
double GetRadius() const
Get the distance from the center of the earth in feet.
void SetEllipse(double semimajor, double semiminor)
Sets the semimajor and semiminor axis lengths for this planet.
double GetLatitudeDeg() const
Get the GEOCENTRIC latitude in degrees.
FGQuaternion GetQuaternion(void) const
Returns the quaternion associated with this direction cosine (rotation) matrix.
FGPropertyManager * PropertyManager
bool InitModel(void) override
FGModel(FGFDMExec *)
Constructor.
virtual bool Run(bool Holding)
Runs the model; called by the Executive.
void SetDistanceAGLKm(double tt)
double GetLatitude(void) const
void SetVState(const VehicleState &vstate)
double GetTerrainElevation(void) const
~FGPropagate()
Destructor.
void RecomputeLocalTerrainVelocity()
void SetInertialRates(const FGColumnVector3 &vRates)
double GetEarthPositionAngle(void) const
Returns the Earth position angle.
double GetAltitudeASLmeters(void) const
Returns the current altitude above sea level.
void SetDistanceAGL(double tt)
double GetGeodLatitudeRad(void) const
void SetAltitudeASLmeters(double altASL)
void SetTerrainElevation(double tt)
double GetDistanceAGLKm(void) const
void SetLatitude(double lat)
double GetNEDVelocityMagnitude(void) const
Retrieves the total local NED velocity in ft/sec.
double GetLongitude(void) const
const FGColumnVector3 & GetEuler(void) const
Retrieves the Euler angles that define the vehicle orientation.
void SetLongitudeDeg(double lon)
void SetLatitudeDeg(double lat)
void SetLongitude(double lon)
void SetInitialState(const FGInitialCondition *)
FGColumnVector3 GetEulerDeg(void) const
Retrieves the Euler angles (in degrees) that define the vehicle orientation.
double GetAltitudeASL(void) const
Returns the current altitude above sea level.
double GetLocalTerrainRadius(void) const
Returns the "constant" LocalTerrainRadius.
void SetInertialVelocity(const FGColumnVector3 &Vi)
const FGColumnVector3 & GetInertialVelocity(void) const
Retrieves the inertial velocity vector in ft/sec.
double GetRadius(void) const
double GetDistanceAGL(void) const
double Gethdot(void) const
Returns the current altitude rate.
const FGColumnVector3 & GetPQRi(void) const
Retrieves the body angular rates vector, relative to the ECI (inertial) frame.
const FGColumnVector3 & GetInertialPosition(void) const
Retrieves the inertial position vector.
void SetHoldDown(bool hd)
Sets the property forces/hold-down.
void SetInertialOrientation(const FGQuaternion &Qi)
FGPropagate(FGFDMExec *Executive)
Constructor.
const FGLocation & GetLocation(void) const
void SetLocation(const FGLocation &l)
void SetAltitudeASL(double altASL)
double GetInertialVelocityMagnitude(void) const
Retrieves the total inertial velocity in ft/sec.
const FGColumnVector3 & GetPQR(void) const
Retrieves the body angular rates vector, relative to the ECEF frame.
double GetLatitudeDeg(void) const
const FGColumnVector3 & GetUVW(void) const
Retrieves the body frame vehicle velocity vector.
bool Run(bool Holding)
Runs the state propagation model; called by the Executive Can pass in a value indicating if the execu...
const FGColumnVector3 & GetVel(void) const
Retrieves the velocity vector.
void InitializeDerivatives()
struct JSBSim::FGPropagate::Inputs in
double GetGeodLatitudeDeg(void) const
double GetLongitudeDeg(void) const
double GetGeodeticAltitudeKm(void) const
double GetGeodeticAltitude(void) const
bool InitModel(void)
Initializes the FGPropagate class after instantiation and prior to first execution.
double GetEarthPositionAngleDeg(void) const
Returns the Earth position angle in degrees.
Models the Quaternion representation of rotations.
const FGColumnVector3 & GetEuler(void) const
Retrieves the Euler angles.
FGQuaternion GetQDot(const FGColumnVector3 &PQR) const
Quaternion derivative for given angular rates.
void Normalize(void)
Normalize.
double DotProduct(const FGColumnVector3 &v1, const FGColumnVector3 &v2)
Dot product of two vectors Compute and return the euclidean dot (or scalar) product of two vectors v1...
FGQuaternion QExp(const FGColumnVector3 &omega)
Quaternion exponential.
The current vehicle state vector structure contains the translational and angular position,...
FGColumnVector3 vUVW
The velocity vector of the vehicle with respect to the ECEF frame, expressed in the body system.
FGColumnVector3 vPQRi
The angular velocity vector for the vehicle body frame relative to the ECI frame, expressed in the bo...
FGColumnVector3 vPQR
The angular velocity vector for the vehicle relative to the ECEF frame, expressed in the body frame.
FGQuaternion qAttitudeECI
The current orientation of the vehicle, that is, the orientation of the body frame relative to the in...
FGColumnVector3 vInertialPosition
FGLocation vLocation
Represents the current location of the vehicle in Earth centered Earth fixed (ECEF) frame.
FGQuaternion qAttitudeLocal
The current orientation of the vehicle, that is, the orientation of the body frame relative to the lo...
FGColumnVector3 vInertialVelocity