Patches from Tony to enable brakes.
This commit is contained in:
parent
eeaf652ddb
commit
5097ba0bf8
3 changed files with 25 additions and 16 deletions
|
@ -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))
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue