170 bool Run(
bool Holding);
281 double GetUVW(
int idx)
const {
return VState.vUVW(idx); }
294 double GetVel(
int idx)
const {
return vVel(idx); }
348 double GetPQR(
int axis)
const {
return VState.vPQR(axis);}
361 double GetPQRi(
int axis)
const {
return VState.vPQRi(axis);}
373 double GetEuler(
int axis)
const {
return VState.qAttitudeLocal.GetEuler(axis); }
397 double GetCosEuler(
int idx)
const {
return VState.qAttitudeLocal.GetCosEuler(idx); }
409 double GetSinEuler(
int idx)
const {
return VState.qAttitudeLocal.GetSinEuler(idx); }
444 if (VState.vLocation.GetRadius() == 0)
return 1.0;
445 else return VState.vLocation.GetRadius();
447 double GetLongitude(
void)
const {
return VState.vLocation.GetLongitude(); }
448 double GetLatitude(
void)
const {
return VState.vLocation.GetLatitude(); }
523 void SetVState(
const VehicleState& vstate);
546 VState.vPQR(
i) = val;
547 VState.vPQRi = VState.vPQR + Ti2b *
in.vOmegaPlanet;
551 VState.vUVW(
i) = val;
552 CalculateInertialVelocity();
559 VState.vLocation.SetLongitude(lon);
560 UpdateVehicleState();
565 VState.vLocation.SetLatitude(lat);
566 UpdateVehicleState();
571 VState.vLocation.SetRadius(r);
572 VState.vInertialPosition = Tec2i * VState.vLocation;
589 void SetPosition(
const double Lon,
const double Lat,
const double Radius)
596 VState.vInertialPosition -= Tb2i*deltaLoc;
597 VState.vLocation -= Tb2ec*deltaLoc;
621 struct VehicleState VState;
648 void CalculateInertialVelocity(
void);
649 void CalculateUVW(
void);
650 void CalculateQuatdot(
void);
654 std::deque <FGColumnVector3>& ValDot,
660 std::deque <FGQuaternion>& ValDot,
664 void UpdateLocationMatrices(
void);
665 void UpdateBodyMatrices(
void);
666 void UpdateVehicleState(
void);
668 void WriteStateFile(
int num);
670 void Debug(
int from);
This class implements a 3 element column vector.
Models inertial forces (e.g.
static constexpr double radtodeg
static constexpr double degtorad
static constexpr double fttom
FGLocation holds an arbitrary location in the Earth centered Earth fixed reference frame (ECEF).
Handles matrix math operations.
FGModel(FGFDMExec *)
Constructor.
void SetDistanceAGLKm(double tt)
const FGMatrix33 & GetTi2ec(void) const
Retrieves the ECI-to-ECEF transformation matrix.
double GetLatitude(void) const
void SetVState(const VehicleState &vstate)
FGColumnVector3 GetECEFVelocity(void) const
Calculates and retrieves the velocity vector relative to the earth centered earth fixed (ECEF) frame.
double GetInertialPosition(int i) const
const FGMatrix33 & GetTl2b(void) const
Retrieves the local-to-body transformation matrix.
void NudgeBodyLocation(const FGColumnVector3 &deltaLoc)
double GetTerrainElevation(void) const
const FGColumnVector3 & GetTerrainAngularVelocity(void) const
~FGPropagate()
Destructor.
const FGMatrix33 & GetTb2ec(void) const
Retrieves the body-to-ECEF transformation matrix.
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)
double GetSinEuler(int idx) const
Retrieves the sine of a vehicle Euler angle component.
void SetTerrainElevation(double tt)
double GetDistanceAGLKm(void) const
const FGColumnVector3 & GetTerrainVelocity(void) const
const FGMatrix33 & GetTec2l(void) const
Retrieves the ECEF-to-local transformation matrix.
void SetLatitude(double lat)
double GetNEDVelocityMagnitude(void) const
Retrieves the total local NED velocity in ft/sec.
double GetLongitude(void) const
const FGQuaternion GetQuaternion(void) const
Returns the quaternion that goes from Local to Body.
double GetUVW(int idx) const
Retrieves a body frame velocity component.
const FGColumnVector3 & GetEuler(void) const
Retrieves the Euler angles that define the vehicle orientation.
void SetLongitudeDeg(double lon)
const FGMatrix33 & GetTi2l(void) const
Retrieves the inertial-to-local transformation matrix.
double GetECEFVelocity(int idx) const
Calculates and retrieves the velocity vector relative to the earth centered earth fixed (ECEF) frame ...
void SetLatitudeDeg(double lat)
void SetLongitude(double lon)
double GetEuler(int axis) const
Retrieves a vehicle Euler angle component.
void SetInitialState(const FGInitialCondition *)
const FGQuaternion & GetQuaterniondot(void) const
Retrieves the time derivative of the body orientation quaternion.
FGColumnVector3 GetEulerDeg(void) const
Retrieves the Euler angles (in degrees) that define the vehicle orientation.
double GetEulerDeg(int axis) const
Retrieves a vehicle Euler angle component in degrees.
double GetAltitudeASL(void) const
Returns the current altitude above sea level.
const VehicleState & GetVState(void) const
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.
eIntegrateType
These define the indices use to select the various integrators.
const FGMatrix33 & GetTl2i(void) const
Retrieves the local-to-inertial transformation matrix.
double GetRadius(void) const
double GetDistanceAGL(void) const
double Gethdot(void) const
Returns the current altitude rate.
double GetVel(int idx) const
Retrieves a Local frame velocity component.
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.
double GetLocation(int i) const
void SetInertialOrientation(const FGQuaternion &Qi)
FGPropagate(FGFDMExec *Executive)
Constructor.
const FGLocation & GetLocation(void) const
double GetPQRi(int axis) const
Retrieves a body frame angular velocity component relative to the ECI (inertial) frame.
void SetLocation(const FGLocation &l)
void SetPQR(unsigned int i, double val)
double GetCosEuler(int idx) const
Retrieves the cosine of a vehicle Euler angle component.
void SetPosition(const double Lon, const double Lat, const double Radius)
const FGMatrix33 & GetTec2i(void) const
Retrieves the ECEF-to-ECI transformation matrix.
void SetAltitudeASL(double altASL)
const FGQuaternion GetQuaternionECEF(void) const
Returns the quaternion that goes from ECEF to Body.
const FGMatrix33 & GetTb2i(void) const
Retrieves the body-to-ECI transformation matrix.
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.
double GetInertialVelocity(int i) const
bool Run(bool Holding)
Runs the state propagation model; called by the Executive Can pass in a value indicating if the execu...
void SetEarthPositionAngle(double EPA)
Sets the Earth position angle.
const FGColumnVector3 & GetVel(void) const
Retrieves the velocity vector.
const FGMatrix33 & GetTi2b(void) const
Retrieves the ECI-to-body transformation matrix.
void InitializeDerivatives()
struct JSBSim::FGPropagate::Inputs in
double GetGeodLatitudeDeg(void) const
double GetPQR(int axis) const
Retrieves a body frame angular velocity component relative to the ECEF frame.
double GetLongitudeDeg(void) const
const FGMatrix33 & GetTec2b(void) const
Retrieves the ECEF-to-body transformation matrix.
void SetLocation(const FGColumnVector3 &lv)
double GetGeodeticAltitudeKm(void) const
double GetGeodeticAltitude(void) const
bool InitModel(void)
Initializes the FGPropagate class after instantiation and prior to first execution.
const FGMatrix33 & GetTb2l(void) const
Retrieves the body-to-local transformation matrix.
const FGQuaternion GetQuaternionECI(void) const
Returns the quaternion that goes from ECI to Body.
const FGMatrix33 & GetTl2ec(void) const
Retrieves the local-to-ECEF transformation matrix.
void SetUVW(unsigned int i, double val)
double GetEarthPositionAngleDeg(void) const
Returns the Earth position angle in degrees.
Models the Quaternion representation of rotations.
The current vehicle state vector structure contains the translational and angular position,...
std::deque< FGColumnVector3 > dqUVWidot
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...
std::deque< FGColumnVector3 > dqPQRidot
std::deque< FGColumnVector3 > dqInertialVelocity
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
std::deque< FGQuaternion > dqQtrndot