]> git.mxchange.org Git - flightgear.git/blobdiff - src/FDM/flight.hxx
JSBSim updates.
[flightgear.git] / src / FDM / flight.hxx
index d17ce874cf9113b2878769f15e9b3965f7449bea..efd04db45ea47bae6dd00feae40918db2183ca86 100644 (file)
@@ -81,7 +81,7 @@
  */
 
 
-#include <Include/compiler.h>
+#include <simgear/compiler.h>
 
 #include <math.h>
 
@@ -111,8 +111,8 @@ public:
 
     // Define the various supported flight models (many not yet implemented)
     enum {
-       // Slew (in MS terminology)
-       FG_SLEW = 0,
+       // Magic Carpet mode
+       FG_MAGICCARPET = 0,
        
        // The NASA LaRCsim (Navion) flight model
        FG_LARCSIM = 1,
@@ -298,14 +298,14 @@ public:
 
     FG_VECTOR_3    v_dot_local_v;
     // inline double * get_V_dot_local_v() { return v_dot_local_v; }
-    // inline double get_V_dot_north() const { return v_dot_local_v[0]; }
-    // inline double get_V_dot_east() const { return v_dot_local_v[1]; }
-    // inline double get_V_dot_down() const { return v_dot_local_v[2]; }
-    /* inline void set_Accels_Local( double north, double east, double down ) {
+    inline double get_V_dot_north() const { return v_dot_local_v[0]; }
+    inline double get_V_dot_east() const { return v_dot_local_v[1]; }
+    inline double get_V_dot_down() const { return v_dot_local_v[2]; }
+    inline void set_Accels_Local( double north, double east, double down ) {
        v_dot_local_v[0] = north;
        v_dot_local_v[1] = east;
        v_dot_local_v[2] = down;
-    } */
+    }
 
     FG_VECTOR_3    v_dot_body_v;
     // inline double * get_V_dot_body_v() { return v_dot_body_v; }
@@ -341,26 +341,30 @@ public:
     }
 
     FG_VECTOR_3    n_cg_body_v;
-    // inline double * get_N_cg_body_v() { return n_cg_body_v; }
-    // inline double get_N_X_cg() const { return n_cg_body_v[0]; }
-    // inline double get_N_Y_cg() const { return n_cg_body_v[1]; }
-    // inline double get_N_Z_cg() const { return n_cg_body_v[2]; }
-    /* inline void set_Accels_CG_Body_N( double x, double y, double z ) {
+     inline double * get_N_cg_body_v() { return n_cg_body_v; }
+     inline double get_N_X_cg() const { return n_cg_body_v[0]; }
+     inline double get_N_Y_cg() const { return n_cg_body_v[1]; }
+     inline double get_N_Z_cg() const { return n_cg_body_v[2]; }
+     inline void set_Accels_CG_Body_N( double x, double y, double z ) {
        n_cg_body_v[0] = x;
        n_cg_body_v[1] = y;
        n_cg_body_v[2] = z;
-    } */
+    } 
 
     FG_VECTOR_3    n_pilot_body_v;
     // inline double * get_N_pilot_body_v() { return n_pilot_body_v; }
-    // inline double get_N_X_pilot() const { return n_pilot_body_v[0]; }
-    // inline double get_N_Y_pilot() const { return n_pilot_body_v[1]; }
-    // inline double get_N_Z_pilot() const { return n_pilot_body_v[2]; }
-    /* inline void set_Accels_Pilot_Body_N( double x, double y, double z ) {
+    inline double get_N_X_pilot() const { return n_pilot_body_v[0]; }
+    inline double get_N_Y_pilot() const { return n_pilot_body_v[1]; }
+    inline double get_N_Z_pilot() const { return n_pilot_body_v[2]; }
+    inline void set_Accels_Pilot_Body_N( double x, double y, double z ) {
        n_pilot_body_v[0] = x;
        n_pilot_body_v[1] = y;
        n_pilot_body_v[2] = z;
-    } */
+    } 
+    
+    double nlf;  //Normal Load Factor
+    double get_Nlf(void) { return nlf; }  
+    void set_Nlf(double n) { nlf=n;  }
 
     FG_VECTOR_3    omega_dot_body_v;
     // inline double * get_Omega_dot_body_v() { return omega_dot_body_v; }
@@ -406,16 +410,16 @@ public:
 
     FG_VECTOR_3    v_local_airmass_v;   // velocity of airmass (steady winds)
     // inline double * get_V_local_airmass_v() { return v_local_airmass_v; }
-    // inline double get_V_north_airmass() const { return v_local_airmass_v[0]; }
-    // inline double get_V_east_airmass() const { return v_local_airmass_v[1]; }
-    // inline double get_V_down_airmass() const { return v_local_airmass_v[2]; }
-    /* inline void set_Velocities_Local_Airmass( double north, double east, 
+    inline double get_V_north_airmass() const { return v_local_airmass_v[0]; }
+    inline double get_V_east_airmass() const { return v_local_airmass_v[1]; }
+    inline double get_V_down_airmass() const { return v_local_airmass_v[2]; }
+    inline void set_Velocities_Local_Airmass( double north, double east, 
                                              double down)
     {
        v_local_airmass_v[0] = north;
        v_local_airmass_v[1] = east;
        v_local_airmass_v[2] = down;
-    } */
+    } 
 
     FG_VECTOR_3    v_local_rel_airmass_v;  // velocity of veh. relative to
     // airmass
@@ -488,11 +492,11 @@ public:
     inline double get_V_equiv_kts() const { return v_equiv_kts; }
     inline void set_V_equiv_kts( double kts ) { v_equiv_kts = kts; }
 
-    // inline double get_V_calibrated() const { return v_calibrated; }
-    // inline void set_V_calibrated( double v ) { v_calibrated = v; }
+    //inline double get_V_calibrated() const { return v_calibrated; }
+    //inline void set_V_calibrated( double v ) { v_calibrated = v; }
 
-    // inline double get_V_calibrated_kts() const { return v_calibrated_kts; }
-    // inline void set_V_calibrated_kts( double kts ) { v_calibrated_kts = kts; }
+    inline double get_V_calibrated_kts() const { return v_calibrated_kts; }
+    inline void set_V_calibrated_kts( double kts ) { v_calibrated_kts = kts; }
 
     FG_VECTOR_3    omega_body_v;   // Angular B rates     
     // inline double * get_Omega_body_v() { return omega_body_v; }
@@ -529,14 +533,14 @@ public:
 
     FG_VECTOR_3    euler_rates_v;
     // inline double * get_Euler_rates_v() { return euler_rates_v; }
-    // 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 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 ) {
        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; }
@@ -693,17 +697,17 @@ public:
     double    sigma, density, v_sound, mach_number;
     // inline double get_Sigma() const { return sigma; }
     // inline void set_Sigma( double s ) { sigma = s; }
-    // inline double get_Density() const { return density; }
-    // inline void set_Density( double d ) { density = d; }
+    inline double get_Density() const { return density; }
+    inline void set_Density( double d ) { density = d; }
     // inline double get_V_sound() const { return v_sound; }
     // inline void set_V_sound( double v ) { v_sound = v; }
-    // inline double get_Mach_number() const { return mach_number; }
-    // inline void set_Mach_number( double m ) { mach_number = m; }
+    inline double get_Mach_number() const { return mach_number; }
+    inline void set_Mach_number( double m ) { mach_number = m; }
 
     double    static_pressure, total_pressure, impact_pressure;
     double    dynamic_pressure;
-    // inline double get_Static_pressure() const { return static_pressure; }
-    // inline void set_Static_pressure( double sp ) { static_pressure = sp; }
+    inline double get_Static_pressure() const { return static_pressure; }
+    inline void set_Static_pressure( double sp ) { static_pressure = sp; }
     // inline double get_Total_pressure() const { return total_pressure; }
     // inline void set_Total_pressure( double tp ) { total_pressure = tp; }
     // inline double get_Impact_pressure() const { return impact_pressure; }
@@ -712,8 +716,8 @@ public:
     // inline void set_Dynamic_pressure( double dp ) { dynamic_pressure = dp; }
 
     double    static_temperature, total_temperature;
-    // inline double get_Static_temperature() const { return static_temperature; }
-    // inline void set_Static_temperature( double t ) { static_temperature = t; }
+    inline double get_Static_temperature() const { return static_temperature; }
+    inline void set_Static_temperature( double t ) { static_temperature = t; }
     // inline double get_Total_temperature() const { return total_temperature; }
     // inline void set_Total_temperature( double t ) { total_temperature = t; }
 
@@ -876,5 +880,3 @@ void fgFDMSetGroundElevation(int model, double alt_meters);
 
 
 #endif // _FLIGHT_HXX
-
-