]> git.mxchange.org Git - flightgear.git/blobdiff - src/FDM/LaRCsim/uiuc_aero.c
I forgot a linker dependency. It really si time to figure out why these are all needed.
[flightgear.git] / src / FDM / LaRCsim / uiuc_aero.c
index c218517d80d291b91f21533e1f120900f3b08dee..bd7d3358f39ee527a3662d2a488e8e0044dd5dd8 100644 (file)
@@ -66,11 +66,21 @@ void uiuc_init_2_wrapper()
 {
     static int init = 0;
 
-    if (init==0)
-    {
-      init = -1; 
-      uiuc_initial_init();
+    // On first time through initialize UIUC aircraft model
+    if (init==0) {
+        init=-1;
+       uiuc_defaults_inits();
+        uiuc_init_aeromodel();
     }
+
+    // Re-initialize velocities and euler angles since LaRCsim tends
+    // to change them
+    uiuc_initial_init();
+}
+
+void uiuc_local_vel_init()
+{
+  uiuc_vel_init();
 }
 
 void uiuc_aero_2_wrapper( SCALAR dt, int Initialize ) 
@@ -81,6 +91,7 @@ void uiuc_aero_2_wrapper( SCALAR dt, int Initialize )
 
 void uiuc_wind_2_wrapper( SCALAR dt, int Initialize ) 
 {
+  if (Initialize == 0)
     uiuc_wind_routine(dt);
 }
 
@@ -103,10 +114,10 @@ void uiuc_record_2_wrapper(SCALAR dt)
 
 void uiuc_network_recv_2_wrapper()
 {
-    uiuc_network_recv_routine();
+  uiuc_network_recv_routine();
 }
 
 void uiuc_network_send_2_wrapper()
 {
-    uiuc_network_send_routine();
+  uiuc_network_send_routine();
 }