]> git.mxchange.org Git - flightgear.git/commitdiff
Move some values exclusively used by LaRCsim to LaRCsim
authorfrohlich <frohlich>
Fri, 9 Nov 2007 05:39:13 +0000 (05:39 +0000)
committerfrohlich <frohlich>
Fri, 9 Nov 2007 05:39:13 +0000 (05:39 +0000)
src/FDM/LaRCsim/LaRCsim.cxx
src/FDM/LaRCsim/LaRCsim.hxx
src/FDM/flight.cxx
src/FDM/flight.hxx

index f1da8e84789e9c9352e2bef4f43ffd70bed87bbb..719d90daaa7adbe6ea2b89f787fb53c7ba261f2e 100644 (file)
@@ -50,6 +50,8 @@
 
 
 FGLaRCsim::FGLaRCsim( double dt ) {
+    mass=i_xx=i_yy=i_zz=i_xz=0;
+
 //     set_delta_t( dt );
 
     speed_up = fgGetNode("/sim/speed-up", true);
index 6870d479c576ab22574a5e8c6c93db6242e4aa3f..9759f6c2aa3e181b9ac5fcedba3cf13870607235 100644 (file)
@@ -44,6 +44,7 @@ private:
     SGPropertyNode_ptr speed_up;
     SGPropertyNode_ptr aero;
     SGPropertyNode_ptr uiuc_type;
+    double mass, i_xx, i_yy, i_zz, i_xz;
     
 public:
 
@@ -86,11 +87,21 @@ public:
     void set_Static_temperature(double T); 
     void set_Density(double rho); 
 
-/*
-    void set_Velocities_Local_Airmass (double wnorth, 
-                                      double weast, 
-                                      double wdown );
-*/
+    // Inertias
+    double get_Mass() const { return mass; }
+    double get_I_xx() const { return i_xx; }
+    double get_I_yy() const { return i_yy; }
+    double get_I_zz() const { return i_zz; }
+    double get_I_xz() const { return i_xz; }
+
+    void _set_Inertias( double m, double xx, double yy, double zz, double xz)
+    {
+       mass = m;
+       i_xx = xx;
+       i_yy = yy;
+       i_zz = zz;
+       i_xz = xz;
+    }
 };
 
 
index 637649b97381ac97970fe70cebbce8a6eff1968e..f1b88d36540fe89d570fde0d1b6f726ba4db397c 100644 (file)
@@ -130,7 +130,6 @@ FGInterface::_setup ()
     geocentric_position_v = SGGeoc::fromCart(cartesian_position_v);
     euler_angles_v = SGVec3d::zeros();
     
-    mass=i_xx=i_yy=i_zz=i_xz=0;
     nlf=0;
     v_rel_wind=v_true_kts=0;
     v_ground_speed=v_equiv_kts=0;
@@ -621,11 +620,6 @@ void FGInterface::_busdump(void) {
     SG_LOG(SG_FLIGHT,SG_INFO,"geodetic_position_v: " << geodetic_position_v);
     SG_LOG(SG_FLIGHT,SG_INFO,"euler_angles_v: " << euler_angles_v);
 
-    SG_LOG(SG_FLIGHT,SG_INFO,"mass: " << mass );
-    SG_LOG(SG_FLIGHT,SG_INFO,"i_xx: " << i_xx );
-    SG_LOG(SG_FLIGHT,SG_INFO,"i_yy: " << i_yy );
-    SG_LOG(SG_FLIGHT,SG_INFO,"i_zz: " << i_zz );
-    SG_LOG(SG_FLIGHT,SG_INFO,"i_xz: " << i_xz );
     SG_LOG(SG_FLIGHT,SG_INFO,"nlf: " << nlf );
     SG_LOG(SG_FLIGHT,SG_INFO,"v_rel_wind: " << v_rel_wind );
     SG_LOG(SG_FLIGHT,SG_INFO,"v_true_kts: " << v_true_kts );
index 4a47eeac3f0cd21870257ec580fe2564cb2ceca3..23eb9025095a46c283c9afd7f8f05346959f73dc 100644 (file)
    `FGInterface::get_Psi ()'
    `FGInterface::get_V_equiv_kts ()'
 
-   `FGInterface::get_Mass ()'
-   `FGInterface::get_I_xx ()'
-   `FGInterface::get_I_yy ()'
-   `FGInterface::get_I_zz ()'
-   `FGInterface::get_I_xz ()'
-   
    `FGInterface::get_V_north ()'
    `FGInterface::get_V_east ()'
    `FGInterface::get_V_down ()'
@@ -146,9 +140,6 @@ private:
     SGGeoc geocentric_position_v;
     SGVec3d euler_angles_v;
 
-    // Inertias
-    double mass, i_xx, i_yy, i_zz, i_xz;
-
     // Normal Load Factor
     double nlf;
 
@@ -199,15 +190,6 @@ public:
     void _updateGeocentricPosition( double lat_geoc, double lon, double alt );
     void _update_ground_elev_at_pos( void );
 
-    inline void _set_Inertias( double m, double xx, double yy, 
-                             double zz, double xz)
-    {
-       mass = m;
-       i_xx = xx;
-       i_yy = yy;
-       i_zz = zz;
-       i_xz = xz;
-    }
     inline void _set_CG_Position( double dx, double dy, double dz ) {
        d_cg_rp_body_v[0] = dx;
        d_cg_rp_body_v[1] = dy;
@@ -450,13 +432,6 @@ public:
 
     // ========== Mass properties and geometry values ==========
 
-    // Inertias
-    inline double get_Mass() const { return mass; }
-    inline double get_I_xx() const { return i_xx; }
-    inline double get_I_yy() const { return i_yy; }
-    inline double get_I_zz() const { return i_zz; }
-    inline double get_I_xz() const { return i_xz; }
-
     // CG position w.r.t. ref. point
     inline double get_Dx_cg() const { return d_cg_rp_body_v[0]; }
     inline double get_Dy_cg() const { return d_cg_rp_body_v[1]; }