]> git.mxchange.org Git - flightgear.git/blobdiff - src/FDM/LaRCsim/ls_aux.c
Improve timing statistics
[flightgear.git] / src / FDM / LaRCsim / ls_aux.c
index 2c31b7019371f92175ae27fc0d070b873d0261ec..a2a59f508f5b86ee51298297321ed40dc8eeef0a 100644 (file)
 
 $Header$
 $Log$
-Revision 1.2  2002/11/08 17:03:50  curt
+Revision 1.4  2003/05/25 12:14:46  ehofman
+Rename some defines to prevent a namespace clash
+
+Revision 1.3  2003/05/13 18:45:06  curt
 Robert Deters:
 
-Latest revisions of the UIUC code.
+  I have attached some revisions for the UIUCModel and some LaRCsim.
+  The only thing you should need to check is LaRCsim.cxx.  The file
+  I attached is a revised version of 1.5 and the latest is 1.7.  Also,
+  uiuc_getwind.c and uiuc_getwind.h are no longer in the LaRCsim
+  directory.  They have been moved over to UIUCModel.
+
+Revision 1.2  2003/03/31 03:05:39  m-selig
+uiuc wind changes, MSS
+
+Revision 1.1.1.1  2003/02/28 01:33:39  rob
+uiuc version of FlightGear v0.9.0
+
+Revision 1.2  2002/10/22 21:06:49  rob
+*** empty log message ***
 
-Revision 1.1.1.1  2002/09/10 01:14:01  curt
-Initial revision of FlightGear-0.9.0
+Revision 1.1.1.1  2002/04/24 17:08:23  rob
+UIUC version of FlightGear-0.7.pre11
 
 Revision 1.3  2001/03/24 05:03:12  curt
 SG-ified logstream.
@@ -299,12 +315,8 @@ Initial Flight Gear revision.
 
 #include <math.h>
 
-#include "uiuc_getwind.h" //For wind gradient functions
-
 void ls_aux( void ) {
 
-        static double uiuc_wind[3] = {0, 0, 0}; //The UIUC wind vector (initialized to zero)
-
        SCALAR  dx_pilot_from_cg, dy_pilot_from_cg, dz_pilot_from_cg;
        /* SCALAR inv_Mass; */
        SCALAR  v_XZ_plane_2, signU, v_tangential;
@@ -328,16 +340,9 @@ void ls_aux( void ) {
          - OMEGA_EARTH*Sea_level_radius*cos( Lat_geocentric );
        V_down_rel_ground  = V_down;
 
-        //BEGIN Modified UIUC arbitrary wind calculations:
-        uiuc_getwind(uiuc_wind); //Update the UIUC wind vector
-        V_north_rel_airmass = V_north_rel_ground - uiuc_wind[0] - V_north_airmass;
-        V_east_rel_airmass  = V_east_rel_ground  - uiuc_wind[1] - V_east_airmass;
-        V_down_rel_airmass  = V_down_rel_ground  - uiuc_wind[2] - V_down_airmass;
-        //END UIUC wind code
-       
-//     V_north_rel_airmass = V_north_rel_ground - V_north_airmass;
-//     V_east_rel_airmass  = V_east_rel_ground  - V_east_airmass;
-//     V_down_rel_airmass  = V_down_rel_ground  - V_down_airmass;
+       V_north_rel_airmass = V_north_rel_ground - V_north_airmass;
+       V_east_rel_airmass  = V_east_rel_ground  - V_east_airmass;
+       V_down_rel_airmass  = V_down_rel_ground  - V_down_airmass;
        
        U_body = T_local_to_body_11*V_north_rel_airmass 
          + T_local_to_body_12*V_east_rel_airmass
@@ -363,14 +368,14 @@ void ls_aux( void ) {
                
        if( (v_XZ_plane_2 == 0) || (V_rel_wind == 0) )
        {
-               Alpha_dot = 0;
-               Beta_dot = 0;
+               Std_Alpha_dot = 0;
+               Std_Beta_dot = 0;
        }
        else
        {
-               Alpha_dot = (U_body*W_dot_body - W_body*U_dot_body)/
+               Std_Alpha_dot = (U_body*W_dot_body - W_body*U_dot_body)/
                  v_XZ_plane_2;
-               Beta_dot = (signU*v_XZ_plane_2*V_dot_body 
+               Std_Beta_dot = (signU*v_XZ_plane_2*V_dot_body 
                  - V_body*(U_body*U_dot_body + W_body*W_dot_body))
                    /(V_rel_wind*V_rel_wind*sqrt(v_XZ_plane_2));
        }
@@ -378,20 +383,20 @@ void ls_aux( void ) {
     /* Calculate flight path and other flight condition values */
 
        if (U_body == 0) 
-               Alpha = 0;
+               Std_Alpha = 0;
        else
-               Alpha = atan2( W_body, U_body );
+               Std_Alpha = atan2( W_body, U_body );
                
-       Cos_alpha = cos(Alpha);
-       Sin_alpha = sin(Alpha);
+       Cos_alpha = cos(Std_Alpha);
+       Sin_alpha = sin(Std_Alpha);
        
        if (V_rel_wind == 0)
-               Beta = 0;
+               Std_Beta = 0;
        else
-               Beta = asin( V_body/ V_rel_wind );
+               Std_Beta = asin( V_body/ V_rel_wind );
                
-       Cos_beta = cos(Beta);
-       Sin_beta = sin(Beta);
+       Cos_beta = cos(Std_Beta);
+       Sin_beta = sin(Std_Beta);
        
        V_true_kts = V_rel_wind * V_TO_KNOTS;