]> git.mxchange.org Git - flightgear.git/commitdiff
Patches from Tony to enable brakes.
authorcurt <curt>
Wed, 3 Nov 1999 17:46:24 +0000 (17:46 +0000)
committercurt <curt>
Wed, 3 Nov 1999 17:46:24 +0000 (17:46 +0000)
src/FDM/LaRCsim/c172_aero.c
src/FDM/LaRCsim/c172_gear.c
src/FDM/LaRCsim/c172_main.c

index 0adafd05da85cde99f3802a74bb164a68f3dc366..d6f390c7650fa732dc48d313240df55ec9bd7014 100644 (file)
@@ -262,10 +262,11 @@ void aero( SCALAR dt, int Initialize ) {
   {            
         
         
-        if((Flap_handle != lastFlapHandle) && (dt > 0))
+        if((Flap_handle != lastFlapHandle) && (dt > 0)) {
                Flaps_In_Transit=1;
-        else if(dt <= 0)
+        } else if(dt <= 0) {
                Flap_Position=Flap_handle;
+        }
                        
         lastFlapHandle=Flap_handle;
         if((Flaps_In_Transit) && (dt > 0))     
index b95aec32e7df327ddc821119ffbe0c3cb1422ccb..11a2b3bdd3eeb988ff1b1d7c7b297fed1c711a83 100644 (file)
@@ -36,6 +36,9 @@
 
 $Header$
 $Log$
+Revision 1.10  1999/11/03 16:46:24  curt
+Patches from Tony to enable brakes.
+
 Revision 1.9  1999/11/01 18:17:16  curt
 c172 updates from Tony.  Fix extra yaw when using ailerons.  Flaps and elevator
 tweaks.
@@ -196,7 +199,7 @@ char rcsid[] = "$Id$";
    * Put aircraft specific executable code here
    */
    
-    percent_brake[1] = 0.; /* replace with cockpit brake handle connection code */
+    percent_brake[1] = Brake_pct; /* replace with cockpit brake handle connection code */
     percent_brake[2] = percent_brake[1];
     
     caster_angle_rad[0] = 0.03*Rudder_pedal;
index 6813fa0adea2edd276b535f6197351942016e150..4c874958f68db44478c8976e871e6d1b3f38d966 100644 (file)
@@ -201,6 +201,7 @@ int main(int argc, char *argv[]) {
     SCALAR *control[7];
        SCALAR *state[7];
        float old_state,effectiveness,tol,delta_state,lctrim;
+       float newcm,lastcm,cmalpha;
        
     if(argc < 6)
        {
@@ -232,19 +233,23 @@ int main(int argc, char *argv[]) {
        printf("\nLong_control: %g\n\n",Long_control);
        
        
-       IC.altitude=1000;
-       setIC(IC);
-       ls_loop(0.0,-1);
-       IC.flap_handle=10;
-       setIC(IC);
-       ls_loop(0.0,-1);
-       IC.flap_handle=20;
-       setIC(IC);
-       ls_loop(0.0,-1);
-       IC.flap_handle=30;
-       setIC(IC);
-       ls_loop(0.0,-1);
-       
+       IC.cg=0.155;
+    IC.alpha=-5;
+       setIC(IC);ls_loop(0.0,-1);
+       newcm=CLwbh*(IC.cg - 0.557);
+       lastcm=newcm;
+       out=fopen("cmcl.out","w");
+       while(IC.alpha < 22)
+       {
+               IC.alpha+=1;
+               setIC(IC);ls_loop(0.0,-1);
+               newcm=CLwbh*(IC.cg - 0.557);
+               cmalpha=newcm-lastcm;
+               printf("alpha: %4.0f, CL: %5.2f, Cm: %5.2f, Cma: %7.4f\n",Alpha*RAD_TO_DEG,CLwbh,newcm,cmalpha);
+               fprintf(out,"%g %g\n",newcm,CLwbh);
+               lastcm=newcm;
+       }       
+       fclose(out);
        /* find_trim_stall(200,out,IC);
        
     IC.vc=120;