]> git.mxchange.org Git - flightgear.git/blobdiff - src/FDM/flight.cxx
Interim windows build fix
[flightgear.git] / src / FDM / flight.cxx
index ccef14e0b9c64d59b617c48e9754a4ab875be62b..91a2b13342b7c06152a9c0e8f22b6be5040e8fc3 100644 (file)
@@ -98,7 +98,7 @@ FGInterface::_setup ()
     _state.v_local_v = SGVec3d::zeros();
     _state.v_local_rel_ground_v = SGVec3d::zeros();
     _state.v_local_airmass_v = SGVec3d::zeros();
-    _state.v_wind_body_v = SGVec3d::zeros();
+    _state.v_body_v = SGVec3d::zeros();
     _state.omega_body_v = SGVec3d::zeros();
     _state.euler_rates_v = SGVec3d::zeros();
     _state.geocentric_rates_v = SGVec3d::zeros();
@@ -200,13 +200,13 @@ FGInterface::common_init ()
     if ( !fgHasNode("/sim/presets/speed-set") ) {
         set_V_calibrated_kts(0.0);
     } else {
-        const string speedset = fgGetString("/sim/presets/speed-set");
+        const std::string speedset = fgGetString("/sim/presets/speed-set");
         if ( speedset == "knots" || speedset == "KNOTS" ) {
             set_V_calibrated_kts( fgGetDouble("/sim/presets/airspeed-kt") );
         } else if ( speedset == "mach" || speedset == "MACH" ) {
             set_Mach_number( fgGetDouble("/sim/presets/mach") );
         } else if ( speedset == "UVW" || speedset == "uvw" ) {
-            set_Velocities_Wind_Body(
+            set_Velocities_Body(
                                      fgGetDouble("/sim/presets/uBody-fps"),
                                      fgGetDouble("/sim/presets/vBody-fps"),
                                      fgGetDouble("/sim/presets/wBody-fps") );
@@ -297,6 +297,8 @@ FGInterface::bind ()
   fgSetArchivable("/orientation/heading-deg");
   _tiedProperties.Tie("/orientation/track-deg", this,
                       &FGInterface::get_Track); // read-only
+  _tiedProperties.Tie("/orientation/path-deg", this,
+                      &FGInterface::get_Path); // read-only
 
   // Body-axis "euler rates" (rotation speed, but in a funny
   // representation).
@@ -366,7 +368,7 @@ FGInterface::bind ()
   _tiedProperties.Tie("/velocities/down-relground-fps", this,
                       &FGInterface::get_V_down_rel_ground); // read-only
 
-  // Relative wind
+  // ECEF velocity in body axis
   // FIXME: temporarily archivable, until the NED problem is fixed.
   _tiedProperties.Tie("/velocities/uBody-fps", this,
                       &FGInterface::get_uBody,
@@ -481,7 +483,7 @@ bool FGInterface::writeState(SGIOChannel* io)
 
 void FGInterface::_updatePositionM(const SGVec3d& cartPos)
 {
-    TrackComputer tracker( _state.track, _state.geodetic_position_v );
+    TrackComputer tracker( _state.track, _state.path, _state.geodetic_position_v );
     _state.cartesian_position_v = cartPos;
     _state.geodetic_position_v = SGGeod::fromCart(_state.cartesian_position_v);
     _state.geocentric_position_v = SGGeoc::fromCart(_state.cartesian_position_v);
@@ -492,7 +494,7 @@ void FGInterface::_updatePositionM(const SGVec3d& cartPos)
 
 void FGInterface::_updatePosition(const SGGeod& geod)
 {
-    TrackComputer tracker( _state.track, _state.geodetic_position_v );
+    TrackComputer tracker( _state.track, _state.path, _state.geodetic_position_v );
     _state.geodetic_position_v = geod;
     _state.cartesian_position_v = SGVec3d::fromGeod(_state.geodetic_position_v);
     _state.geocentric_position_v = SGGeoc::fromCart(_state.cartesian_position_v);
@@ -504,7 +506,7 @@ void FGInterface::_updatePosition(const SGGeod& geod)
 
 void FGInterface::_updatePosition(const SGGeoc& geoc)
 {
-    TrackComputer tracker( _state.track, _state.geodetic_position_v );
+    TrackComputer tracker( _state.track, _state.path, _state.geodetic_position_v );
     _state.geocentric_position_v = geoc;
     _state.cartesian_position_v = SGVec3d::fromGeoc(_state.geocentric_position_v);
     _state.geodetic_position_v = SGGeod::fromCart(_state.cartesian_position_v);
@@ -565,12 +567,12 @@ void FGInterface::set_Velocities_Local( double north,
     _state.v_local_v[2] = down;
 }
 
-void FGInterface::set_Velocities_Wind_Body( double u, 
+void FGInterface::set_Velocities_Body( double u, 
                                             double v,
                                             double w){
-    _state.v_wind_body_v[0] = u;
-    _state.v_wind_body_v[1] = v;
-    _state.v_wind_body_v[2] = w;
+    _state.v_body_v[0] = u;
+    _state.v_body_v[1] = v;
+    _state.v_body_v[2] = w;
 }
 
 // Euler angles 
@@ -615,7 +617,7 @@ void FGInterface::_busdump(void)
     SG_LOG(SG_FLIGHT,SG_INFO,"v_local_v: " << _state.v_local_v);
     SG_LOG(SG_FLIGHT,SG_INFO,"v_local_rel_ground_v: " << _state.v_local_rel_ground_v);
     SG_LOG(SG_FLIGHT,SG_INFO,"v_local_airmass_v: " << _state.v_local_airmass_v);
-    SG_LOG(SG_FLIGHT,SG_INFO,"v_wind_body_v: " << _state.v_wind_body_v);
+    SG_LOG(SG_FLIGHT,SG_INFO,"v_body_v: " << _state.v_body_v);
     SG_LOG(SG_FLIGHT,SG_INFO,"omega_body_v: " << _state.omega_body_v);
     SG_LOG(SG_FLIGHT,SG_INFO,"euler_rates_v: " << _state.euler_rates_v);
     SG_LOG(SG_FLIGHT,SG_INFO,"geocentric_rates_v: " << _state.geocentric_rates_v);