13.07.2015 Views

An Integrated, Modular Simulation System for Education ... - Cal Poly

An Integrated, Modular Simulation System for Education ... - Cal Poly

An Integrated, Modular Simulation System for Education ... - Cal Poly

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

}opMode = HELP;else if ((*argv[i] == ’w’) || (*argv[i] == ’W’))opMode = WALK;else if ((*argv[i] == ’v’) || (*argv[i] == ’V’))opMode = VERSION;elseTerminate("invalid command line parameter","ParseCLP()");}}else if (argc > (MAX_ARGS + 1))Terminate("extra command line parameter","ParseCLP()");// handles a ground approach by determining from pitch and roll whether// the airplane has landed safely or crashedvoid GroundApproach(){// handle approaching the ground// REV 2.1 change debug mode to reset aircraft.if ((opMode == FLIGHT)||(opMode == DEBUG) ) {if ( (Snoopy.airborne) && (Snoopy.altitude 10) ||(Snoopy.pitch < -10)) ||((Snoopy.roll > 10) ||(Snoopy.roll < -10)) ){if( opMode == DEBUG) {gotoxy(3,1);cprintf(" CRRAAASSSSHHHHH!!!! Go find a real Pilot you Looser!");}elseShowCrash();// viewcntl.cppSnoopy.ResetACState(); // aircraft.cppdelay(200);controler.ResetControls();while( !controler.<strong>An</strong>yPress() ); // input.cpp}elseSnoopy.LandAC(); // aircraft.cpp}}}// this function displays the program version numbervoid DisplayVersion(){cprintf(" ŒŒŒŒŒŒŒŒŒŒŒŒŒŒŒŒŒŒŒŒŒŒŒŒŒŒŒŒŒŒŒŒŒŒŒ¨\r\n");cprintf("……\r\n");cprintf("ØŒŒŒŒŒŒŒŒŒŒŒŒŒŒŒŒŒŒŒŒŒŒŒŒŒŒŒŒŒŒŒŒŒŒŒ_\r\n");gotoxy( 4, 2 );cprintf("Snoopy Linear Flight Simulator, Version %i.%i%c", MAJ_VER, MIN_VER, VER_LET);gotoxy( 4, 6 );}104

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!