You can subscribe to this list here.
2004 |
Jan
|
Feb
|
Mar
|
Apr
(64) |
May
(260) |
Jun
(65) |
Jul
(28) |
Aug
(13) |
Sep
(46) |
Oct
(55) |
Nov
(25) |
Dec
(57) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2005 |
Jan
(97) |
Feb
(13) |
Mar
(90) |
Apr
(25) |
May
(97) |
Jun
(124) |
Jul
(39) |
Aug
(16) |
Sep
(62) |
Oct
(13) |
Nov
(32) |
Dec
(258) |
2006 |
Jan
(87) |
Feb
(67) |
Mar
(27) |
Apr
(19) |
May
(42) |
Jun
(12) |
Jul
(31) |
Aug
(51) |
Sep
(7) |
Oct
(4) |
Nov
(27) |
Dec
(6) |
2007 |
Jan
(23) |
Feb
(41) |
Mar
(6) |
Apr
(14) |
May
(31) |
Jun
(6) |
Jul
(9) |
Aug
(13) |
Sep
(41) |
Oct
(26) |
Nov
(13) |
Dec
(11) |
2008 |
Jan
(75) |
Feb
(24) |
Mar
(32) |
Apr
(103) |
May
(49) |
Jun
(15) |
Jul
(45) |
Aug
(61) |
Sep
(6) |
Oct
(12) |
Nov
(18) |
Dec
(32) |
2009 |
Jan
(77) |
Feb
(33) |
Mar
(33) |
Apr
(19) |
May
(52) |
Jun
(43) |
Jul
(14) |
Aug
(80) |
Sep
(32) |
Oct
(81) |
Nov
(20) |
Dec
(12) |
2010 |
Jan
(15) |
Feb
(50) |
Mar
(28) |
Apr
(49) |
May
(12) |
Jun
(19) |
Jul
(78) |
Aug
(49) |
Sep
(52) |
Oct
(22) |
Nov
(108) |
Dec
(33) |
2011 |
Jan
(47) |
Feb
(3) |
Mar
(7) |
Apr
(3) |
May
(7) |
Jun
(43) |
Jul
(80) |
Aug
(55) |
Sep
(34) |
Oct
(33) |
Nov
(33) |
Dec
(20) |
2012 |
Jan
(16) |
Feb
(18) |
Mar
(29) |
Apr
(26) |
May
(4) |
Jun
(5) |
Jul
(13) |
Aug
(14) |
Sep
(47) |
Oct
(29) |
Nov
(19) |
Dec
(66) |
2013 |
Jan
(55) |
Feb
(46) |
Mar
|
Apr
(1) |
May
|
Jun
(32) |
Jul
|
Aug
(1) |
Sep
(40) |
Oct
(3) |
Nov
(43) |
Dec
(26) |
2014 |
Jan
(63) |
Feb
(30) |
Mar
(2) |
Apr
(3) |
May
(51) |
Jun
(18) |
Jul
(4) |
Aug
(6) |
Sep
(10) |
Oct
|
Nov
(17) |
Dec
(3) |
2015 |
Jan
(13) |
Feb
(36) |
Mar
(12) |
Apr
(37) |
May
(8) |
Jun
|
Jul
(29) |
Aug
(23) |
Sep
(55) |
Oct
(82) |
Nov
(57) |
Dec
(72) |
2016 |
Jan
(61) |
Feb
(6) |
Mar
(1) |
Apr
(18) |
May
(59) |
Jun
(42) |
Jul
(24) |
Aug
(20) |
Sep
(6) |
Oct
|
Nov
(8) |
Dec
(1) |
2017 |
Jan
(2) |
Feb
(20) |
Mar
(14) |
Apr
(4) |
May
(9) |
Jun
(7) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Jon S. B. <jb...@us...> - 2004-04-24 17:13:16
|
Update of /cvsroot/jsbsim/JSBSim In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9733 Modified Files: FGAircraft.cpp FGAuxiliary.cpp FGAuxiliary.h FGInertial.cpp FGJSBBase.h FGModel.cpp FGOutput.cpp FGPropagate.cpp FGPropagate.h FGPropulsion.cpp FGState.cpp JSBSim.cbx JSBSim.cxx Makefile.am Makefile.solo makemake.pl Removed Files: FGTurbine.cpp FGTurbine.h Log Message: Changes to the Propagate mode - removed VRP items to FGAuxiliary, etc.; removed FGTurbine Index: FGAircraft.cpp =================================================================== RCS file: /cvsroot/jsbsim/JSBSim/FGAircraft.cpp,v retrieving revision 1.132 retrieving revision 1.133 diff -C2 -r1.132 -r1.133 *** FGAircraft.cpp 17 Apr 2004 21:21:26 -0000 1.132 --- FGAircraft.cpp 24 Apr 2004 17:12:57 -0000 1.133 *************** *** 230,234 **** *AC_cfg >> vXYZvrp(eX) >> vXYZvrp(eY) >> vXYZvrp(eZ); if (debug_lvl > 0) cout << " Visual Ref Pt (x, y, z): " << vXYZvrp << endl; ! Propagate->SetVRP(vXYZvrp); } else if (parameter == "AC_POINTMASS") { *AC_cfg >> pmWt >> pmX >> pmY >> pmZ; --- 230,234 ---- *AC_cfg >> vXYZvrp(eX) >> vXYZvrp(eY) >> vXYZvrp(eZ); if (debug_lvl > 0) cout << " Visual Ref Pt (x, y, z): " << vXYZvrp << endl; ! Auxiliary->SetVRP(vXYZvrp); } else if (parameter == "AC_POINTMASS") { *AC_cfg >> pmWt >> pmX >> pmY >> pmZ; Index: FGAuxiliary.cpp =================================================================== RCS file: /cvsroot/jsbsim/JSBSim/FGAuxiliary.cpp,v retrieving revision 1.53 retrieving revision 1.54 diff -C2 -r1.53 -r1.54 *** FGAuxiliary.cpp 17 Apr 2004 21:21:26 -0000 1.53 --- FGAuxiliary.cpp 24 Apr 2004 17:12:57 -0000 1.54 *************** *** 83,86 **** --- 83,88 ---- vAeroPQR.InitMatrix(); vEulerRates.InitMatrix(); + LongitudeVRP = LatitudeVRP = 0.0; + vVRPoffset.InitMatrix(); bind(); *************** *** 102,109 **** { double A,B,D, hdot_Vt; ! FGColumnVector3& vPQR = Propagate->GetPQR(); ! FGColumnVector3& vUVW = Propagate->GetUVW(); ! FGColumnVector3& vUVWdot = Propagate->GetUVWdot(); ! FGColumnVector3& vVel = Propagate->GetVel(); if (!FGModel::Run()) --- 104,111 ---- { double A,B,D, hdot_Vt; ! const FGColumnVector3& vPQR = Propagate->GetPQR(); ! const FGColumnVector3& vUVW = Propagate->GetUVW(); ! const FGColumnVector3& vUVWdot = Propagate->GetUVWdot(); ! const FGColumnVector3& vVel = Propagate->GetVel(); if (!FGModel::Run()) *************** *** 218,221 **** --- 220,237 ---- earthPosAngle += State->Getdt()*Inertial->omega(); + const FGColumnVector3& vLocation = Propagate->GetLocation(); + vVRPoffset = Propagate->GetTb2l() * MassBalance->StructuralToBody(Aircraft->GetXYZvrp()); + + // vVRP - the vector to the Visual Reference Point - now contains the + // offset from the CG to the VRP, in units of feet, in the Local coordinate + // frame, where X points north, Y points East, and Z points down. This needs + // to be converted to Lat/Lon/Alt, now. + + if (cos(vLocation(eLat)) != 0) + vLocationVRP(eLong) = vVRPoffset(eEast) / (vLocation(eRad) * cos(vLocation(eLat))) + vLocation(eLong); + + vLocationVRP(eLat) = vVRPoffset(eNorth) / vLocation(eRad) + vLocation(eLat); + vLocationVRP(eRad) = Propagate->Geth() - vVRPoffset(eDown); // this is really a height, not a radius + return false; } else { Index: FGAuxiliary.h =================================================================== RCS file: /cvsroot/jsbsim/JSBSim/FGAuxiliary.h,v retrieving revision 1.42 retrieving revision 1.43 diff -C2 -r1.42 -r1.43 *** FGAuxiliary.h 6 Apr 2004 13:44:01 -0000 1.42 --- FGAuxiliary.h 24 Apr 2004 17:12:57 -0000 1.43 *************** *** 111,114 **** --- 111,115 ---- @param Executive a pointer to the parent executive object */ FGAuxiliary(FGFDMExec* Executive); + /// Destructor ~FGAuxiliary(); *************** *** 118,185 **** bool Run(void); ! // Use FGInitialCondition to set these speeds ! inline double GetVcalibratedFPS(void) const { return vcas; } ! inline double GetVcalibratedKTS(void) const { return vcas*fpstokts; } ! inline double GetVequivalentFPS(void) const { return veas; } ! inline double GetVequivalentKTS(void) const { return veas*fpstokts; } ! inline double GetTotalTemperature(void) const { return tat; } ! inline double GetTAT_C(void) const { return tatc; } // total pressure above is freestream total pressure for subsonic only // for supersonic it is the 1D total pressure behind a normal shock ! inline double GetTotalPressure(void) const { return pt; } ! ! inline FGColumnVector3& GetPilotAccel(void) { return vPilotAccel; } ! inline double GetPilotAccel(int idx) const { return vPilotAccel(idx); } ! FGColumnVector3 GetNpilot(void) const { return vPilotAccelN; } ! double GetNpilot(int idx) const { return vPilotAccelN(idx); } ! inline FGColumnVector3& GetAeroPQR(void) {return vAeroPQR;} ! inline double GetAeroPQR(int axis) const {return vAeroPQR(axis);} ! FGColumnVector3& GetEulerRates(void) { return vEulerRates; } double GetEulerRates(int axis) const { return vEulerRates(axis); } ! inline FGColumnVector3& GetAeroUVW (void) { return vAeroUVW; } ! inline double GetAeroUVW (int idx) const { return vAeroUVW(idx); } ! double Getalpha(void) const { return alpha; } ! double Getbeta (void) const { return beta; } ! inline double GetMagBeta(void) const { return fabs(beta); } ! double Getqbar (void) const { return qbar; } ! double GetqbarUW (void) const { return qbarUW; } ! double GetqbarUV (void) const { return qbarUV; } ! inline double GetVt (void) const { return Vt; } ! inline double GetVground(void) const { return Vground; } ! double GetMach (void) const { return Mach; } ! inline double GetMachU(void) const { return MachU; } ! double Getadot (void) const { return adot; } ! double Getbdot (void) const { return bdot; } void SetAeroUVW(FGColumnVector3 tt) { vAeroUVW = tt; } ! inline void Setalpha(double tt) { alpha = tt; } ! inline void Setbeta (double tt) { beta = tt; } ! inline void Setqbar (double tt) { qbar = tt; } ! inline void SetqbarUW (double tt) { qbarUW = tt; } ! inline void SetqbarUV (double tt) { qbarUV = tt; } ! inline void SetVt (double tt) { Vt = tt; } ! inline void SetMach (double tt) { Mach=tt; } ! inline void Setadot (double tt) { adot = tt; } ! inline void Setbdot (double tt) { bdot = tt; } ! ! inline void SetAB(double t1, double t2) { alpha=t1; beta=t2; } ! inline double GetEarthPositionAngle(void) const { return earthPosAngle; } ! ! inline double GetGamma(void) const { return gamma; } ! inline void SetGamma(double tt) { gamma = tt; } ! inline double GetGroundTrack(void) const { return psigt; } ! ! inline void SetDayOfYear(int doy) { day_of_year = doy; } ! inline int GetDayOfYear(void) const { return day_of_year; } ! inline void SetSecondsInDay(double sid) { seconds_in_day = sid; } ! inline double GetSecondsInDay(void) const { return seconds_in_day; } ! double GetHeadWind(void); ! double GetCrossWind(void); void bind(void); --- 119,195 ---- bool Run(void); ! // GET functions ! // Atmospheric parameters GET functions ! double GetVcalibratedFPS(void) const { return vcas; } ! double GetVcalibratedKTS(void) const { return vcas*fpstokts; } ! double GetVequivalentFPS(void) const { return veas; } ! double GetVequivalentKTS(void) const { return veas*fpstokts; } // total pressure above is freestream total pressure for subsonic only // for supersonic it is the 1D total pressure behind a normal shock ! double GetTotalPressure(void) const { return pt; } ! double GetTotalTemperature(void) const { return tat; } ! double GetTAT_C(void) const { return tatc; } ! ! double GetPilotAccel(int idx) const { return vPilotAccel(idx); } ! double GetNpilot(int idx) const { return vPilotAccelN(idx); } ! double GetAeroPQR(int axis) const { return vAeroPQR(axis); } double GetEulerRates(int axis) const { return vEulerRates(axis); } + double GetLocationVRP(int i) const { return vLocationVRP(i); } ! const FGColumnVector3& GetPilotAccel (void) const { return vPilotAccel; } ! const FGColumnVector3& GetNpilot (void) const { return vPilotAccelN; } ! const FGColumnVector3& GetAeroPQR (void) const { return vAeroPQR; } ! const FGColumnVector3& GetEulerRates (void) const { return vEulerRates; } ! const FGColumnVector3& GetAeroUVW (void) const { return vAeroUVW; } ! const FGColumnVector3& GetLocationVRP(void) const { return vLocationVRP; } ! ! double GetAeroUVW (int idx) const { return vAeroUVW(idx); } ! double Getalpha (void) const { return alpha; } ! double Getbeta (void) const { return beta; } ! double Getadot (void) const { return adot; } ! double Getbdot (void) const { return bdot; } ! double GetMagBeta (void) const { return fabs(beta); } ! double Getqbar (void) const { return qbar; } ! double GetqbarUW (void) const { return qbarUW; } ! double GetqbarUV (void) const { return qbarUV; } ! double GetVt (void) const { return Vt; } ! double GetVground (void) const { return Vground; } ! double GetMach (void) const { return Mach; } ! double GetMachU (void) const { return MachU; } ! ! double GetGamma(void) const { return gamma; } ! double GetGroundTrack(void) const { return psigt; } ! double GetEarthPositionAngle(void) const { return earthPosAngle; } ! double GetHeadWind(void); ! double GetCrossWind(void); ! ! // SET functions void SetAeroUVW(FGColumnVector3 tt) { vAeroUVW = tt; } ! void Setalpha (double tt) { alpha = tt; } ! void Setbeta (double tt) { beta = tt; } ! void Setqbar (double tt) { qbar = tt; } ! void SetqbarUW (double tt) { qbarUW = tt; } ! void SetqbarUV (double tt) { qbarUV = tt; } ! void SetVt (double tt) { Vt = tt; } ! void SetMach (double tt) { Mach=tt; } ! void Setadot (double tt) { adot = tt; } ! void Setbdot (double tt) { bdot = tt; } ! ! void SetVRP (FGColumnVector3& vrp) { vVRP = vrp; } ! void SetAB (double t1, double t2) { alpha=t1; beta=t2; } ! void SetGamma (double tt) { gamma = tt; } ! // Time routines, SET and GET functions ! ! void SetDayOfYear (int doy) { day_of_year = doy; } ! void SetSecondsInDay (double sid) { seconds_in_day = sid; } ! ! int GetDayOfYear (void) const { return day_of_year; } ! double GetSecondsInDay (void) const { return seconds_in_day; } void bind(void); *************** *** 188,194 **** private: double vcas, veas; ! double rhosl, rho, p, psl, pt, tat, sat, tatc; ! ! // Don't add a getter for pt! FGColumnVector3 vPilotAccel; --- 198,202 ---- private: double vcas, veas; ! double rhosl, rho, p, psl, pt, tat, sat, tatc; // Don't add a getter for pt! FGColumnVector3 vPilotAccel; *************** *** 200,204 **** --- 208,216 ---- FGColumnVector3 vEulerRates; FGColumnVector3 vMachUVW; + FGColumnVector3 vVRP; + FGColumnVector3 vVRPoffset; + FGColumnVector3 vLocationVRP; + double hVRP, LongitudeVRP, LatitudeVRP; double Vt, Vground, Mach, MachU; double qbar, qbarUW, qbarUV; *************** *** 206,213 **** double adot,bdot; double psigt, gamma; - int day_of_year; // GMT day, 1 .. 366 double seconds_in_day; // seconds since current GMT day began double earthPosAngle; void Debug(int from); --- 218,229 ---- double adot,bdot; double psigt, gamma; double seconds_in_day; // seconds since current GMT day began + int day_of_year; // GMT day, 1 .. 366 double earthPosAngle; + double seaLevelRadius; // radius of sea level, in ft. + double altitude; // altitude above sea level, in ft. + double groundRadius; // radius of runway, in ft. + double distanceAGL; // distance above runway, in ft. void Debug(int from); *************** *** 218,220 **** //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% #endif - --- 234,235 ---- Index: FGInertial.cpp =================================================================== RCS file: /cvsroot/jsbsim/JSBSim/FGInertial.cpp,v retrieving revision 1.36 retrieving revision 1.37 diff -C2 -r1.36 -r1.37 *** FGInertial.cpp 17 Apr 2004 21:21:26 -0000 1.36 --- FGInertial.cpp 24 Apr 2004 17:12:57 -0000 1.37 *************** *** 94,100 **** // motion over the curved surface of the earth (second set). ! vOmegaLocal(eX) = omega() * cos(Propagate->GetLatitude()); vOmegaLocal(eY) = 0.0; ! vOmegaLocal(eZ) = omega() * -sin(Propagate->GetLatitude()); vOmegaLocal(eX) += Propagate->GetVe() / Propagate->GetRadius(); --- 94,100 ---- // motion over the curved surface of the earth (second set). ! vOmegaLocal(eX) = omega() * cos(Propagate->GetLocation(eLat)); vOmegaLocal(eY) = 0.0; ! vOmegaLocal(eZ) = omega() * -sin(Propagate->GetLocation(eLat)); vOmegaLocal(eX) += Propagate->GetVe() / Propagate->GetRadius(); *************** *** 106,113 **** // Centrifugal acceleration. ! vCoriolis(eEast) = 2.0*omega() * (Propagate->GetVd()*cos(Propagate->GetLatitude()) + ! Propagate->GetVn()*sin(Propagate->GetLatitude())); ! vRadius(eDown) = Propagate->GetRadius(); vCentrifugal(eDown) = -vOmegaLocal.Magnitude() * vOmegaLocal.Magnitude() * vRadius(eDown); --- 106,113 ---- // Centrifugal acceleration. ! vCoriolis(eEast) = 2.0*omega() * (Propagate->GetVd()*cos(Propagate->GetLocation(eLat)) + ! Propagate->GetVn()*sin(Propagate->GetLocation(eLat))); ! vRadius(eDown) = Propagate->GetLocation(eRad); vCentrifugal(eDown) = -vOmegaLocal.Magnitude() * vOmegaLocal.Magnitude() * vRadius(eDown); Index: FGJSBBase.h =================================================================== RCS file: /cvsroot/jsbsim/JSBSim/FGJSBBase.h,v retrieving revision 1.51 retrieving revision 1.52 diff -C2 -r1.51 -r1.52 *** FGJSBBase.h 17 Apr 2004 21:21:26 -0000 1.51 --- FGJSBBase.h 24 Apr 2004 17:12:57 -0000 1.52 *************** *** 130,155 **** } Message; - ///@name JSBSim Enums. - //@{ - /// Moments L, M, N - enum {eL = 1, eM, eN }; - /// Rates P, Q, R - enum {eP = 1, eQ, eR }; - /// Velocities U, V, W - enum {eU = 1, eV, eW }; - /// Positions X, Y, Z - enum {eX = 1, eY, eZ }; - /// Euler angles Phi, Theta, Psi - enum {ePhi = 1, eTht, ePsi }; - /// Stability axis forces, Drag, Side force, Lift - enum {eDrag = 1, eSide, eLift }; - /// Local frame orientation Roll, Pitch, Yaw - enum {eRoll = 1, ePitch, eYaw }; - /// Local frame position North, East, Down - enum {eNorth = 1, eEast, eDown }; - /// Locations Radius, Latitude, Longitude - enum {eLat = 1, eLong, eRad }; - //@} - ///@name JSBSim console output highlighting terms. //@{ --- 130,133 ---- *************** *** 211,215 **** //@} string GetVersion(void) {return JSBSim_version;} ! void disableHighLighting(void); --- 189,193 ---- //@} string GetVersion(void) {return JSBSim_version;} ! void disableHighLighting(void); *************** *** 225,229 **** protected: static Message localMsg; ! static std::queue <Message*> Messages; --- 203,207 ---- protected: static Message localMsg; ! static std::queue <Message*> Messages; *************** *** 232,236 **** static unsigned int frame; static unsigned int messageId; ! static const double radtodeg; static const double degtorad; --- 210,214 ---- static unsigned int frame; static unsigned int messageId; ! static const double radtodeg; static const double degtorad; *************** *** 248,251 **** --- 226,249 ---- static const string JSBSim_version; }; + + /// Moments L, M, N + enum {eL = 1, eM, eN }; + /// Rates P, Q, R + enum {eP = 1, eQ, eR }; + /// Velocities U, V, W + enum {eU = 1, eV, eW }; + /// Positions X, Y, Z + enum {eX = 1, eY, eZ }; + /// Euler angles Phi, Theta, Psi + enum {ePhi = 1, eTht, ePsi }; + /// Stability axis forces, Drag, Side force, Lift + enum {eDrag = 1, eSide, eLift }; + /// Local frame orientation Roll, Pitch, Yaw + enum {eRoll = 1, ePitch, eYaw }; + /// Local frame position North, East, Down + enum {eNorth = 1, eEast, eDown }; + /// Locations Radius, Latitude, Longitude + enum {eLat = 1, eLong, eRad }; + } //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Index: FGModel.cpp =================================================================== RCS file: /cvsroot/jsbsim/JSBSim/FGModel.cpp,v retrieving revision 1.29 retrieving revision 1.30 diff -C2 -r1.29 -r1.30 *** FGModel.cpp 18 Apr 2004 11:40:48 -0000 1.29 --- FGModel.cpp 24 Apr 2004 17:12:57 -0000 1.30 *************** *** 28,32 **** FUNCTIONAL DESCRIPTION -------------------------------------------------------------------------------- ! This base class for the FGAero, FGPropagation, etc. classes defines methods common to all models. --- 28,32 ---- FUNCTIONAL DESCRIPTION -------------------------------------------------------------------------------- ! This base class for the FGAerodynamics, FGPropagate, etc. classes defines methods common to all models. Index: FGOutput.cpp =================================================================== RCS file: /cvsroot/jsbsim/JSBSim/FGOutput.cpp,v retrieving revision 1.85 retrieving revision 1.86 diff -C2 -r1.85 -r1.86 *** FGOutput.cpp 17 Apr 2004 21:21:26 -0000 1.85 --- FGOutput.cpp 24 Apr 2004 17:12:57 -0000 1.86 *************** *** 213,218 **** outstream << "Alpha, "; outstream << "Beta, "; ! outstream << "Latitude, "; ! outstream << "Longitude, "; outstream << "Distance AGL, "; outstream << "Runway Radius"; --- 213,218 ---- outstream << "Alpha, "; outstream << "Beta, "; ! outstream << "Latitude (Deg), "; ! outstream << "Longitude (Deg), "; outstream << "Distance AGL, "; outstream << "Runway Radius"; *************** *** 302,307 **** outstream << Auxiliary->Getalpha() << ", "; outstream << Auxiliary->Getbeta() << ", "; ! outstream << Propagate->GetLatitude() << ", "; ! outstream << Propagate->GetLongitude() << ", "; outstream << Propagate->GetDistanceAGL() << ", "; outstream << Propagate->GetRunwayRadius(); --- 302,307 ---- outstream << Auxiliary->Getalpha() << ", "; outstream << Auxiliary->Getbeta() << ", "; ! outstream << Propagate->GetLocation(eLat)*radtodeg << ", "; ! outstream << Propagate->GetLocation(eLong)*radtodeg << ", "; outstream << Propagate->GetDistanceAGL() << ", "; outstream << Propagate->GetRunwayRadius(); *************** *** 372,377 **** socket->Append("Fy"); socket->Append("Fz"); ! socket->Append("Latitude"); ! socket->Append("Longitude"); socket->Append("QBar"); socket->Append("Alpha"); --- 372,377 ---- socket->Append("Fy"); socket->Append("Fz"); ! socket->Append("Latitude (Deg)"); ! socket->Append("Longitude (Deg)"); socket->Append("QBar"); socket->Append("Alpha"); *************** *** 417,422 **** socket->Append(Aircraft->GetForces(eY)); socket->Append(Aircraft->GetForces(eZ)); ! socket->Append(Propagate->GetLatitude()); ! socket->Append(Propagate->GetLongitude()); socket->Append(Auxiliary->Getqbar()); socket->Append(Auxiliary->Getalpha()); --- 417,422 ---- socket->Append(Aircraft->GetForces(eY)); socket->Append(Aircraft->GetForces(eZ)); ! socket->Append(Propagate->GetLocation(eLat)*radtodeg); ! socket->Append(Propagate->GetLocation(eLong)*radtodeg); socket->Append(Auxiliary->Getqbar()); socket->Append(Auxiliary->Getalpha()); Index: FGPropagate.cpp =================================================================== RCS file: /cvsroot/jsbsim/JSBSim/FGPropagate.cpp,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -r1.8 -r1.9 *** FGPropagate.cpp 18 Apr 2004 02:45:51 -0000 1.8 --- FGPropagate.cpp 24 Apr 2004 17:12:58 -0000 1.9 *************** *** 98,103 **** Name = "FGPropagate"; - vVRPoffset.InitMatrix(); - vUVWdot.InitMatrix(); vUVWdot_prev[0].InitMatrix(); --- 98,101 ---- *************** *** 112,116 **** vPQRdot_prev[3].InitMatrix(); - LongitudeVRP = LatitudeVRP = 0.0; hoverbmac = hoverbcg = 0.0; bind(); --- 110,113 ---- *************** *** 132,141 **** FGModel::InitModel(); - h = 3.0; // Est. height of aircraft cg off runway SeaLevelRadius = Inertial->RefRadius(); // For initialization ONLY ! vLocation(eRad) = SeaLevelRadius + h; RunwayRadius = SeaLevelRadius; - DistanceAGL = vLocation(eRad) - RunwayRadius; // Geocentric - vRunwayNormal(3) = -1.0; // Initialized for standalone mode b = 1; return true; --- 129,135 ---- FGModel::InitModel(); SeaLevelRadius = Inertial->RefRadius(); // For initialization ONLY ! vLocation(eRad) = SeaLevelRadius + 4.0; RunwayRadius = SeaLevelRadius; b = 1; return true; *************** *** 144,156 **** //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% /* ! Purpose: Called on a schedule to perform Propagating algorithms ! Notes: [TP] Make sure that -Vt <= hdot <= Vt, which, of course, should always ! be the case ! [JB] Run in standalone mode, SeaLevelRadius will be reference radius. ! In FGFS, SeaLevelRadius is stuffed from FGJSBSim in JSBSim.cxx each pass. */ bool FGPropagate::Run(void) { if (!FGModel::Run()) { double dt = State->Getdt()*rate; --- 138,150 ---- //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% /* ! Purpose: Called on a schedule to perform EOM integration ! Notes: [JB] Run in standalone mode, SeaLevelRadius will be reference radius. ! In FGFS, SeaLevelRadius is stuffed from FGJSBSim in JSBSim.cxx each pass. */ bool FGPropagate::Run(void) { + double DistanceAGL; + if (!FGModel::Run()) { double dt = State->Getdt()*rate; *************** *** 176,195 **** vLocation += State->Integrate(FGState::TRAPZ, dt, vLocationDot, vLocationDot_prev); - // Update altitude parameter - h = vLocation(eRad) - SeaLevelRadius; // Geocentric - - vVRPoffset = vQtrn.GetTInv() * MassBalance->StructuralToBody(Aircraft->GetXYZvrp()); - - // vVRP - the vector to the Visual Reference Point - now contains the - // offset from the CG to the VRP, in units of feet, in the Local coordinate - // frame, where X points north, Y points East, and Z points down. This needs - // to be converted to Lat/Lon/Alt, now. - - if (cos(vLocation(eLat)) != 0) - LongitudeVRP = vVRPoffset(eEast) / (vLocation(eRad) * cos(vLocation(eLat))) + vLocation(eLong); - - LatitudeVRP = vVRPoffset(eNorth) / vLocation(eRad) + vLocation(eLat); - hVRP = h - vVRPoffset(eDown); - DistanceAGL = vLocation(eRad) - RunwayRadius; // Geocentric --- 170,173 ---- *************** *** 199,203 **** vMac = vQtrn.GetTInv()*MassBalance->StructuralToBody(Aircraft->GetXYZrp()); hoverbmac = (DistanceAGL + vMac(3)) / b; - return false; --- 177,180 ---- *************** *** 211,218 **** void FGPropagate::Seth(double tt) { ! h = tt; ! vLocation(eRad) = h + SeaLevelRadius; ! DistanceAGL = vLocation(eRad) - RunwayRadius; // Geocentric ! hoverbcg = DistanceAGL/b; } --- 188,193 ---- void FGPropagate::Seth(double tt) { ! vLocation(eRad) = tt + SeaLevelRadius; ! hoverbcg = (vLocation(eRad) - RunwayRadius)/b; } *************** *** 221,228 **** void FGPropagate::SetDistanceAGL(double tt) { ! DistanceAGL=tt; ! vLocation(eRad) = RunwayRadius + DistanceAGL; ! h = vLocation(eRad) - SeaLevelRadius; ! hoverbcg = DistanceAGL/b; } --- 196,201 ---- void FGPropagate::SetDistanceAGL(double tt) { ! vLocation(eRad) = RunwayRadius + tt; ! hoverbcg = tt/b; } *************** *** 231,236 **** FGColumnVector3& FGPropagate::toGlobe(FGColumnVector3& V) { - vLocation(eRad) = h + SeaLevelRadius; - if (cos(vLocation(eLat)) != 0) vLocationDot(eLong) = V(eEast) / (vLocation(eRad) * cos(vLocation(eLat))); vLocationDot(eLat) = V(eNorth) / vLocation(eRad); --- 204,207 ---- *************** *** 268,275 **** PropertyManager->Tie("position/h-sl-ft", this, &FGPropagate::Geth, &FGPropagate::Seth, true); ! PropertyManager->Tie("position/lat-gc-rad", this, &FGPropagate::GetLatitude, &FGPropagate::SetLatitude); ! PropertyManager->Tie("position/lat-dot-gc-rad", this, &FGPropagate::GetLatitudeDot); ! PropertyManager->Tie("position/long-gc-rad", this, &FGPropagate::GetLongitude, &FGPropagate::SetLongitude, true); ! PropertyManager->Tie("position/long-dot-gc-rad", this, &FGPropagate::GetLongitudeDot); PropertyManager->Tie("position/h-agl-ft", this, &FGPropagate::GetDistanceAGL, &FGPropagate::SetDistanceAGL); PropertyManager->Tie("position/radius-to-vehicle-ft", this, &FGPropagate::GetRadius); --- 239,246 ---- PropertyManager->Tie("position/h-sl-ft", this, &FGPropagate::Geth, &FGPropagate::Seth, true); ! PropertyManager->Tie("position/lat-gc-rad", this, eLat, (PMF)&FGPropagate::GetLocation, &FGPropagate::SetLocation); ! PropertyManager->Tie("position/lat-dot-gc-rad", this, eLat, (PMF)&FGPropagate::GetLocationDot); ! PropertyManager->Tie("position/long-gc-rad", this, eLong, (PMF)&FGPropagate::GetLocation, &FGPropagate::SetLocation, true); ! PropertyManager->Tie("position/long-dot-gc-rad", this, eLong, (PMF)&FGPropagate::GetLocationDot); PropertyManager->Tie("position/h-agl-ft", this, &FGPropagate::GetDistanceAGL, &FGPropagate::SetDistanceAGL); PropertyManager->Tie("position/radius-to-vehicle-ft", this, &FGPropagate::GetRadius); Index: FGPropagate.h =================================================================== RCS file: /cvsroot/jsbsim/JSBSim/FGPropagate.h,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -r1.8 -r1.9 *** FGPropagate.h 18 Apr 2004 02:45:51 -0000 1.8 --- FGPropagate.h 24 Apr 2004 17:12:58 -0000 1.9 *************** *** 83,117 **** bool Run(void); ! inline FGColumnVector3& GetVel(void) { return vVel; } ! inline double GetUVW (int idx) const { return vUVW(idx); } ! inline FGColumnVector3& GetUVW (void) { return vUVW; } ! inline FGColumnVector3& GetUVWdot(void) { return vUVWdot; } ! inline double GetUVWdot(int idx) const { return vUVWdot(idx); } ! inline double GetVn(void) const { return vVel(eX); } ! inline double GetVe(void) const { return vVel(eY); } ! inline double GetVd(void) const { return vVel(eZ); } ! inline double Geth(void) const { return h; } ! inline FGColumnVector3& GetPQR(void) {return vPQR;} ! inline double GetPQR(int axis) const {return vPQR(axis);} ! inline FGColumnVector3& GetPQRdot(void) {return vPQRdot;} ! inline double GetPQRdot(int idx) const {return vPQRdot(idx);} const FGColumnVector3& GetEuler(void) const { return vQtrn.GetEuler(); } ! inline double GetEuler(int axis) const { return vQtrn.GetEuler()(axis); } ! inline void SetPQR(FGColumnVector3 tt) {vPQR = tt;} ! inline void SetPQR(double p, double q, double r) {vPQR(eP)=p; ! vPQR(eQ)=q; ! vPQR(eR)=r;} ! inline double GethVRP(void) const { return hVRP; } ! inline double Gethdot(void) const { return vLocationDot(eRad); } ! inline double GetLatitude(void) const { return vLocation(eLat); } ! inline double GetLatitudeVRP(void) const { return LatitudeVRP; } ! inline double GetLatitudeDot(void) const { return vLocationDot(eLat); } ! inline double GetLongitude(void) const { return vLocation(eLong); } ! inline double GetLongitudeVRP(void) const { return LongitudeVRP; } ! inline double GetLongitudeDot(void) const { return vLocationDot(eLong); } ! inline double GetRunwayRadius(void) const { return RunwayRadius; } ! inline double GetDistanceAGL(void) const { return DistanceAGL; } ! inline double GetRadius(void) const { return vLocation(eRad); } ! inline FGColumnVector3& GetRunwayNormal(void) { return vRunwayNormal; } double Getphi(void) const { return vQtrn.GetEulerPhi(); } --- 83,120 ---- bool Run(void); ! const FGColumnVector3& GetVel(void) { return vVel; } ! const FGColumnVector3& GetUVW (void) { return vUVW; } ! const FGColumnVector3& GetUVWdot(void) { return vUVWdot; } ! const FGColumnVector3& GetPQR(void) {return vPQR;} ! const FGColumnVector3& GetPQRdot(void) {return vPQRdot;} const FGColumnVector3& GetEuler(void) const { return vQtrn.GetEuler(); } ! ! double GetUVW (int idx) const { return vUVW(idx); } ! double GetUVWdot(int idx) const { return vUVWdot(idx); } ! double GetVn(void) const { return vVel(eNorth); } ! double GetVe(void) const { return vVel(eEast); } ! double GetVd(void) const { return vVel(eDown); } ! double Geth(void) const { return vLocation(eRad) - SeaLevelRadius; } ! double GetPQR(int axis) const {return vPQR(axis);} ! double GetPQRdot(int idx) const {return vPQRdot(idx);} ! double GetEuler(int axis) const { return vQtrn.GetEuler()(axis); } ! double Gethdot(void) const { return vLocationDot(eRad); } ! // double GetLatitude(void) const { return vLocation(eLat); } ! // double GetLatitudeDot(void) const { return vLocationDot(eLat); } ! // double GetLongitude(void) const { return vLocation(eLong); } ! // double GetLongitudeDot(void) const { return vLocationDot(eLong); } ! ! /** Returns the "constant" RunwayRadius. ! The RunwayRadius parameter is set by the calling application or set to ! zero if JSBSim is running in standalone mode. ! @return distance of the runway from the center of the earth. ! @units feet */ ! double GetRunwayRadius(void) const { return RunwayRadius; } ! double GetDistanceAGL(void) const { return vLocation(eRad)-RunwayRadius; } ! double GetRadius(void) const { return vLocation(eRad); } ! double GetLocation (int idx) const { return vLocation(idx);} ! double GetLocationDot (int idx) const { return vLocationDot(idx);} ! const FGColumnVector3& GetLocation(void) const { return vLocation;} ! const FGColumnVector3& GetLocationDot(void) const { return vLocationDot;} double Getphi(void) const { return vQtrn.GetEulerPhi(); } *************** *** 135,155 **** const FGMatrix33& GetTb2l(void) { return vQtrn.GetTInv(); } ! inline double GetHOverBCG(void) const { return hoverbcg; } ! inline double GetHOverBMAC(void) const { return hoverbmac; } void SetvVel(const FGColumnVector3& v) { vVel = v; } ! void SetLatitude(double tt) { vLocation(eLat) = tt; } ! void SetLongitude(double tt) { vLocation(eLong) = tt; } void Seth(double tt); void SetRunwayRadius(double tt) { RunwayRadius = tt; } void SetSeaLevelRadius(double tt) { SeaLevelRadius = tt;} void SetDistanceAGL(double tt); ! inline void SetRunwayNormal(double fgx, double fgy, double fgz ) { ! vRunwayNormal << fgx << fgy << fgz; ! } ! void SetVRP(FGColumnVector3& vrp) {vVRP = vrp;} ! void SetEuler(FGColumnVector3 tt) { ! vQtrn = FGQuaternion(tt(ePhi), tt(eTht), tt(ePsi)); ! } void SetUVW(FGColumnVector3 tt) { vUVW = tt; } void bind(void); --- 138,158 ---- const FGMatrix33& GetTb2l(void) { return vQtrn.GetTInv(); } ! double GetHOverBCG(void) const { return hoverbcg; } ! double GetHOverBMAC(void) const { return hoverbmac; } ! ! // SET functions ! void SetvVel(const FGColumnVector3& v) { vVel = v; } ! // void SetLatitude(double tt) { vLocation(eLat) = tt; } ! // void SetLongitude(double tt) { vLocation(eLong) = tt; } ! void SetLocation(int idx, double val) { vLocation(idx) = val; } void Seth(double tt); void SetRunwayRadius(double tt) { RunwayRadius = tt; } void SetSeaLevelRadius(double tt) { SeaLevelRadius = tt;} void SetDistanceAGL(double tt); ! void SetEuler(FGColumnVector3 tt) {vQtrn = FGQuaternion(tt(ePhi), tt(eTht), tt(ePsi));} void SetUVW(FGColumnVector3 tt) { vUVW = tt; } + void SetPQR(FGColumnVector3 tt) {vPQR = tt;} + void SetPQR(double p, double q, double r) {vPQR(eP)=p; vPQR(eQ)=q; vPQR(eR)=r;} void bind(void); *************** *** 158,164 **** private: FGColumnVector3 vVel; - FGColumnVector3 vRunwayNormal; - FGColumnVector3 vVRP; - FGColumnVector3 vVRPoffset; FGColumnVector3 vMac; FGColumnVector3 vLocation; --- 161,164 ---- *************** *** 174,186 **** FGQuaternion vQtrndot_prev[4]; - double h, hVRP; - double LongitudeVRP, LatitudeVRP; double dt; ! double RunwayRadius; ! double DistanceAGL; ! double SeaLevelRadius; double hoverbcg,hoverbmac,b; FGColumnVector3& toGlobe(FGColumnVector3&); void Debug(int from); }; --- 174,183 ---- FGQuaternion vQtrndot_prev[4]; double dt; ! double RunwayRadius, SeaLevelRadius; double hoverbcg,hoverbmac,b; FGColumnVector3& toGlobe(FGColumnVector3&); + void Debug(int from); }; *************** *** 188,190 **** //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% #endif - --- 185,186 ---- Index: FGPropulsion.cpp =================================================================== RCS file: /cvsroot/jsbsim/JSBSim/FGPropulsion.cpp,v retrieving revision 1.98 retrieving revision 1.99 diff -C2 -r1.98 -r1.99 *** FGPropulsion.cpp 8 Apr 2004 01:01:17 -0000 1.98 --- FGPropulsion.cpp 24 Apr 2004 17:12:58 -0000 1.99 *************** *** 56,60 **** #include "FGRocket.h" #include "FGSimTurbine.h" - #include "FGTurbine.h" #include "FGPropeller.h" #include "FGNozzle.h" --- 56,59 ---- *************** *** 239,243 **** Cfg_ptr = 0; FGConfigFile Local_cfg(localpath + engineFileName + ".xml"); ! FGConfigFile Eng_cfg(fullpath + engineFileName + ".xml"); if (Local_cfg.IsOpen()) { Cfg_ptr = &Local_cfg; --- 238,242 ---- Cfg_ptr = 0; FGConfigFile Local_cfg(localpath + engineFileName + ".xml"); ! FGConfigFile Eng_cfg(fullpath + engineFileName + ".xml"); if (Local_cfg.IsOpen()) { Cfg_ptr = &Local_cfg; *************** *** 245,249 **** + engineFileName + ".xml"<< endl; } else { ! if (Eng_cfg.IsOpen()) { Cfg_ptr = &Eng_cfg; if (debug_lvl > 0) cout << "\n Reading engine from file: " << fullpath --- 244,248 ---- + engineFileName + ".xml"<< endl; } else { ! if (Eng_cfg.IsOpen()) { Cfg_ptr = &Eng_cfg; if (debug_lvl > 0) cout << "\n Reading engine from file: " << fullpath *************** *** 263,268 **** } else if (engType == "FG_PISTON") { Engines.push_back(new FGPiston(FDMExec, Cfg_ptr)); - } else if (engType == "FG_TURBINE") { - Engines.push_back(new FGTurbine(FDMExec, Cfg_ptr)); } else if (engType == "FG_SIMTURBINE") { Engines.push_back(new FGSimTurbine(FDMExec, Cfg_ptr)); --- 262,265 ---- *************** *** 334,338 **** Cfg_ptr = 0; FGConfigFile Local_Thruster_cfg(localpath + thrusterFileName + ".xml"); ! FGConfigFile Thruster_cfg(fullpath + thrusterFileName + ".xml"); if (Local_Thruster_cfg.IsOpen()) { Cfg_ptr = &Local_Thruster_cfg; --- 331,335 ---- Cfg_ptr = 0; FGConfigFile Local_Thruster_cfg(localpath + thrusterFileName + ".xml"); ! FGConfigFile Thruster_cfg(fullpath + thrusterFileName + ".xml"); if (Local_Thruster_cfg.IsOpen()) { Cfg_ptr = &Local_Thruster_cfg; *************** *** 340,344 **** + thrusterFileName + ".xml"<< endl; } else { ! if (Thruster_cfg.IsOpen()) { Cfg_ptr = &Thruster_cfg; if (debug_lvl > 0) cout << "\n Reading thruster from file: " << fullpath --- 337,341 ---- + thrusterFileName + ".xml"<< endl; } else { ! if (Thruster_cfg.IsOpen()) { Cfg_ptr = &Thruster_cfg; if (debug_lvl > 0) cout << "\n Reading thruster from file: " << fullpath Index: FGState.cpp =================================================================== RCS file: /cvsroot/jsbsim/JSBSim/FGState.cpp,v retrieving revision 1.135 retrieving revision 1.136 diff -C2 -r1.135 -r1.136 *** FGState.cpp 17 Apr 2004 21:21:26 -0000 1.135 --- FGState.cpp 24 Apr 2004 17:12:58 -0000 1.136 *************** *** 114,120 **** FGColumnVector3 vUVW; ! Propagate->SetLatitude(Latitude); ! Propagate->SetLongitude(Longitude); ! Propagate->Seth(H); Atmosphere->Run(); --- 114,120 ---- FGColumnVector3 vUVW; ! Propagate->SetLocation(eLat, Latitude); ! Propagate->SetLocation(eLong, Longitude); ! Propagate->Seth(H); // Set altitude above Sea Level Atmosphere->Run(); Index: JSBSim.cbx =================================================================== RCS file: /cvsroot/jsbsim/JSBSim/JSBSim.cbx,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -r1.4 -r1.5 *** JSBSim.cbx 18 Apr 2004 02:44:10 -0000 1.4 --- JSBSim.cbx 24 Apr 2004 17:12:59 -0000 1.5 *************** *** 46,51 **** <property category="cppFormatting" name="space-around-binaray-operator" value="0"/> <property category="cppFormatting" name="space-around-parent" value="0"/> - <property category="editor.general" name="line_ending.style" value="3"/> - <property category="generalFormatting" name="lineEndingStyle" value="3"/> <property category="generalFormatting" name="tabSize" value="2"/> <property category="makefiletarget" name="makefile.1.target.list.1" value="all"/> --- 46,49 ---- *************** *** 545,554 **** <property category="unique" name="id" value="247"/> </file> - <file path="FGTurbine.cpp"> - <property category="unique" name="id" value="83"/> - </file> - <file path="FGTurbine.h"> - <property category="unique" name="id" value="249"/> - </file> <file path="JSBSim.cpp"> <property category="unique" name="id" value="87"/> --- 543,546 ---- Index: JSBSim.cxx =================================================================== RCS file: /cvsroot/jsbsim/JSBSim/JSBSim.cxx,v retrieving revision 1.169 retrieving revision 1.170 diff -C2 -r1.169 -r1.170 *** JSBSim.cxx 18 Apr 2004 11:50:51 -0000 1.169 --- JSBSim.cxx 24 Apr 2004 17:12:59 -0000 1.170 *************** *** 321,329 **** << Propagate->Getpsi()*RADTODEG << " deg" ); SG_LOG( SG_FLIGHT, SG_INFO, " Latitude: " ! << Propagate->GetLatitude() << " deg" ); SG_LOG( SG_FLIGHT, SG_INFO, " Longitude: " ! << Propagate->GetLongitude() << " deg" ); SG_LOG( SG_FLIGHT, SG_INFO, " Altitude: " ! << Propagate->Geth() << " feet" ); SG_LOG( SG_FLIGHT, SG_INFO, " loaded initial conditions" ); --- 321,329 ---- << Propagate->Getpsi()*RADTODEG << " deg" ); SG_LOG( SG_FLIGHT, SG_INFO, " Latitude: " ! << Propagate->GetLocation(eLat)*RADTODEG << " deg" ); SG_LOG( SG_FLIGHT, SG_INFO, " Longitude: " ! << Propagate->GetLocation(eLong)*RADTODEG << " deg" ); SG_LOG( SG_FLIGHT, SG_INFO, " Altitude: " ! << Propagate->Geth() << " feet" ); SG_LOG( SG_FLIGHT, SG_INFO, " loaded initial conditions" ); *************** *** 557,571 **** _set_V_ground_speed( Auxiliary->GetVground() ); ! _set_Omega_Body( Propagate->GetPQR(1), ! Propagate->GetPQR(2), ! Propagate->GetPQR(3) ); ! ! _set_Euler_Rates( Auxiliary->GetEulerRates(1), ! Auxiliary->GetEulerRates(2), ! Auxiliary->GetEulerRates(3) ); ! ! _set_Geocentric_Rates(Propagate->GetLatitudeDot(), ! Propagate->GetLongitudeDot(), ! Propagate->Gethdot() ); _set_Mach_number( Auxiliary->GetMach() ); --- 557,571 ---- _set_V_ground_speed( Auxiliary->GetVground() ); ! _set_Omega_Body( Propagate->GetPQR(eP), ! Propagate->GetPQR(eQ), ! Propagate->GetPQR(eR) ); ! ! _set_Euler_Rates( Auxiliary->GetEulerRates(ePhi), ! Auxiliary->GetEulerRates(eTht), ! Auxiliary->GetEulerRates(ePsi) ); ! ! _set_Geocentric_Rates(Propagate->GetLocationDot(eLat), ! Propagate->GetLocationDot(eLong), ! Propagate->GetLocationDot(eRad) ); _set_Mach_number( Auxiliary->GetMach() ); *************** *** 578,584 **** */ // Positions of Visual Reference Point ! _updateGeocentricPosition( Propagate->GetLatitudeVRP(), ! Propagate->GetLongitudeVRP(), ! Propagate->GethVRP() ); _set_Altitude_AGL( Propagate->GetDistanceAGL() ); --- 578,584 ---- */ // Positions of Visual Reference Point ! _updateGeocentricPosition( Auxiliary->GetLocationVRP(eLat), ! Auxiliary->GetLocationVRP(eLong), ! Auxiliary->GetLocationVRP(eRad) ); _set_Altitude_AGL( Propagate->GetDistanceAGL() ); Index: Makefile.am =================================================================== RCS file: /cvsroot/jsbsim/JSBSim/Makefile.am,v retrieving revision 1.27 retrieving revision 1.28 diff -C2 -r1.27 -r1.28 *** Makefile.am 18 Apr 2004 11:49:31 -0000 1.27 --- Makefile.am 24 Apr 2004 17:12:59 -0000 1.28 *************** *** 42,46 **** FGTrim.cpp FGTrim.h \ FGTrimAxis.cpp FGTrimAxis.h \ - FGTurbine.cpp FGTurbine.h \ FGEngine.cpp FGEngine.h \ FGTank.cpp FGTank.h \ --- 42,45 ---- Index: Makefile.solo =================================================================== RCS file: /cvsroot/jsbsim/JSBSim/Makefile.solo,v retrieving revision 1.62 retrieving revision 1.63 diff -C2 -r1.62 -r1.63 *** Makefile.solo 23 Apr 2004 11:33:53 -0000 1.62 --- Makefile.solo 24 Apr 2004 17:12:59 -0000 1.63 *************** *** 6,10 **** FGTank.o FGAuxiliary.o FGfdmSocket.o FGTrim.o FGTrimAxis.o\ FGConfigFile.o FGInitialCondition.o FGLGear.o FGMatrix33.o FGPropulsion.o FGRocket.o\ ! FGTurbine.o FGPiston.o FGForce.o FGThruster.o FGEngine.o\ FGTable.o FGPropeller.o FGNozzle.o FGAerodynamics.o FGMassBalance.o FGInertial.o\ FGFactorGroup.o FGColumnVector3.o FGQuaternion.o FGGroundReactions.o FGScript.o\ --- 6,10 ---- FGTank.o FGAuxiliary.o FGfdmSocket.o FGTrim.o FGTrimAxis.o\ FGConfigFile.o FGInitialCondition.o FGLGear.o FGMatrix33.o FGPropulsion.o FGRocket.o\ ! FGPiston.o FGForce.o FGThruster.o FGEngine.o\ FGTable.o FGPropeller.o FGNozzle.o FGAerodynamics.o FGMassBalance.o FGInertial.o\ FGFactorGroup.o FGColumnVector3.o FGQuaternion.o FGGroundReactions.o FGScript.o\ *************** *** 23,29 **** cd simgear/props; make -fMakefile.solo; cd ../../ - DoxygenMain.o: DoxygenMain.cpp - $(CC) $(INCLUDES) $(CCOPTS) -oDoxygenMain.o -c DoxygenMain.cpp - FGAerodynamics.o: FGAerodynamics.cpp FGAerodynamics.h FGModel.h \ FGJSBBase.h FGPropertyManager.h simgear/props/props.hxx FGConfigFile.h \ --- 23,26 ---- *************** *** 267,272 **** FGPropagate.h FGAuxiliary.h FGMassBalance.h FGAerodynamics.h \ FGCoefficient.h FGTable.h FGOutput.h FGfdmSocket.h FGGroundReactions.h \ ! FGTank.h FGThruster.h FGForce.h FGRocket.h FGSimTurbine.h FGTurbine.h \ ! FGPropeller.h FGNozzle.h FGPiston.h FGElectric.h $(CC) $(INCLUDES) $(CCOPTS) -oFGPropulsion.o -c FGPropulsion.cpp --- 264,269 ---- FGPropagate.h FGAuxiliary.h FGMassBalance.h FGAerodynamics.h \ FGCoefficient.h FGTable.h FGOutput.h FGfdmSocket.h FGGroundReactions.h \ ! FGTank.h FGThruster.h FGForce.h FGRocket.h FGSimTurbine.h FGPropeller.h \ ! FGNozzle.h FGPiston.h FGElectric.h $(CC) $(INCLUDES) $(CCOPTS) -oFGPropulsion.o -c FGPropulsion.cpp *************** *** 354,367 **** $(CC) $(INCLUDES) $(CCOPTS) -oFGTrimAxis.o -c FGTrimAxis.cpp - FGTurbine.o: FGTurbine.cpp FGTurbine.h FGEngine.h FGJSBBase.h \ - FGPropertyManager.h simgear/props/props.hxx FGState.h \ - FGInitialCondition.h FGFDMExec.h FGModel.h FGTrim.h FGTrimAxis.h \ - FGColumnVector3.h FGMatrix33.h FGQuaternion.h FGAtmosphere.h FGFCS.h \ - filtersjb/FGFCSComponent.h FGLGear.h FGConfigFile.h FGAircraft.h \ - FGPropagate.h FGAuxiliary.h FGMassBalance.h FGAerodynamics.h \ - FGCoefficient.h FGTable.h FGOutput.h FGfdmSocket.h FGGroundReactions.h \ - FGPropulsion.h FGTank.h FGThruster.h FGForce.h - $(CC) $(INCLUDES) $(CCOPTS) -oFGTurbine.o -c FGTurbine.cpp - JSBSim.o: JSBSim.cpp FGFDMExec.h FGModel.h FGJSBBase.h \ FGPropertyManager.h simgear/props/props.hxx FGTrim.h FGTrimAxis.h \ --- 351,354 ---- Index: makemake.pl =================================================================== RCS file: /cvsroot/jsbsim/JSBSim/makemake.pl,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -r1.22 -r1.23 *** makemake.pl 23 Apr 2004 11:33:53 -0000 1.22 --- makemake.pl 24 Apr 2004 17:12:59 -0000 1.23 *************** *** 13,17 **** print "FGTank.o FGAuxiliary.o FGfdmSocket.o FGTrim.o FGTrimAxis.o\\\n"; print "FGConfigFile.o FGInitialCondition.o FGLGear.o FGMatrix33.o FGPropulsion.o FGRocket.o\\\n"; ! print "FGTurbine.o FGPiston.o FGForce.o FGThruster.o FGEngine.o\\\n"; print "FGTable.o FGPropeller.o FGNozzle.o FGAerodynamics.o FGMassBalance.o FGInertial.o\\\n"; print "FGFactorGroup.o FGColumnVector3.o FGQuaternion.o FGGroundReactions.o FGScript.o\\\n"; --- 13,17 ---- print "FGTank.o FGAuxiliary.o FGfdmSocket.o FGTrim.o FGTrimAxis.o\\\n"; print "FGConfigFile.o FGInitialCondition.o FGLGear.o FGMatrix33.o FGPropulsion.o FGRocket.o\\\n"; ! print "FGPiston.o FGForce.o FGThruster.o FGEngine.o\\\n"; print "FGTable.o FGPropeller.o FGNozzle.o FGAerodynamics.o FGMassBalance.o FGInertial.o\\\n"; print "FGFactorGroup.o FGColumnVector3.o FGQuaternion.o FGGroundReactions.o FGScript.o\\\n"; --- FGTurbine.cpp DELETED --- --- FGTurbine.h DELETED --- |
From: Jon S. B. <jb...@us...> - 2004-04-24 17:13:15
|
Update of /cvsroot/jsbsim/JSBSim/scripts In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9733/scripts Modified Files: B747-1.xml Log Message: Changes to the Propagate mode - removed VRP items to FGAuxiliary, etc.; removed FGTurbine Index: B747-1.xml =================================================================== RCS file: /cvsroot/jsbsim/JSBSim/scripts/B747-1.xml,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** B747-1.xml 12 Nov 2003 03:25:45 -0000 1.2 --- B747-1.xml 24 Apr 2004 17:13:00 -0000 1.3 *************** *** 1,55 **** ! <?xml version="1.0"?> ! <runscript name="B747-400 takeoff run"> ! <!-- ! This run is for testing B747-400 runs ! --> ! ! <use aircraft="B747"> ! <use initialize="reset00"> ! <run start="0.0" end="140" dt="0.00833333"> ! <when> ! <parameter name="sim-time-sec" comparison="ge" value="0.25"> ! <parameter name="sim-time-sec" comparison="le" value="1.00"> ! <set name="propulsion/active_engine" type="FG_VALUE" value="-1" action="FG_STEP" persistent="false"> ! <set name="fcs/throttle-cmd-norm[0]" type="FG_VALUE" value="0.3" action="FG_RAMP" persistent="false" tc ="2.0"> ! <set name="fcs/throttle-cmd-norm[1]" type="FG_VALUE" value="0.3" action="FG_RAMP" persistent="false" tc ="2.0"> ! <set name="fcs/throttle-cmd-norm[2]" type="FG_VALUE" value="0.3" action="FG_RAMP" persistent="false" tc ="2.0"> ! <set name="fcs/throttle-cmd-norm[3]" type="FG_VALUE" value="0.3" action="FG_RAMP" persistent="false" tc ="2.0"> ! <set name="propulsion/starter_cmd" type="FG_VALUE" value="1" action="FG_STEP" persistent="false" tc ="1.00"> ! </when> ! ! <when> ! <parameter name="propulsion/n2" comparison="ge" value="15"> ! <set name="fcs/throttle-cmd-norm[0]" type="FG_VALUE" value="1.0" action="FG_RAMP" persistent="false" tc ="0.05"> ! <set name="fcs/throttle-cmd-norm[1]" type="FG_VALUE" value="1.0" action="FG_RAMP" persistent="false" tc ="0.05"> ! <set name="fcs/throttle-cmd-norm[2]" type="FG_VALUE" value="1.0" action="FG_RAMP" persistent="false" tc ="0.05"> ! <set name="fcs/throttle-cmd-norm[3]" type="FG_VALUE" value="1.0" action="FG_RAMP" persistent="false" tc ="0.05"> ! <set name="propulsion/cutoff_cmd" type="FG_VALUE" value="0" action="FG_STEP" persistent="false" tc ="1.00"> ! </when> ! ! <when> <!-- Set the Elevator to takeoff --> ! <parameter name="aero/qbar-psf" comparison="ge" value="17.0"> ! <parameter name="position/h-sl-ft" comparison="le" value="2000"> ! <set name="fcs/elevator-cmd-norm" type="FG_VALUE" value="-0.5" action="FG_RAMP" persistent="false" tc ="2.0"> ! </when> ! <!-- ! <when> ! <parameter name="position/h-sl-ft" comparison="ge" value="2000"> ! <parameter name="attitude/theta-rad" comparison="ge" value="0.30"> ! <set name="fcs/elevator-cmd-norm" type="FG_DELTA" value="0.06" action="FG_EXP" persistent="true" tc ="12.0"> ! </when> ! ! <when> ! <parameter name="position/h-sl-ft" comparison="le" value="2000"> ! <parameter name="attitude/theta-rad" comparison="le" value="0.25"> ! <set name="fcs/elevator-cmd-norm" type="FG_DELTA" value="-0.06" action="FG_EXP" persistent="true" tc ="12.0"> ! </when> ! ! <when> ! <parameter name="position/h-sl-ft" comparison="ge" value="2000"> ! <set name="fcs/elevator-cmd-norm" type="FG_VALUE" value="0.00" action="FG_EXP" persistent="false" tc ="1.0"> ! </when> ! --> ! </run> ! ! </runscript> --- 1,55 ---- ! <?xml version="1.0"?> ! <runscript name="B747-400 takeoff run"> ! <!-- ! This run is for testing B747-400 runs ! --> ! ! <use aircraft="B747"> ! <use initialize="reset00"> ! <run start="0.0" end="140" dt="0.00833333"> ! <when> ! <parameter name="sim-time-sec" comparison="ge" value="0.25"> ! <parameter name="sim-time-sec" comparison="le" value="1.00"> ! <set name="propulsion/active_engine" type="FG_VALUE" value="-1" action="FG_STEP" persistent="false"> ! <set name="fcs/throttle-cmd-norm[0]" type="FG_VALUE" value="0.3" action="FG_RAMP" persistent="false" tc ="2.0"> ! <set name="fcs/throttle-cmd-norm[1]" type="FG_VALUE" value="0.3" action="FG_RAMP" persistent="false" tc ="2.0"> ! <set name="fcs/throttle-cmd-norm[2]" type="FG_VALUE" value="0.3" action="FG_RAMP" persistent="false" tc ="2.0"> ! <set name="fcs/throttle-cmd-norm[3]" type="FG_VALUE" value="0.3" action="FG_RAMP" persistent="false" tc ="2.0"> ! <set name="propulsion/starter_cmd" type="FG_VALUE" value="1" action="FG_STEP" persistent="false" tc ="1.00"> ! </when> ! ! <when> ! <parameter name="propulsion/n2" comparison="ge" value="15"> ! <set name="fcs/throttle-cmd-norm[0]" type="FG_VALUE" value="1.0" action="FG_RAMP" persistent="false" tc ="0.05"> ! <set name="fcs/throttle-cmd-norm[1]" type="FG_VALUE" value="1.0" action="FG_RAMP" persistent="false" tc ="0.05"> ! <set name="fcs/throttle-cmd-norm[2]" type="FG_VALUE" value="1.0" action="FG_RAMP" persistent="false" tc ="0.05"> ! <set name="fcs/throttle-cmd-norm[3]" type="FG_VALUE" value="1.0" action="FG_RAMP" persistent="false" tc ="0.05"> ! <set name="propulsion/cutoff_cmd" type="FG_VALUE" value="0" action="FG_STEP" persistent="false" tc ="1.00"> ! </when> ! ! <when> <!-- Set the Elevator to takeoff --> ! <parameter name="aero/qbar-psf" comparison="ge" value="17.0"> ! <parameter name="position/h-sl-ft" comparison="le" value="2000"> ! <set name="fcs/elevator-cmd-norm" type="FG_VALUE" value="-0.5" action="FG_RAMP" persistent="false" tc ="2.0"> ! </when> ! <!-- ! <when> ! <parameter name="position/h-sl-ft" comparison="ge" value="2000"> ! <parameter name="attitude/theta-rad" comparison="ge" value="0.30"> ! <set name="fcs/elevator-cmd-norm" type="FG_DELTA" value="0.06" action="FG_EXP" persistent="true" tc ="12.0"> ! </when> ! ! <when> ! <parameter name="position/h-sl-ft" comparison="le" value="2000"> ! <parameter name="attitude/theta-rad" comparison="le" value="0.25"> ! <set name="fcs/elevator-cmd-norm" type="FG_DELTA" value="-0.06" action="FG_EXP" persistent="true" tc ="12.0"> ! </when> ! ! <when> ! <parameter name="position/h-sl-ft" comparison="ge" value="2000"> ! <set name="fcs/elevator-cmd-norm" type="FG_VALUE" value="0.00" action="FG_EXP" persistent="false" tc ="1.0"> ! </when> ! --> ! </run> ! ! </runscript> |
From: Jon S. B. <jb...@us...> - 2004-04-24 17:13:15
|
Update of /cvsroot/jsbsim/JSBSim/engine In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9733/engine Modified Files: GE-CF6-80C2-B1F.xml Log Message: Changes to the Propagate mode - removed VRP items to FGAuxiliary, etc.; removed FGTurbine Index: GE-CF6-80C2-B1F.xml =================================================================== RCS file: /cvsroot/jsbsim/JSBSim/engine/GE-CF6-80C2-B1F.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** GE-CF6-80C2-B1F.xml 18 Mar 2004 12:50:41 -0000 1.1 --- GE-CF6-80C2-B1F.xml 24 Apr 2004 17:13:00 -0000 1.2 *************** *** 1,94 **** ! <?xml version="1.0"?> ! <!-- ! File: GE-CF6-80C2-B1F.xml ! Author: Jon Berndt, based on output from ! Aero-Matic v 0.7, by David Culp ! ! Inputs: ! name: GE-CF6-80C2-B1F ! type: turbine ! thrust: 58000.0 lb ! augmented? no ! injected? yes ! ! Additional Information: ! ! [Source: http://www.bh.com/companions/034074152X/appendices/data-b/table-3/default.htm] ! ! Number of shafts: 2 ! Compressor: 1 + 4LP ! 14HP ! Turbine: 2HP, 5LP ! Cost: $6.10 million ! ! Length: 14.00 ft. ! Fan diameter: 8.84 ft. ! Weight: 9,500 lbs. ! ! Flat rating: 32 degrees C ! Pressure ratio (TO): 29.90 ! Mass flow (lb/sec, TO): 1,765 (lb/sec) ! TSFC (TO): 0.32 ! --> ! ! <FG_SIMTURBINE NAME="GE-CF6-80C2-B1F"> ! MILTHRUST 58000.0 ! MAXTHRUST 58000.0 ! BYPASSRATIO 5.15 ! TSFC 0.564 ! ATSFC 0.0 ! IDLEN1 30.0 ! IDLEN2 60.0 ! MAXN1 100.0 ! MAXN2 100.0 ! AUGMENTED 0 ! AUGMETHOD 1 ! INJECTED 1 ! ! <TABLE NAME="IdleThrust" TYPE="TABLE"> ! Idle_power_thrust_factor ! 6 ! 7 ! velocities/mach-norm ! position/h-sl-ft ! none ! -10000 0 10000 20000 30000 40000 50000 ! 0.0 0.0430 0.0488 0.0528 0.0694 0.0899 0.1183 0.1467 ! 0.2 0.0500 0.0501 0.0335 0.0544 0.0797 0.1049 0.1342 ! 0.4 0.0040 0.0047 0.0020 0.0272 0.0595 0.0891 0.1203 ! 0.6 0.0 0.0 0.0 0.0 0.0276 0.0718 0.1073 ! 0.8 0.0 0.0 0.0 0.0 0.0474 0.0868 0.0900 ! 1.0 0.0 0.0 0.0 0.0 0.0 0.0552 0.0800 ! </TABLE> ! ! <TABLE NAME="MilThrust" TYPE="TABLE"> ! Military_power_thrust_factor ! 8 ! 7 ! velocities/mach-norm ! position/h-sl-ft ! none ! -10000 0 10000 20000 30000 40000 50000 ! 0.0 1.2600 1.0000 0.7400 0.5340 0.3720 0.2410 0.1490 ! 0.2 1.1710 0.9340 0.6970 0.5060 0.3550 0.2310 0.1430 ! 0.4 1.1500 0.9210 0.6920 0.5060 0.3570 0.2330 0.1450 ! 0.6 1.1810 0.9510 0.7210 0.5320 0.3780 0.2480 0.1540 ! 0.8 1.2580 1.0200 0.7820 0.5820 0.4170 0.2750 0.1700 ! 1.0 1.3690 1.1200 0.8710 0.6510 0.4750 0.3150 0.1950 ! 1.2 1.4850 1.2300 0.9750 0.7440 0.5450 0.3640 0.2250 ! 1.4 1.5941 1.3400 1.0860 0.8450 0.6280 0.4240 0.2630 ! </TABLE> ! ! <TABLE NAME="WaterFactor" TYPE="TABLE"> ! Water_injection_factor ! 2 ! 2 ! velocities/mach-norm ! position/h-sl-ft ! none ! 0 50000 ! 0.0 1.2000 1.2000 ! 1.0 1.2000 1.2000 ! </TABLE> ! ! </FG_SIMTURBINE> --- 1,94 ---- ! <?xml version="1.0"?> ! <!-- ! File: GE-CF6-80C2-B1F.xml ! Author: Jon Berndt, based on output from ! Aero-Matic v 0.7, by David Culp ! ! Inputs: ! name: GE-CF6-80C2-B1F ! type: turbine ! thrust: 58000.0 lb ! augmented? no ! injected? yes ! ! Additional Information: ! ! [Source: http://www.bh.com/companions/034074152X/appendices/data-b/table-3/default.htm] ! ! Number of shafts: 2 ! Compressor: 1 + 4LP ! 14HP ! Turbine: 2HP, 5LP ! Cost: $6.10 million ! ! Length: 14.00 ft. ! Fan diameter: 8.84 ft. ! Weight: 9,500 lbs. ! ! Flat rating: 32 degrees C ! Pressure ratio (TO): 29.90 ! Mass flow (lb/sec, TO): 1,765 (lb/sec) ! TSFC (TO): 0.32 ! --> ! ! <FG_SIMTURBINE NAME="GE-CF6-80C2-B1F"> ! MILTHRUST 58000.0 ! MAXTHRUST 58000.0 ! BYPASSRATIO 5.15 ! TSFC 0.564 ! ATSFC 0.0 ! IDLEN1 30.0 ! IDLEN2 60.0 ! MAXN1 100.0 ! MAXN2 100.0 ! AUGMENTED 0 ! AUGMETHOD 1 ! INJECTED 1 ! ! <TABLE NAME="IdleThrust" TYPE="TABLE"> ! Idle_power_thrust_factor ! 6 ! 7 ! velocities/mach-norm ! position/h-sl-ft ! none ! -10000 0 10000 20000 30000 40000 50000 ! 0.0 0.0430 0.0488 0.0528 0.0694 0.0899 0.1183 0.1467 ! 0.2 0.0500 0.0501 0.0335 0.0544 0.0797 0.1049 0.1342 ! 0.4 0.0040 0.0047 0.0020 0.0272 0.0595 0.0891 0.1203 ! 0.6 0.0 0.0 0.0 0.0 0.0276 0.0718 0.1073 ! 0.8 0.0 0.0 0.0 0.0 0.0474 0.0868 0.0900 ! 1.0 0.0 0.0 0.0 0.0 0.0 0.0552 0.0800 ! </TABLE> ! ! <TABLE NAME="MilThrust" TYPE="TABLE"> ! Military_power_thrust_factor ! 8 ! 7 ! velocities/mach-norm ! position/h-sl-ft ! none ! -10000 0 10000 20000 30000 40000 50000 ! 0.0 1.2600 1.0000 0.7400 0.5340 0.3720 0.2410 0.1490 ! 0.2 1.1710 0.9340 0.6970 0.5060 0.3550 0.2310 0.1430 ! 0.4 1.1500 0.9210 0.6920 0.5060 0.3570 0.2330 0.1450 ! 0.6 1.1810 0.9510 0.7210 0.5320 0.3780 0.2480 0.1540 ! 0.8 1.2580 1.0200 0.7820 0.5820 0.4170 0.2750 0.1700 ! 1.0 1.3690 1.1200 0.8710 0.6510 0.4750 0.3150 0.1950 ! 1.2 1.4850 1.2300 0.9750 0.7440 0.5450 0.3640 0.2250 ! 1.4 1.5941 1.3400 1.0860 0.8450 0.6280 0.4240 0.2630 ! </TABLE> ! ! <TABLE NAME="WaterFactor" TYPE="TABLE"> ! Water_injection_factor ! 2 ! 2 ! velocities/mach-norm ! position/h-sl-ft ! none ! 0 50000 ! 0.0 1.2000 1.2000 ! 1.0 1.2000 1.2000 ! </TABLE> ! ! </FG_SIMTURBINE> |
From: Jon S. B. <jb...@us...> - 2004-04-24 17:13:15
|
Update of /cvsroot/jsbsim/JSBSim/atmosphere In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9733/atmosphere Modified Files: FGMSIS.cpp Log Message: Changes to the Propagate mode - removed VRP items to FGAuxiliary, etc.; removed FGTurbine Index: FGMSIS.cpp =================================================================== RCS file: /cvsroot/jsbsim/JSBSim/atmosphere/FGMSIS.cpp,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -r1.8 -r1.9 *** FGMSIS.cpp 17 Apr 2004 21:21:26 -0000 1.8 --- FGMSIS.cpp 24 Apr 2004 17:13:00 -0000 1.9 *************** *** 155,160 **** Auxiliary->GetSecondsInDay(), 0.0, ! Propagate->GetLatitude() * radtodeg, ! Propagate->GetLongitude() * radtodeg); SLtemperature = output.t[1] * 1.8; SLdensity = output.d[5] * 1.940321; --- 155,160 ---- Auxiliary->GetSecondsInDay(), 0.0, ! Propagate->GetLocation(eLat) * radtodeg, ! Propagate->GetLocation(eLong) * radtodeg); SLtemperature = output.t[1] * 1.8; SLdensity = output.d[5] * 1.940321; *************** *** 170,175 **** Auxiliary->GetSecondsInDay(), Propagate->Geth(), ! Propagate->GetLatitude() * radtodeg, ! Propagate->GetLongitude() * radtodeg); intTemperature = output.t[1] * 1.8; intDensity = output.d[5] * 1.940321; --- 170,175 ---- Auxiliary->GetSecondsInDay(), Propagate->Geth(), ! Propagate->GetLocation(eLat) * radtodeg, ! Propagate->GetLocation(eLong) * radtodeg); intTemperature = output.t[1] * 1.8; intDensity = output.d[5] * 1.940321; |
From: Jon S. B. <jb...@us...> - 2004-04-24 17:13:15
|
Update of /cvsroot/jsbsim/JSBSim/aircraft/B747 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9733/aircraft/B747 Modified Files: reset00.xml Log Message: Changes to the Propagate mode - removed VRP items to FGAuxiliary, etc.; removed FGTurbine Index: reset00.xml =================================================================== RCS file: /cvsroot/jsbsim/JSBSim/aircraft/B747/reset00.xml,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** reset00.xml 11 Nov 2003 00:54:25 -0000 1.3 --- reset00.xml 24 Apr 2004 17:12:59 -0000 1.4 *************** *** 1,16 **** ! <?xml version="1.0"?> ! <initialize name="reset00"> ! <!-- ! This file sets up the aircraft to start off ! from the runway in preparation for takeoff. ! --> ! UBODY 0.0 ! VBODY 0.0 ! WBODY 0.0 ! LATITUDE 47.0 ! LONGITUDE 122.0 ! PHI 0.0 ! THETA 0.0 ! PSI 150.0 ! ALTITUDE 19.0 ! </initialize> --- 1,16 ---- ! <?xml version="1.0"?> ! <initialize name="reset00"> ! <!-- ! This file sets up the aircraft to start off ! from the runway in preparation for takeoff. ! --> ! UBODY 0.0 ! VBODY 0.0 ! WBODY 0.0 ! LATITUDE 47.0 ! LONGITUDE 122.0 ! PHI 0.0 ! THETA 0.0 ! PSI 150.0 ! ALTITUDE 19.0 ! </initialize> |
From: Mathias Fr?h. <fro...@us...> - 2004-04-23 11:59:22
|
Update of /cvsroot/jsbsim/JSBSim In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21252 Modified Files: Tag: FROHLICH FGDopri5.cpp FGDopri5.h FGExplicitEuler.cpp FGExplicitEuler.h FGImplicitEuler.cpp FGImplicitEuler.h FGMcFarland.cpp FGMcFarland.h FGPropagate.cpp FGPropagate.h FGTimestep.cpp FGTimestep.h Log Message: Move the current vehicle state and the current time value to FGPropagate. This fixes the known crash at exit/reset. Index: FGDopri5.cpp =================================================================== RCS file: /cvsroot/jsbsim/JSBSim/Attic/FGDopri5.cpp,v retrieving revision 1.1.2.1 retrieving revision 1.1.2.2 diff -C2 -r1.1.2.1 -r1.1.2.2 *** FGDopri5.cpp 18 Apr 2004 09:52:48 -0000 1.1.2.1 --- FGDopri5.cpp 23 Apr 2004 11:59:10 -0000 1.1.2.2 *************** *** 100,136 **** //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ! bool FGDopri5::Integrate(Time tEnd) { // Do the actual timesteps. // Cycle as long as required to reach tEnd. ! while ( !ReachedTEnd( tEnd ) ) { // Cut the timestep if required. ! double curStepsize = ClipStepsizeToTEnd( tEnd ); // Compute the inner stages k1, ..., k7 ! FGVehicleState k1 = ComputeStateDeriv( mTime, mState ); ! FGVehicleState y2 = mState + (curStepsize*a21)*k1; ! FGVehicleState k2 = ComputeStateDeriv( mTime+c2*curStepsize, y2 ); ! FGVehicleState y3 = mState + (curStepsize*a31)*k1 + (curStepsize*a32)*k2; ! FGVehicleState k3 = ComputeStateDeriv( mTime+c3*curStepsize, y3 ); ! FGVehicleState y4 = mState + (curStepsize*a41)*k1 + (curStepsize*a42)*k2 + (curStepsize*a43)*k3; ! FGVehicleState k4 = ComputeStateDeriv( mTime+c4*curStepsize, y4 ); ! FGVehicleState y5 = mState + (curStepsize*a51)*k1 + (curStepsize*a52)*k2 + (curStepsize*a53)*k3 + (curStepsize*a54)*k4; ! FGVehicleState k5 = ComputeStateDeriv( mTime+c5*curStepsize, y5 ); ! FGVehicleState y6 = mState + (curStepsize*a61)*k1 + (curStepsize*a62)*k2 + (curStepsize*a63)*k3 + (curStepsize*a64)*k4 + (curStepsize*a65)*k5; ! FGVehicleState k6 = ComputeStateDeriv( mTime+curStepsize, y6 ); ! FGVehicleState y7 = mState + (curStepsize*a71)*k1 + (curStepsize*a73)*k3 + (curStepsize*a74)*k4 + (curStepsize*a75)*k5 + (curStepsize*a76)*k6; ! FGVehicleState k7 = ComputeStateDeriv( mTime+curStepsize, y7 ); // Dense output ... --- 100,136 ---- //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ! bool FGDopri5::Integrate(Time tEnd, Time& t, FGVehicleState& state) { // Do the actual timesteps. // Cycle as long as required to reach tEnd. ! while ( !ReachedTEnd( tEnd, t ) ) { // Cut the timestep if required. ! double curStepsize = ClipStepsizeToTEnd( tEnd, t, GetStepsize() ); // Compute the inner stages k1, ..., k7 ! FGVehicleState k1 = ComputeStateDeriv( t, state ); ! FGVehicleState y2 = state + (curStepsize*a21)*k1; ! FGVehicleState k2 = ComputeStateDeriv( t+c2*curStepsize, y2 ); ! FGVehicleState y3 = state + (curStepsize*a31)*k1 + (curStepsize*a32)*k2; ! FGVehicleState k3 = ComputeStateDeriv( t+c3*curStepsize, y3 ); ! FGVehicleState y4 = state + (curStepsize*a41)*k1 + (curStepsize*a42)*k2 + (curStepsize*a43)*k3; ! FGVehicleState k4 = ComputeStateDeriv( t+c4*curStepsize, y4 ); ! FGVehicleState y5 = state + (curStepsize*a51)*k1 + (curStepsize*a52)*k2 + (curStepsize*a53)*k3 + (curStepsize*a54)*k4; ! FGVehicleState k5 = ComputeStateDeriv( t+c5*curStepsize, y5 ); ! FGVehicleState y6 = state + (curStepsize*a61)*k1 + (curStepsize*a62)*k2 + (curStepsize*a63)*k3 + (curStepsize*a64)*k4 + (curStepsize*a65)*k5; ! FGVehicleState k6 = ComputeStateDeriv( t+curStepsize, y6 ); ! FGVehicleState y7 = state + (curStepsize*a71)*k1 + (curStepsize*a73)*k3 + (curStepsize*a74)*k4 + (curStepsize*a75)*k5 + (curStepsize*a76)*k6; ! FGVehicleState k7 = ComputeStateDeriv( t+curStepsize, y7 ); // Dense output ... *************** *** 146,150 **** - double en = FGTimestep::ErrorNorm2( 1e-3, y7.GetLocation(), err.GetLocation() ); --- 146,149 ---- *************** *** 157,167 **** // We do unconditionally accept all steps, y7 is the new state value. ! mState = y7; // Increment the simulation time ... ! IncrementTime( curStepsize ); // Renormalize the quaternion and the location ! mState.Normalize(); } --- 156,166 ---- // We do unconditionally accept all steps, y7 is the new state value. ! state = y7; // Increment the simulation time ... ! t += curStepsize; // Renormalize the quaternion and the location ! state.Normalize(); } Index: FGDopri5.h =================================================================== RCS file: /cvsroot/jsbsim/JSBSim/Attic/FGDopri5.h,v retrieving revision 1.1.2.1 retrieving revision 1.1.2.2 diff -C2 -r1.1.2.1 -r1.1.2.2 *** FGDopri5.h 18 Apr 2004 09:52:48 -0000 1.1.2.1 --- FGDopri5.h 23 Apr 2004 11:59:10 -0000 1.1.2.2 *************** *** 93,97 **** Perform the actual timesteps nothing exciting here ... */ ! virtual bool Integrate(Time tEnd); private: --- 93,97 ---- Perform the actual timesteps nothing exciting here ... */ ! virtual bool Integrate(Time tEnd, Time& t, FGVehicleState& state); private: Index: FGExplicitEuler.cpp =================================================================== RCS file: /cvsroot/jsbsim/JSBSim/Attic/FGExplicitEuler.cpp,v retrieving revision 1.1.2.2 retrieving revision 1.1.2.3 diff -C2 -r1.1.2.2 -r1.1.2.3 *** FGExplicitEuler.cpp 18 Apr 2004 08:41:52 -0000 1.1.2.2 --- FGExplicitEuler.cpp 23 Apr 2004 11:59:10 -0000 1.1.2.3 *************** *** 59,78 **** //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ! bool FGExplicitEuler::Integrate(Time tEnd) { // Do the actual timesteps. // Cycle as long as required to reach tEnd. ! while ( !ReachedTEnd( tEnd ) ) { // Cut the timestep if required. ! double curStepsize = ClipStepsizeToTEnd( tEnd ); // Do one explicit euler step. ! mState += curStepsize * ComputeStateDeriv( mTime, mState ); // Increment the simulation time ... ! IncrementTime( curStepsize ); // Renormalize the quaternion and the location ! mState.Normalize(); } --- 59,78 ---- //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ! bool FGExplicitEuler::Integrate(Time tEnd, Time& t, FGVehicleState& state) { // Do the actual timesteps. // Cycle as long as required to reach tEnd. ! while ( !ReachedTEnd( tEnd, t ) ) { // Cut the timestep if required. ! double curStepsize = ClipStepsizeToTEnd( tEnd, t, GetStepsize() ); // Do one explicit euler step. ! state += curStepsize * ComputeStateDeriv( t, state ); // Increment the simulation time ... ! t += curStepsize; // Renormalize the quaternion and the location ! state.Normalize(); } Index: FGExplicitEuler.h =================================================================== RCS file: /cvsroot/jsbsim/JSBSim/Attic/FGExplicitEuler.h,v retrieving revision 1.1.2.1 retrieving revision 1.1.2.2 diff -C2 -r1.1.2.1 -r1.1.2.2 *** FGExplicitEuler.h 8 Apr 2004 19:37:51 -0000 1.1.2.1 --- FGExplicitEuler.h 23 Apr 2004 11:59:10 -0000 1.1.2.2 *************** *** 95,99 **** Perform the actual timesteps nothing exciting here ... */ ! virtual bool Integrate(Time tEnd); }; --- 95,99 ---- Perform the actual timesteps nothing exciting here ... */ ! virtual bool Integrate(Time tEnd, Time& t, FGVehicleState& state); }; Index: FGImplicitEuler.cpp =================================================================== RCS file: /cvsroot/jsbsim/JSBSim/Attic/FGImplicitEuler.cpp,v retrieving revision 1.1.2.2 retrieving revision 1.1.2.3 diff -C2 -r1.1.2.2 -r1.1.2.3 *** FGImplicitEuler.cpp 20 Apr 2004 10:21:29 -0000 1.1.2.2 --- FGImplicitEuler.cpp 23 Apr 2004 11:59:10 -0000 1.1.2.3 *************** *** 67,71 **** { // FIXME: ! return mState + curStepsize*ComputeStateDeriv( mTime+curStepsize, x ) - x; } --- 67,71 ---- { // FIXME: ! return mCurrentState + curStepsize*ComputeStateDeriv( mCurrentTime+curStepsize, x ) - x; } *************** *** 75,79 **** { // compute a jacobian ... ! EOMJac = ComputeJacobian( mTime+curStepsize, x ); ImplEulJacStepsize = 0.0; // cout << EOMJac << endl; --- 75,79 ---- { // compute a jacobian ... ! EOMJac = ComputeJacobian( mCurrentTime+curStepsize, x ); ImplEulJacStepsize = 0.0; // cout << EOMJac << endl; *************** *** 116,120 **** { double en ! = FGTimestep::ErrorNorm2( 1e-3, ref.GetLocation(), diff.GetLocation() ); en += FGTimestep::ErrorNorm2( 1e-4, diff.GetOrientation() ); en += FGTimestep::ErrorNorm2( 1e-3, 1e-4, ref.GetUVW(), diff.GetUVW() ); --- 116,120 ---- { double en ! = FGTimestep::ErrorNorm2( 1e-4, ref.GetLocation(), diff.GetLocation() ); en += FGTimestep::ErrorNorm2( 1e-4, diff.GetOrientation() ); en += FGTimestep::ErrorNorm2( 1e-3, 1e-4, ref.GetUVW(), diff.GetUVW() ); *************** *** 126,134 **** //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ! bool FGImplicitEuler::Integrate(Time tEnd) { // Make shure we have a valid jacobian. ! if (ImplEulJac.Rows() != mState.Rows()) { ! ComputeNewJacobian( mState ); // set default stepsize curStepsize = GetStepsize(); --- 126,134 ---- //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ! bool FGImplicitEuler::Integrate(Time tEnd, Time& t, FGVehicleState& state) { // Make shure we have a valid jacobian. ! if (ImplEulJac.Rows() != state.Rows()) { ! ComputeNewJacobian( state ); // set default stepsize curStepsize = GetStepsize(); *************** *** 138,147 **** if (mSteps%60 == 0) { cout << "NewStep: " ! << mState.GetLatitude()*radtodeg << ", " ! << mState.GetLongitude()*radtodeg << ", " ! << mFDMEx->GetAuxiliary()->Geth( mState ) << ", " ! << mState.GetUVW() << ", " ! << mState.GetEuler() << ", " ! << mState.GetPQR() << ", " << endl; } --- 138,147 ---- if (mSteps%60 == 0) { cout << "NewStep: " ! << state.GetLatitude()*radtodeg << ", " ! << state.GetLongitude()*radtodeg << ", " ! << mFDMEx->GetAuxiliary()->Geth( state ) << ", " ! << state.GetUVW() << ", " ! << state.GetEuler() << ", " ! << state.GetPQR() << ", " << endl; } *************** *** 150,157 **** // Do the actual timesteps. // Cycle as long as required to reach tEnd. ! while ( !ReachedTEnd( tEnd ) ) { // Cut the timestep if required. ! curStepsize = ClipStepsizeToTEnd( tEnd, 2.0*curStepsize ); int newtonmaxit = 6; --- 150,157 ---- // Do the actual timesteps. // Cycle as long as required to reach tEnd. ! while ( !ReachedTEnd( tEnd, t ) ) { // Cut the timestep if required. ! curStepsize = ClipStepsizeToTEnd( tEnd, t, 2.0*curStepsize ); int newtonmaxit = 6; *************** *** 159,174 **** int k = 0; // An explicit euler step for the initial guess ... // If someone has something better please cry!!!!! ! // FGVehicleState new_state = mState + (0.5*curStepsize)*ComputeStateDeriv( mTime, mState ); // .. ok, first try ... ! FGVehicleState new_state = mState; // ... not so good ... ! // ((FGVehicleVelocity&)new_state) += (0.2*curStepsize)*ComputeVelocityDeriv( mTime, mState ); // MAybe ... // Since it is stiff in the velocity space, predicting the position // with an explicit step might be a good idea ... ! // ((FGVehiclePosition&)new_state) += (0.5*curStepsize)*ComputePositionDeriv( mTime, mState ); ! // ((FGVehiclePosition&)new_state) += curStepsize*ComputePositionDeriv( mTime, mState ); bool converged; do { --- 159,178 ---- int k = 0; + // copy this to private storage, is accessed during the newton iteration. + mCurrentState = state; + mCurrentTime = t; + // An explicit euler step for the initial guess ... // If someone has something better please cry!!!!! ! // FGVehicleState new_state = state + (0.5*curStepsize)*ComputeStateDeriv( t, state ); // .. ok, first try ... ! FGVehicleState new_state = state; // ... not so good ... ! // ((FGVehicleVelocity&)new_state) += (0.2*curStepsize)*ComputeVelocityDeriv( t, state ); // MAybe ... // Since it is stiff in the velocity space, predicting the position // with an explicit step might be a good idea ... ! // ((FGVehiclePosition&)new_state) += (0.5*curStepsize)*ComputePositionDeriv( t, state ); ! // ((FGVehiclePosition&)new_state) += curStepsize*ComputePositionDeriv( t, state ); bool converged; do { *************** *** 186,190 **** curStepsize *= 0.5; new_state *= 0.2; ! new_state += 0.8*mState; ComputeNewJacobian( new_state ); newtonmaxit += 2; --- 190,194 ---- curStepsize *= 0.5; new_state *= 0.2; ! new_state += 0.8*state; ComputeNewJacobian( new_state ); newtonmaxit += 2; *************** *** 195,204 **** // cout << "Success " << endl; // successful step ... ! mState = new_state; // If it took tooo long to iterate in the newton method, // try with a new jacobian in the next step ... if ( maxnewtontry < k + 3 ) ! ComputeNewJacobian( mState ); } else { --- 199,208 ---- // cout << "Success " << endl; // successful step ... ! state = new_state; // If it took tooo long to iterate in the newton method, // try with a new jacobian in the next step ... if ( maxnewtontry < k + 3 ) ! ComputeNewJacobian( state ); } else { *************** *** 209,220 **** // curStepsize = ClipStepsizeToTEnd( tEnd ); ! mState += curStepsize*ComputeStateDeriv( mTime, mState ); } // Increment the simulation time ... ! IncrementTime( curStepsize ); // Renormalize the quaternion and the location ! mState.Normalize(); ++mSteps; --- 213,224 ---- // curStepsize = ClipStepsizeToTEnd( tEnd ); ! state += curStepsize*ComputeStateDeriv( t, state ); } // Increment the simulation time ... ! t += curStepsize; // Renormalize the quaternion and the location ! state.Normalize(); ++mSteps; Index: FGImplicitEuler.h =================================================================== RCS file: /cvsroot/jsbsim/JSBSim/Attic/FGImplicitEuler.h,v retrieving revision 1.1.2.2 retrieving revision 1.1.2.3 diff -C2 -r1.1.2.2 -r1.1.2.3 *** FGImplicitEuler.h 20 Apr 2004 10:21:29 -0000 1.1.2.2 --- FGImplicitEuler.h 23 Apr 2004 11:59:10 -0000 1.1.2.3 *************** *** 91,95 **** Perform the actual timesteps nothing exciting here ... */ ! virtual bool Integrate(Time tEnd); private: --- 91,95 ---- Perform the actual timesteps nothing exciting here ... */ ! virtual bool Integrate(Time tEnd, Time& t, FGVehicleState& state); private: *************** *** 105,108 **** --- 105,110 ---- double ImplEulJacStepsize; + FGVehicleState mCurrentState; + double mCurrentTime; double curStepsize; Index: FGMcFarland.cpp =================================================================== RCS file: /cvsroot/jsbsim/JSBSim/Attic/FGMcFarland.cpp,v retrieving revision 1.1.2.2 retrieving revision 1.1.2.3 diff -C2 -r1.1.2.2 -r1.1.2.3 *** FGMcFarland.cpp 18 Apr 2004 08:41:52 -0000 1.1.2.2 --- FGMcFarland.cpp 23 Apr 2004 11:59:10 -0000 1.1.2.3 *************** *** 62,73 **** //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ! bool FGMcFarland::Integrate(Time tEnd) { // Do the actual timesteps. // Cycle as long as required to reach tEnd. ! while ( !ReachedTEnd( tEnd ) ) { // Cut the timestep if required. ! double curStepsize = ClipStepsizeToTEnd( tEnd ); // Check if we have enough history for a regular step. --- 62,73 ---- //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ! bool FGMcFarland::Integrate(Time tEnd, Time& t, FGVehicleState& state) { // Do the actual timesteps. // Cycle as long as required to reach tEnd. ! while ( !ReachedTEnd( tEnd, t ) ) { // Cut the timestep if required. ! double curStepsize = ClipStepsizeToTEnd( tEnd, t, GetStepsize() ); // Check if we have enough history for a regular step. *************** *** 78,90 **** // approach requires constant stepsizes this is perfectly ok. if ( mPastStepSize == curStepsize ) ! McFarlandStep( curStepsize ); else ! EulerStep( curStepsize ); // Increment the simulation time ... ! IncrementTime( curStepsize ); // Renormalize the quaternion and the location ! mState.Normalize(); } --- 78,90 ---- // approach requires constant stepsizes this is perfectly ok. if ( mPastStepSize == curStepsize ) ! McFarlandStep( curStepsize, t, state ); else ! EulerStep( curStepsize, t, state ); // Increment the simulation time ... ! t += curStepsize; // Renormalize the quaternion and the location ! state.Normalize(); } *************** *** 102,134 **** //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ! void FGMcFarland::EulerStep(Time stepSize) { // Do one explicit euler step at the beginning ... ! FGVehicleState stateDeriv = ComputeStateDeriv( mTime, mState ); ! mState += stepSize * stateDeriv; // ... and save the history. mPastStepSize = stepSize; mPastVelDeriv = stateDeriv; ! mPastPosDeriv = ComputePositionDeriv( mTime+stepSize, mState ); } //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ! void FGMcFarland::McFarlandStep(Time stepSize) { // Get the velocity derivatives at the current state. ! FGVehicleVelocity curVelDeriv = ComputeVelocityDeriv( mTime, mState ); // Get a reference to the subvectors. ! FGVehiclePosition& curPositions = mState; ! FGVehicleVelocity& curVelocities = mState; // Adams Barnsworth is // y_{n+1} = y_n + 0.5*h*(3*y'_n - y'_{n-1}) ! curVelocities += 1.5*stepSize*curVelDeriv; ! curVelocities -= 0.5*stepSize*mPastVelDeriv; ! // Save the old derivatives. mPastVelDeriv = curVelDeriv; --- 102,134 ---- //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ! void FGMcFarland::EulerStep(Time stepSize, Time& t, FGVehicleState& state) { // Do one explicit euler step at the beginning ... ! FGVehicleState stateDeriv = ComputeStateDeriv( t, state ); ! state += stepSize * stateDeriv; // ... and save the history. mPastStepSize = stepSize; mPastVelDeriv = stateDeriv; ! mPastPosDeriv = ComputePositionDeriv( t+stepSize, state ); } //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ! void FGMcFarland::McFarlandStep(Time stepSize, Time& t, FGVehicleState& state) { // Get the velocity derivatives at the current state. ! FGVehicleVelocity curVelDeriv = ComputeVelocityDeriv( t, state ); // Get a reference to the subvectors. ! FGVehiclePosition& curPositions = state; ! FGVehicleVelocity& curVelocities = state; // Adams Barnsworth is // y_{n+1} = y_n + 0.5*h*(3*y'_n - y'_{n-1}) ! curVelocities += (1.5*stepSize)*curVelDeriv; ! curVelocities -= (0.5*stepSize)*mPastVelDeriv; ! // Save the current velocity derivatives as the old ones for the next step. mPastVelDeriv = curVelDeriv; *************** *** 141,150 **** // The trapezidual rule. // y_{n+1} = y_n + 0.5*h*(y'_{n+1} + y'_n) ! curPositions += 0.5*stepSize*mPastPosDeriv; mPastPosDeriv = ! ComputePositionDeriv( mTime+stepSize, ! FGVehicleState( mState, curVelocities ) ); ! curPositions += 0.5*stepSize*mPastPosDeriv; } --- 141,149 ---- // The trapezidual rule. // y_{n+1} = y_n + 0.5*h*(y'_{n+1} + y'_n) ! curPositions += (0.5*stepSize)*mPastPosDeriv; mPastPosDeriv = ! ComputePositionDeriv( t+stepSize, FGVehicleState( state, curVelocities ) ); ! curPositions += (0.5*stepSize)*mPastPosDeriv; } Index: FGMcFarland.h =================================================================== RCS file: /cvsroot/jsbsim/JSBSim/Attic/FGMcFarland.h,v retrieving revision 1.1.2.1 retrieving revision 1.1.2.2 diff -C2 -r1.1.2.1 -r1.1.2.2 *** FGMcFarland.h 8 Apr 2004 19:37:59 -0000 1.1.2.1 --- FGMcFarland.h 23 Apr 2004 11:59:10 -0000 1.1.2.2 *************** *** 39,43 **** %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/ #include "FGTimestep.h" - #include "FGExplicitEuler.h" #include "FGVehicleState.h" --- 39,42 ---- *************** *** 92,96 **** /** Do timestepping. */ ! virtual bool Integrate(Time tEnd); /** Reset integration. --- 91,95 ---- /** Do timestepping. */ ! virtual bool Integrate(Time tEnd, Time& t, FGVehicleState& state); /** Reset integration. *************** *** 107,111 **** Also save the history required for the next step. */ ! void EulerStep(Time stepSize); /** McFarland step. --- 106,110 ---- Also save the history required for the next step. */ ! void EulerStep(Time stepSize, Time& t, FGVehicleState& state); /** McFarland step. *************** *** 116,120 **** Also save the history required for the next step. */ ! void McFarlandStep(Time stepSize); /** Stepsize of the last timestep we have history for. --- 115,119 ---- Also save the history required for the next step. */ ! void McFarlandStep(Time stepSize, Time& t, FGVehicleState& state); /** Stepsize of the last timestep we have history for. Index: FGPropagate.cpp =================================================================== RCS file: /cvsroot/jsbsim/JSBSim/FGPropagate.cpp,v retrieving revision 1.1.2.5 retrieving revision 1.1.2.6 diff -C2 -r1.1.2.5 -r1.1.2.6 *** FGPropagate.cpp 20 Apr 2004 10:27:05 -0000 1.1.2.5 --- FGPropagate.cpp 23 Apr 2004 11:59:10 -0000 1.1.2.6 *************** *** 99,108 **** void FGPropagate::SetInitialState(const FGInitialCondition *FGIC) { - FGVehicleState state; // Set the position lat/lon/radius FGLocation newPos( FGIC->GetLongitudeRadIC(), FGIC->GetLatitudeRadIC(), FGIC->GetAltitudeFtIC() + FGIC->GetSeaLevelRadiusFtIC() ); ! state.SetLocation( newPos ); // Set the Orientation from the euler angles --- 99,107 ---- void FGPropagate::SetInitialState(const FGInitialCondition *FGIC) { // Set the position lat/lon/radius FGLocation newPos( FGIC->GetLongitudeRadIC(), FGIC->GetLatitudeRadIC(), FGIC->GetAltitudeFtIC() + FGIC->GetSeaLevelRadiusFtIC() ); ! mState.SetLocation( newPos ); // Set the Orientation from the euler angles *************** *** 110,114 **** FGIC->GetThetaRadIC(), FGIC->GetPsiRadIC() ); ! state.SetOrientation( newOrientation ); // Set the velocities in the instantaneus body frame --- 109,113 ---- FGIC->GetThetaRadIC(), FGIC->GetPsiRadIC() ); ! mState.SetOrientation( newOrientation ); // Set the velocities in the instantaneus body frame *************** *** 118,122 **** ic->GetVBodyFpsIC(), ic->GetWBodyFpsIC() ); ! state.SetUVW( newUVW ); // Set the angular velocities in the instantaneus body frame. --- 117,121 ---- ic->GetVBodyFpsIC(), ic->GetWBodyFpsIC() ); ! mState.SetUVW( newUVW ); // Set the angular velocities in the instantaneus body frame. *************** *** 124,131 **** FGIC->GetQRadpsIC(), FGIC->GetRRadpsIC() ); ! state.SetPQR( newPQR ); ! // Finally set it. ! mTimestep->SetState( state ); } --- 123,131 ---- FGIC->GetQRadpsIC(), FGIC->GetRRadpsIC() ); ! mState.SetPQR( newPQR ); ! // Tell the timestepping method, that it should throw away all history ! // which is invalid now. ! TimestepReset(); } *************** *** 138,141 **** --- 138,148 ---- return true; + // Some kind of assertation ... + if (!mTimestep) { + PutMessage( "Fatal error in FGPropagate: " + "reached FGPropagate::Run() without a timestepping method!" ); + return true; + } + // Successful return if propagateping is suspended. if (mSuspended) { *************** *** 143,148 **** // So compute the accelerations one time and exit ... // Will clean this up a later time. FIXME ! FGVehicleVelocity accel ! = mTimestep->ComputeVelocityDeriv( mTimestep->GetTime(), mTimestep->GetState() ); // HACK HACK HACK Auxiliary->GetUVWdot() = accel.GetUVW(); --- 150,154 ---- // So compute the accelerations one time and exit ... // Will clean this up a later time. FIXME ! FGVehicleVelocity accel = mTimestep->ComputeVelocityDeriv( mTime, mState ); // HACK HACK HACK Auxiliary->GetUVWdot() = accel.GetUVW(); *************** *** 153,163 **** // Do the actual timestepping. ! mTimestep->Integrate( mTimestep->GetTime() + rate*State->Getdt() ); // HACK HACK HACK // Finally update the acceleration to the realy current value // at interval end. ! FGVehicleVelocity accel ! = mTimestep->ComputeVelocityDeriv( mTimestep->GetTime(), mTimestep->GetState() ); Auxiliary->GetUVWdot() = accel.GetUVW(); Auxiliary->GetPQRdot() = accel.GetPQR(); --- 159,174 ---- // Do the actual timestepping. ! // Note that mTime and mState is modified during this call ! double tEnd = mTime + rate*State->Getdt(); ! if (!mTimestep->Integrate( tEnd, mTime, mState )) { ! PutMessage( "Fatal error in FGPropagate: " ! "Timestepping method did not return successful!" ); ! return true; ! } // HACK HACK HACK // Finally update the acceleration to the realy current value // at interval end. ! FGVehicleVelocity accel = mTimestep->ComputeVelocityDeriv( mTime, mState ); Auxiliary->GetUVWdot() = accel.GetUVW(); Auxiliary->GetPQRdot() = accel.GetPQR(); *************** *** 173,178 **** void FGPropagate::bind(void) { ! // FIXME really? ! ((FGVehicleState&)mTimestep->GetState()).bind( PropertyManager, "" ); PropertyManager->Tie("sim-time-sec", this, &FGPropagate::GetTime); } --- 184,190 ---- void FGPropagate::bind(void) { ! // Tie the current vehicle state into the property tree ! mState.bind( PropertyManager, "" ); ! // Tie the current time into the property tree PropertyManager->Tie("sim-time-sec", this, &FGPropagate::GetTime); } *************** *** 182,187 **** void FGPropagate::unbind(void) { ! // FIXME really? ! ((FGVehicleState&)mTimestep->GetState()).unbind( PropertyManager, "" ); PropertyManager->Untie("sim-time-sec"); } --- 194,199 ---- void FGPropagate::unbind(void) { ! // cleanup ... ! mState.unbind( PropertyManager, "" ); PropertyManager->Untie("sim-time-sec"); } Index: FGPropagate.h =================================================================== RCS file: /cvsroot/jsbsim/JSBSim/FGPropagate.h,v retrieving revision 1.1.2.2 retrieving revision 1.1.2.3 diff -C2 -r1.1.2.2 -r1.1.2.3 *** FGPropagate.h 14 Apr 2004 20:11:26 -0000 1.1.2.2 --- FGPropagate.h 23 Apr 2004 11:59:10 -0000 1.1.2.3 *************** *** 106,114 **** /** Get the current simulation time. */ ! double GetTime(void) const { return mTimestep->GetTime(); } /** Set the current simulation time. */ ! void SetTime(double t) { mTimestep->SetTime(t); } /** Initializes the simulation state based on parameters from an --- 106,114 ---- /** Get the current simulation time. */ ! double GetTime(void) const { return mTime; } /** Set the current simulation time. */ ! void SetTime(double t) { mTime = t; TimestepReset(); } /** Initializes the simulation state based on parameters from an *************** *** 119,126 **** void SetInitialState(const FGInitialCondition *FGIC); ! const FGVehicleState& GetState(void) const { return mTimestep->GetState(); } private: void Debug(int from); --- 119,137 ---- void SetInitialState(const FGInitialCondition *FGIC); ! /** Current vehicle state. ! @return a const reference to the current vehicle state. ! Note that we never return a nonconst reference to the vehicle state ! since physics tells us that we can only change this state by applying ! a force. One exception: SetInitialState sets the complete vehicle state ! to the given initial argument. ! */ ! const FGVehicleState& GetState(void) const { return mState; } private: + /** Reset timestepping algorithm. + */ + void TimestepReset(void) { if (mTimestep) mTimestep->Reset(); } + void Debug(int from); *************** *** 128,134 **** --- 139,154 ---- void unbind(void); + // The current physical state of the aircraft. + FGVehicleState mState; + + // The current time. + double mTime; + // Is true if timestepping is suspended. bool mSuspended; + // The pointer to the currently used timestepping method. + // Can be zero if it is not yet configured. + // If we enter Run() it *must* be nonzerro ... FGTimestep* mTimestep; }; Index: FGTimestep.cpp =================================================================== RCS file: /cvsroot/jsbsim/JSBSim/Attic/FGTimestep.cpp,v retrieving revision 1.1.2.6 retrieving revision 1.1.2.7 diff -C2 -r1.1.2.6 -r1.1.2.7 *** FGTimestep.cpp 20 Apr 2004 10:19:45 -0000 1.1.2.6 --- FGTimestep.cpp 23 Apr 2004 11:59:10 -0000 1.1.2.7 *************** *** 66,72 **** mFDMEx = fdmex; - // Reset Time - mTime = 0.0; - // Just for compatibility for now. mStepsize = 1.0/120.0; --- 66,69 ---- *************** *** 436,449 **** //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ! bool FGTimestep::ReachedTEnd( Time tEnd ) { ! // Check if mTime is equal to tEnd up to the order of roundoff. static double eps = 8.0*numeric_limits<double>::epsilon(); ! if ( eps*max(fabs(mTime), fabs(tEnd)) < fabs(mTime - tEnd) ) return false; ! // If it is equal up to roundoff, just set mTime to tEnd, so that others // do not get confused by this very small error. ! mTime = tEnd; return true; } --- 433,446 ---- //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ! bool FGTimestep::ReachedTEnd( Time tEnd, Time& t ) { ! // Check if t is equal to tEnd up to the order of roundoff. static double eps = 8.0*numeric_limits<double>::epsilon(); ! if ( eps*max(fabs(t), fabs(tEnd)) < fabs(t - tEnd) ) return false; ! // If it is equal up to roundoff, just set t to tEnd, so that others // do not get confused by this very small error. ! t = tEnd; return true; } *************** *** 451,464 **** //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ! double FGTimestep::ClipStepsizeToTEnd( Time tEnd, double stepsize ) const ! { ! return min( stepsize, tEnd - mTime ); ! } ! ! //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ! ! double FGTimestep::ClipStepsizeToTEnd( Time tEnd ) const { ! return min( mStepsize, tEnd - mTime ); } --- 448,460 ---- //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ! double FGTimestep::ClipStepsizeToTEnd( Time tEnd, Time t, double stepsize ) { ! // Clip the stepsize not to overshoot, ! // but don't bother with finite precision. ! static double eps = 4.0*numeric_limits<double>::epsilon(); ! if ( fabs(t + stepsize - tEnd) < eps*max(fabs(t+stepsize), fabs(tEnd)) ) ! return stepsize; ! else ! return min( stepsize, tEnd - t ); } Index: FGTimestep.h =================================================================== RCS file: /cvsroot/jsbsim/JSBSim/Attic/FGTimestep.h,v retrieving revision 1.1.2.7 retrieving revision 1.1.2.8 diff -C2 -r1.1.2.7 -r1.1.2.8 *** FGTimestep.h 18 Apr 2004 09:39:06 -0000 1.1.2.7 --- FGTimestep.h 23 Apr 2004 11:59:10 -0000 1.1.2.8 *************** *** 101,112 **** typedef double Time; - /** Get the current simulation time. - */ - Time GetTime(void) const { return mTime; } - - /** Set the current simulation time. - */ - void SetTime(Time t) { Reset(); mTime = t; } - /** Get the stepzize of the last timestep. */ --- 101,104 ---- *************** *** 117,132 **** void SetStepsize(double stepsize) { Reset(); mStepsize = stepsize; } - /** Set the statevalues to the given argument. - */ - void SetState(const FGVehicleState& s) { Reset(); mState = s; } - - /** Get the statevalues. - */ - const FGVehicleState& GetState(void) const { return mState; } - /** Do timestepping up to time tEnd. @param tEnd time to stop timestepping at. */ ! virtual bool Integrate(Time tEnd) = 0; /** Reset the integration scheme. */ --- 109,116 ---- void SetStepsize(double stepsize) { Reset(); mStepsize = stepsize; } /** Do timestepping up to time tEnd. @param tEnd time to stop timestepping at. */ ! virtual bool Integrate(Time tEnd, Time& t, FGVehicleState& state) = 0; /** Reset the integration scheme. */ *************** *** 150,176 **** protected: - // The current physical state of the aircraft. - FGVehicleState mState; - // Holds the actual stepsize of the timestepping method. // Since this is common to all timestepping methods this value is best // held here ... double mStepsize; - // ... the same goes for the actual time of integration. - Time mTime; /** Check if we reached tEnd. */ ! bool ReachedTEnd( Time tEnd ); /** Return the current stepsize clipped to tEnd. */ ! double ClipStepsizeToTEnd( Time tEnd, double stepsize ) const; ! double ClipStepsizeToTEnd( Time tEnd ) const; ! ! /** Increment the current time due to the given stepsize. ! */ ! void IncrementTime( double curStepsize ) { mTime += curStepsize; } ! /** The 'scaled norm' of x1-x2. --- 134,149 ---- protected: // Holds the actual stepsize of the timestepping method. // Since this is common to all timestepping methods this value is best // held here ... double mStepsize; /** Check if we reached tEnd. */ ! static bool ReachedTEnd( Time tEnd, Time& t ); /** Return the current stepsize clipped to tEnd. */ ! static double ClipStepsizeToTEnd( Time tEnd, Time t, double stepsize ); /** The 'scaled norm' of x1-x2. |
From: Jon S. B. <jb...@us...> - 2004-04-23 11:34:02
|
Update of /cvsroot/jsbsim/JSBSim In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16730 Modified Files: makemake.pl Makefile.solo Log Message: Adding control directory to makefile make script Index: makemake.pl =================================================================== RCS file: /cvsroot/jsbsim/JSBSim/makemake.pl,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -r1.21 -r1.22 *** makemake.pl 17 Apr 2004 21:08:47 -0000 1.21 --- makemake.pl 23 Apr 2004 11:33:53 -0000 1.22 *************** *** 18,22 **** print "FGJSBBase.o FGPropertyManager.o FGSimTurbine.o FGElectric.o FGPropagate.o\n\n"; # ! print "JSBSim_sources = FG*.cpp FG*.h JSBSim.cpp *.?xx filtersjb/*.cpp filtersjb/*.h simgear/props/*.?xx\\\n"; print "Makefile.* aircraft/*/*.xml engine/*.xml scripts/*.xml *ake* */*ake* */*/*ake*\n\n"; # --- 18,22 ---- print "FGJSBBase.o FGPropertyManager.o FGSimTurbine.o FGElectric.o FGPropagate.o\n\n"; # ! print "JSBSim_sources = FG*.cpp FG*.h JSBSim.cpp *.?xx filtersjb/*.cpp filtersjb/*.h simgear/props/*.?xx control/*.xml\\\n"; print "Makefile.* aircraft/*/*.xml engine/*.xml scripts/*.xml *ake* */*ake* */*/*ake*\n\n"; # Index: Makefile.solo =================================================================== RCS file: /cvsroot/jsbsim/JSBSim/Makefile.solo,v retrieving revision 1.61 retrieving revision 1.62 diff -C2 -r1.61 -r1.62 *** Makefile.solo 17 Apr 2004 21:13:23 -0000 1.61 --- Makefile.solo 23 Apr 2004 11:33:53 -0000 1.62 *************** *** 11,15 **** FGJSBBase.o FGPropertyManager.o FGSimTurbine.o FGElectric.o FGPropagate.o ! JSBSim_sources = FG*.cpp FG*.h JSBSim.cpp *.?xx filtersjb/*.cpp filtersjb/*.h simgear/props/*.?xx\ Makefile.* aircraft/*/*.xml engine/*.xml scripts/*.xml *ake* */*ake* */*/*ake* --- 11,15 ---- FGJSBBase.o FGPropertyManager.o FGSimTurbine.o FGElectric.o FGPropagate.o ! JSBSim_sources = FG*.cpp FG*.h JSBSim.cpp *.?xx filtersjb/*.cpp filtersjb/*.h simgear/props/*.?xx control/*.xml\ Makefile.* aircraft/*/*.xml engine/*.xml scripts/*.xml *ake* */*ake* */*/*ake* *************** *** 364,370 **** $(CC) $(INCLUDES) $(CCOPTS) -oFGTurbine.o -c FGTurbine.cpp - File1.o: File1.cpp - $(CC) $(INCLUDES) $(CCOPTS) -oFile1.o -c File1.cpp - JSBSim.o: JSBSim.cpp FGFDMExec.h FGModel.h FGJSBBase.h \ FGPropertyManager.h simgear/props/props.hxx FGTrim.h FGTrimAxis.h \ --- 364,367 ---- |