import std.*;
class GPXget
{std.InFile iF;
std.OutFile pF;
std.OutFile xF;
int[] b = new int[140000];
GPXget(String fileName)
{iF = new std.InFile(fileName+".gps");
xF = new std.OutFile(fileName+".gpx");
xF.writeLine
("");
xF.writeLine
("");
xF.writeLine("");
xF.writeLine(" ");
xF.writeLine("");
xF.writeLine("");
xF.writeLine("");
pF = new std.OutFile("pl"+fileName+".dat");
pF.writeLine("-1");
pF.writeLine("i t lat lon x y");
int k=0;
std.Text line;
while (true)
{line = new std.Text(iF.read());
if(line.s.equals("endOfFile"))
break;
std.Text[] bytes = line.chopped(" ");
for (int i=0;i k)
break;
int t = b[12*it]*256*256 +
b[12*it+1]*256+
b[12*it+2];
double x = b[12*it+4]*256*256*256 +
b[12*it+5]*256*256+
b[12*it+6]*256+
b[12*it+7];
double y = b[12*it+8]*256*256*256 +
b[12*it+9]*256*256+
b[12*it+10]*256+
b[12*it+11];
it++;
int th = t/3600;
int tm = t/60 - th*60;
int ts = t - tm*60 - th*3600;
double lat = (la0 + kLat*x)/600000.;
double lon = (lo0 + kLon*y)/600000.;
pF.writeLine(it+" "+t+" "+lat+" "+lon+" "+x+" "+y);
xF.writeLine("");
xF.writeLine(" ");
xF.writeLine("");
}
xF.writeLine("");
xF.writeLine("");
xF.writeLine("");
}
private int hexRead(String s)
{return 16*hex(s.charAt(0))+hex(s.charAt(1));
}
private int hex(char c)
{String hx = "0123456789ABCDEF";
for(int i = 0;i