1 #ifndef FG_FLIGHT_PROPERTIES_HXX
2 #define FG_FLIGHT_PROPERTIES_HXX
9 #include <simgear/math/SGMathFwd.hxx> // for SGVec3d
10 #include <simgear/math/SGMisc.hxx>
18 * Encapsulate the FDM properties in some getter/setter helpers.
19 * This class intentionally mimics portions of
20 * @FGInterface, to permit easy migration of code outside the FDMs,
21 * to use properties instead of global variables.
23 class FlightProperties
26 FlightProperties(SGPropertyNode* aRoot = NULL);
29 double get_V_north() const;
30 double get_V_east() const;
31 double get_V_down() const;
32 double get_uBody () const;
33 double get_vBody () const;
34 double get_wBody () const;
36 double get_A_X_pilot() const;
37 double get_A_Y_pilot() const;
38 double get_A_Z_pilot() const;
40 double get_P_body() const;
41 double get_Q_body() const;
42 double get_R_body() const;
44 SGGeod getPosition() const;
46 double get_Latitude() const;
47 double get_Longitude() const;
48 double get_Altitude() const;
50 double get_Altitude_AGL(void) const;
51 double get_Track(void) const;
53 double get_Latitude_deg () const;
54 double get_Longitude_deg () const;
56 double get_Phi_deg() const;
57 double get_Theta_deg() const;
58 double get_Psi_deg() const;
60 double get_Phi() const { return SGMiscd::deg2rad(get_Phi_deg()); }
61 double get_Theta() const { return SGMiscd::deg2rad(get_Theta_deg()); }
62 double get_Psi() const { return SGMiscd::deg2rad(get_Psi_deg()); }
64 double get_Phi_dot() const;
65 double get_Theta_dot() const;
66 double get_Psi_dot() const;
67 double get_Alpha() const;
68 double get_Beta() const;
70 double get_Phi_dot_degps() const;
71 double get_Theta_dot_degps() const;
72 double get_Psi_dot_degps() const;
74 double get_V_ground_speed() const; // in feet/s
75 double get_V_equiv_kts() const;
76 double get_V_calibrated_kts() const;
77 double get_Climb_Rate() const;
78 double get_Runway_altitude_m() const;
80 double get_Total_temperature() const;
81 double get_Total_pressure() const;
82 double get_Dynamic_pressure() const;
84 void set_Longitude(double l); // radians
85 void set_Latitude(double l); // radians
86 void set_Altitude(double ft); // feet
88 void set_Euler_Angles(double phi, double theta, double psi);
89 void set_Euler_Rates(double x, double y, double z);
91 void set_Alpha(double a);
92 void set_Beta(double b);
94 void set_Altitude_AGL(double ft);
96 void set_V_calibrated_kts(double kts);
97 void set_Climb_Rate(double fps);
99 void set_Velocities_Local(double x, double y, double z);
100 void set_Velocities_Wind_Body(double x, double y, double z);
101 void set_Accels_Pilot_Body(double x, double y, double z);
103 SGPropertyNode* _root;
106 #endif // of FG_FLIGHT_PROPERTIES_HXX