Download (A Flight Data Recorder): Operation Manual

Transcript
printf("Exiting Program!\n");
exit(0);
}
printf("\n\nPreprocessing:\n\td) decimate?\n\tm) marked only?\n");
printf("\tn) none?\n\nEnter d, m, or n: ");
do
{
Res = toupper((char)getch());
}while(Res != 'D' && Res != 'M' && Res != 'N');
if(Res == 'D')
{
printf("\n\nDecimation Factor?
gets(temp);
sscanf(temp,"%d",&factor);
}
");
printf("\n\n");
sprintf(StrBuffer,"Time\tMark\tMode\tZone\tNorthing\tEasting\tAlt\tRate_of_Climb\tAirspee
d\tMagHeading\tPitch\tRoll\tBall\tCDI_1\tT_F1\tFlag1\tCDI_2\tT_F2\tFlag2\tGSCDI\tGSFlag\t
COG\tSOG\n");
fputs(StrBuffer,out);
j=0;
do
{
count = fread(Buffer,size,500,in);
if(!count) break;
for(i=0;i<count;i++)
{
if((Res == 'M' && Buffer[i].Mark != 0) || Res != 'M')
{
if(j == 0 || Res != 'D')
{
ll2UTM((long double)Buffer[i].Latitude,
(long double)Buffer[i].Longitude,&north,&east,&zone);
Buffer[i].Latitude = (double) north;
Buffer[i].Longitude = (double) east;
convert(Buffer[i],zone,StrBuffer);
fputs(StrBuffer,out);
j = factor;
}
}
j--;
}
}while(1);
fclose(in);
fclose(out);
return 0;
}
63