]> git.mxchange.org Git - flightgear.git/commitdiff
Updated so load/save will work.
authorcurt <curt>
Fri, 13 Jul 2001 21:45:48 +0000 (21:45 +0000)
committercurt <curt>
Fri, 13 Jul 2001 21:45:48 +0000 (21:45 +0000)
src/FDM/flight.cxx
src/FDM/flight.hxx

index b52b337c064bc4d7be9435947fc0402abb7dcdcf..5c065ca21b2215ad1ad4a5ae9e2bef0e022e1974 100644 (file)
@@ -304,29 +304,44 @@ FGInterface::bind ()
        &FGInterface::set_V_calibrated_kts);
 
                                // Local velocities
+//   fgTie("/velocities/speed-north-fps", this,
+//     &FGInterface::get_V_north,
+//     &FGInterface::set_V_north);
+//   fgSetArchivable("/velocities/speed-north-fps");
+//   fgTie("/velocities/speed-east-fps", this,
+//     &FGInterface::get_V_east,
+//     &FGInterface::set_V_east);
+//   fgSetArchivable("/velocities/speed-east-fps");
+//   fgTie("/velocities/speed-down-fps", this,
+//     &FGInterface::get_V_down,
+//     &FGInterface::set_V_down);
+//   fgSetArchivable("/velocities/speed-down-fps");
+                               // FIXME: Temporarily read-only, until the
+                               // incompatibilities between JSBSim and
+                               // LaRCSim are fixed (LaRCSim adds the
+                               // earth's rotation to the east velocity).
   fgTie("/velocities/speed-north-fps", this,
-       &FGInterface::get_V_north,
-       &FGInterface::set_V_north);
-  fgSetArchivable("/velocities/speed-north-fps");
+       &FGInterface::get_V_north);
   fgTie("/velocities/speed-east-fps", this,
-       &FGInterface::get_V_east,
-       &FGInterface::set_V_east);
-  fgSetArchivable("/velocities/speed-east-fps");
+       &FGInterface::get_V_east);
   fgTie("/velocities/speed-down-fps", this,
-       &FGInterface::get_V_down,
-       &FGInterface::set_V_down);
-  fgSetArchivable("/velocities/speed-down-fps");
+       &FGInterface::get_V_down);
 
                                // Relative wind
+                               // FIXME: temporarily archivable, until
+                               // the NED problem is fixed.
   fgTie("/velocities/uBody-fps", this,
        &FGInterface::get_uBody,
        &FGInterface::set_uBody);
+  fgSetArchivable("/velocities/uBody-fps");
   fgTie("/velocities/vBody-fps", this,
        &FGInterface::get_vBody,
        &FGInterface::set_vBody);
+  fgSetArchivable("/velocities/vBody-fps");
   fgTie("/velocities/wBody-fps", this,
        &FGInterface::get_wBody,
        &FGInterface::set_wBody);
+  fgSetArchivable("/velocities/wBody-fps");
 
                                // Climb and slip (read-only)
   fgTie("/velocities/vertical-speed-fps", this,
index c04b12b8a00bc7abec2e8d43b058110c876c1cc4..cf3a33dd9db2868e54187ffd0bf677033c97a238 100644 (file)
@@ -514,13 +514,25 @@ public:
     virtual void set_V_calibrated_kts(double vc);
     virtual void set_Mach_number(double mach);
     virtual void set_Velocities_Local( double north, double east, double down );
-    inline void set_V_north (double north) { v_local_v[0] = north; }
-    inline void set_V_east (double east) { v_local_v[1] = east; }
-    inline void set_V_down (double down) { v_local_v[2] = down; }
+    inline void set_V_north (double north) { 
+      set_Velocities_Local(north, v_local_v[1], v_local_v[2]);
+    }
+    inline void set_V_east (double east) { 
+      set_Velocities_Local(v_local_v[0], east, v_local_v[2]);
+    }
+    inline void set_V_down (double down) { 
+      set_Velocities_Local(v_local_v[0], v_local_v[1], down);
+    }
     virtual void set_Velocities_Wind_Body( double u, double v, double w);
-    virtual void set_uBody (double uBody) { v_wind_body_v[0] = uBody; }
-    virtual void set_vBody (double vBody) { v_wind_body_v[1] = vBody; }
-    virtual void set_wBody (double wBody) { v_wind_body_v[2] = wBody; }
+    virtual void set_uBody (double uBody) { 
+      set_Velocities_Wind_Body(uBody, v_wind_body_v[1], v_wind_body_v[2]);
+    }
+    virtual void set_vBody (double vBody) { 
+      set_Velocities_Wind_Body(v_wind_body_v[0], vBody, v_wind_body_v[2]);
+    }
+    virtual void set_wBody (double wBody) {
+      set_Velocities_Wind_Body(v_wind_body_v[0], v_wind_body_v[1], wBody);
+    }
     
     // Euler angles 
     virtual void set_Euler_Angles( double phi, double theta, double psi );