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