]> git.mxchange.org Git - flightgear.git/blobdiff - src/FDM/flight.cxx
- Added ultra-light traffic is now a separate traffic class that can have its
[flightgear.git] / src / FDM / flight.cxx
index 08aa8fae79bcf8a882ecaaf17dffcae807979e0a..1f4a6acfced63891050937d38164eebe18c462c0 100644 (file)
@@ -363,6 +363,10 @@ FGInterface::bind ()
   fgTie("/orientation/yaw-rate-degps", this,
        &FGInterface::get_Psi_dot_degps);
 
+                                // Ground speed knots
+  fgTie("/velocities/groundspeed-kt", this,
+        &FGInterface::get_V_ground_speed_kt);
+
                                // Calibrated airspeed
   fgTie("/velocities/airspeed-kt", this,
        &FGInterface::get_V_calibrated_kts,
@@ -486,6 +490,7 @@ FGInterface::unbind ()
   fgUntie("/orientation/side-slip-deg");
   fgUntie("/orientation/alpha-deg");
   fgUntie("/velocities/airspeed-kt");
+  fgUntie("/velocities/groundspeed-kt");
   fgUntie("/velocities/mach");
   fgUntie("/velocities/speed-north-fps");
   fgUntie("/velocities/speed-east-fps");
@@ -873,7 +878,7 @@ FGInterface::get_agl_m(double t, const double pt[3],
   sgdCopyVec3(normal, _normal.data());
   sgdCopyVec3(vel, _vel.data());
   if (material) {
-    *loadCapacity = material->get_load_resistence();
+    *loadCapacity = material->get_load_resistance();
     *frictionFactor = material->get_friction_factor();
 
   } else {
@@ -883,6 +888,20 @@ FGInterface::get_agl_m(double t, const double pt[3],
   return ret;
 }
 
+bool
+FGInterface::get_agl_m(double t, const double pt[3],
+                       double contact[3], double normal[3], double vel[3],
+                       int *type, const SGMaterial **material, double *agl)
+{
+  SGVec3d _contact, _normal, _vel;
+  bool ret = ground_cache.get_agl(t, SGVec3d(pt), 2.0, _contact, _normal,
+                                  _vel, type, material, agl);
+  sgdCopyVec3(contact, _contact.data());
+  sgdCopyVec3(normal, _normal.data());
+  sgdCopyVec3(vel, _vel.data());
+  return ret;
+}
+
 // Legacy interface just kept because of JSBSim
 bool
 FGInterface::get_agl_ft(double t, const double pt[3],
@@ -906,7 +925,7 @@ FGInterface::get_agl_ft(double t, const double pt[3],
   // return material properties if available
   if (material) {
     // FIXME: convert units?? now pascal to lbf/ft^2
-    *loadCapacity = 0.020885434*material->get_load_resistence();
+    *loadCapacity = 0.020885434*material->get_load_resistance();
     *frictionFactor = material->get_friction_factor();
   } else {
     *loadCapacity = DBL_MAX;