]> 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 226eea64ff92c17f12fd37ec93a5942b42b89ce5..a2a59f508f5b86ee51298297321ed40dc8eeef0a 100644 (file)
 
 $Header$
 $Log$
+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:
+
+  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/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.
+
 Revision 1.2  2000/10/23 22:34:54  curt
 I tested:
 LaRCsim c172 on-ground and in-air starts, reset: all work
@@ -85,7 +112,7 @@ src/FDM/flight.hxx
 -- that small set is declared virtual, the default implementation
 provided preserves the old behavior
 -- all of the vector data members are now initialized.
--- added busdump() method -- FG_LOG's  all the bus data when called,
+-- added busdump() method -- SG_LOG's  all the bus data when called,
 useful for diagnostics.
 
 src/FDM/ADA.cxx
@@ -288,7 +315,6 @@ Initial Flight Gear revision.
 
 #include <math.h>
 
-
 void ls_aux( void ) {
 
        SCALAR  dx_pilot_from_cg, dy_pilot_from_cg, dz_pilot_from_cg;
@@ -313,7 +339,7 @@ void ls_aux( void ) {
        V_east_rel_ground  = V_east 
          - OMEGA_EARTH*Sea_level_radius*cos( Lat_geocentric );
        V_down_rel_ground  = V_down;
-       
+
        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;
@@ -342,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));
        }
@@ -357,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;