All pastes #226814 Raw Edit

Untitled

public cpp v1 · immutable
#226814 ·published 2006-10-28 21:11 UTC
rendered paste body
	FILE *File_Output;	FILE *File_Input;	NumRecords = 0;	File_Input = fopen ("GMCN.001", "rt");    File_Output = fopen ("PPO.001", "at");if((File_Input && File_Output) != NULL){    while (fscanf (File_Input, "%d %lf %lf %lf %lf %lf %lf %lf", &GPSWeek, &GPSSecond,	&Latitude, &Longitude, &Altitude, &Pitch, &Roll, &Heading) == 8)	{		if (Longitude < 0)			Longitude = - Longitude;		fprintf (File_Output, "%.10f,%.10f,%.3f, %d %.4f %.4f %.4f %.4f\n",	Latitude, Longitude, Altitude, GPSWeek, GPSSecond, Pitch, Roll, Heading); // "carry" field		Latitude += 0.001;		fprintf (File_Output, "%.10f,%.10f,%.3f, %d %.4f %.4f %.4f %.4f\n",	Latitude, Longitude, Altitude, GPSWeek, GPSSecond, Pitch, Roll, Heading); // "carry" field		NumRecords ++;	}    LLtoUTM(RefEllipsoid, Lat, Long, UTMNorthing, UTMEasting, UTMZone);}elseperror("opening files:");