diff --git a/src/FDM/Balloon.cxx b/src/FDM/Balloon.cxx index e5b2b619a..44afb4f4e 100644 --- a/src/FDM/Balloon.cxx +++ b/src/FDM/Balloon.cxx @@ -198,7 +198,7 @@ int FGBalloonSim::copy_from_BalloonSim() { current_balloon.getHPR( temp ); set_Euler_Angles( temp[0], temp[1], temp[2] ); - + set_Euler_Rates(0,0,0); set_Alpha( 0.0/*FDMExec.GetTranslation()->Getalpha()*/ ); set_Beta( 0.0/*FDMExec.GetTranslation()->Getbeta()*/ ); diff --git a/src/FDM/JSBSim.cxx b/src/FDM/JSBSim.cxx index 285b47bf0..9fb14d933 100644 --- a/src/FDM/JSBSim.cxx +++ b/src/FDM/JSBSim.cxx @@ -209,7 +209,9 @@ int FGJSBsim::copy_from_JSBsim() { // set_Omega_Local( P_local, Q_local, R_local ); // set_Omega_Total( P_total, Q_total, R_total ); - // set_Euler_Rates( Phi_dot, Theta_dot, Psi_dot ); + set_Euler_Rates( FDMExec.GetRotation()->Getphi(), + FDMExec.GetRotation()->Gettht(), + FDMExec.GetRotation()->Getpsi() ); // ***FIXME*** set_Geocentric_Rates( Latitude_dot, Longitude_dot, Radius_dot ); set_Mach_number( FDMExec.GetState()->GetMach()); diff --git a/src/FDM/LaRCsim.cxx b/src/FDM/LaRCsim.cxx index 58fe14004..651f264a4 100644 --- a/src/FDM/LaRCsim.cxx +++ b/src/FDM/LaRCsim.cxx @@ -360,7 +360,7 @@ int FGLaRCsim::copy_from_LaRCsim() { // set_Omega_Local( P_local, Q_local, R_local ); // set_Omega_Total( P_total, Q_total, R_total ); - // set_Euler_Rates( Phi_dot, Theta_dot, Psi_dot ); + set_Euler_Rates( Phi_dot, Theta_dot, Psi_dot ); set_Geocentric_Rates( Latitude_dot, Longitude_dot, Radius_dot ); set_Mach_number( mach_number ); diff --git a/src/FDM/MagicCarpet.cxx b/src/FDM/MagicCarpet.cxx index 9b09105ca..31a428aa2 100644 --- a/src/FDM/MagicCarpet.cxx +++ b/src/FDM/MagicCarpet.cxx @@ -62,6 +62,7 @@ int FGMagicCarpet::update( int multiloop ) { // update euler angles set_Euler_Angles( get_Phi(), get_Theta(), fmod(get_Psi() + turn, FG_2PI) ); + set_Euler_Rates(0,0,0); // update (lon/lat) position double lat2, lon2, az2; diff --git a/src/FDM/flight.hxx b/src/FDM/flight.hxx index c9f4fdb8c..c0c6c0319 100644 --- a/src/FDM/flight.hxx +++ b/src/FDM/flight.hxx @@ -532,11 +532,11 @@ public: // inline double get_Phi_dot() const { return euler_rates_v[0]; } // inline double get_Theta_dot() const { return euler_rates_v[1]; } // inline double get_Psi_dot() const { return euler_rates_v[2]; } - /* inline void set_Euler_Rates( double phi, double theta, double psi ) { + inline void set_Euler_Rates( double phi, double theta, double psi ) { euler_rates_v[0] = phi; euler_rates_v[1] = theta; euler_rates_v[2] = psi; - } */ + } FG_VECTOR_3 geocentric_rates_v; // Geocentric linear velocities // inline double * get_Geocentric_rates_v() { return geocentric_rates_v; }