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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

}cprintf("rudder: %i ", tSV.rudder_pos);gotoxy(3, i++);cprintf("throttle: %i ", tSV.throttle_pos);gotoxy(3, i++);cprintf("ignition: %u ", tSV.ignition_on);gotoxy(3, i++);cprintf("engine on: %i ", tSV.engine_on);gotoxy(3, i++);cprintf("prop rpm: %i ", tSV.rpm);gotoxy(3, i++);cprintf("fuel level: %i ", tSV.fuel);gotoxy(3, i++);cprintf("x coordinate: %i ", tSV.x_pos);gotoxy(3, i++);cprintf("y coordinate: %i ", tSV.y_pos);gotoxy(3, i++);cprintf("z coordinate: %i ", tSV.z_pos);gotoxy(3, i++);cprintf("pitch: %f ", tSV.pitch);gotoxy(3, i++);cprintf("effect. pitch: %f ", tSV.efAOF);gotoxy(3, i++);cprintf("roll: %f ", tSV.roll);gotoxy(3, i++);cprintf("yaw: %f ", tSV.yaw);gotoxy(3, i++);cprintf("speed (H): %f ", tSV.h_speed);gotoxy(3, i++);cprintf("speed (V): %f ", tSV.v_speed);gotoxy(3, i++);cprintf("rate of climb: %f ", tSV.climbRate);gotoxy(3, i++);cprintf("altitude: %i ", tSV.altitude);// reports program status at termination. Based on the value of checkpt it// knows whether this is an abnormal term, and prints the leadin accordinglyvoid Terminate( char* msg, char* loc ){int exit_code;ShutDown();// REV 2.0 rename program (but this shouldn’t be hardcoded anyway).// this whole checkpt thing should be made into a throw from the// various points where the program has failed.cprintf("FSIM.EXE ==>\r\n");if (checkpt < 4) {cprintf( "A critical error occured in function " );cprintf( "%s\r\n", loc );cprintf( "Error: " );cprintf( "%s, causing controlled termination\r\n", msg );exit_code = 1;}else {cprintf("%s in ", msg );cprintf("%s\r\n", loc );101

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

Saved successfully!

Ooh no, something went wrong!