- double remainder; // remainder time from last run
-
- // CG position w.r.t. ref. point
- SGVec3d d_cg_rp_body_v;
-
- // Accelerations
- SGVec3d v_dot_local_v;
- SGVec3d v_dot_body_v;
- SGVec3d a_cg_body_v;
- SGVec3d a_pilot_body_v;
- SGVec3d n_cg_body_v;
- SGVec3d omega_dot_body_v;
-
- // Velocities
- SGVec3d v_local_v;
- SGVec3d v_local_rel_ground_v; // V rel w.r.t. earth surface
- SGVec3d v_local_airmass_v; // velocity of airmass (steady winds)
- SGVec3d v_wind_body_v; // Wind-relative velocities in body axis
-
- SGVec3d omega_body_v; // Angular B rates
- SGVec3d euler_rates_v;
- SGVec3d geocentric_rates_v; // Geocentric linear velocities
-
- // Positions
- SGGeod geodetic_position_v;
- SGVec3d cartesian_position_v;
- SGGeoc geocentric_position_v;
- SGVec3d euler_angles_v;
-
- // Normal Load Factor
- double nlf;
-
- // Velocities
- double v_rel_wind, v_true_kts;
- double v_ground_speed, v_equiv_kts;
- double v_calibrated_kts;
-
- // Miscellaneious Quantities
- double alpha, beta; // in radians
- double gamma_vert_rad; // Flight path angles
- double density, mach_number;
- double static_pressure, total_pressure;
- double dynamic_pressure;
- double static_temperature, total_temperature;
- double sea_level_radius, earth_position_angle;
- double runway_altitude;
- double climb_rate; // in feet per second
- double altitude_agl;
-
- double daux[16]; // auxilliary doubles
- float faux[16]; // auxilliary floats
- int iaux[16]; // auxilliary ints
+ /**
+ * encapsulate primary flight state. This is packaged so it can be
+ * (unfortunately) sent directly over the wire by the 'native' FDM
+ * protocol.
+ */
+ struct FlightState
+ {
+ // CG position w.r.t. ref. point
+ SGVec3d d_cg_rp_body_v;
+
+ // Accelerations
+ SGVec3d v_dot_local_v;
+ SGVec3d v_dot_body_v;
+ SGVec3d a_cg_body_v;
+ SGVec3d a_pilot_body_v;
+ SGVec3d n_cg_body_v;
+ SGVec3d omega_dot_body_v;
+
+ // Velocities
+ SGVec3d v_local_v;
+ SGVec3d v_local_rel_ground_v; // V rel w.r.t. earth surface
+ SGVec3d v_local_airmass_v; // velocity of airmass (steady winds)
+ SGVec3d v_body_v; // ECEF velocities in body axis
+
+ SGVec3d omega_body_v; // Angular B rates
+ SGVec3d euler_rates_v;
+ SGVec3d geocentric_rates_v; // Geocentric linear velocities
+
+ // Positions
+ SGGeod geodetic_position_v;
+ SGVec3d cartesian_position_v;
+ SGGeoc geocentric_position_v;
+ SGVec3d euler_angles_v;
+
+ // Normal Load Factor
+ double nlf;
+
+ // Velocities
+ double v_rel_wind, v_true_kts;
+ double v_ground_speed, v_equiv_kts;
+ double v_calibrated_kts;
+
+ // Miscellaneious Quantities
+ double alpha, beta; // in radians
+ double gamma_vert_rad; // Flight path angles
+ double density, mach_number;
+ double static_pressure, total_pressure;
+ double dynamic_pressure;
+ double static_temperature, total_temperature;
+ double sea_level_radius, earth_position_angle;
+ double runway_altitude;
+ double climb_rate; // in feet per second
+ double altitude_agl;
+ double track;
+ };
+
+ FlightState _state;
+
+ simgear::TiedPropertyList _tiedProperties;