I have a file with thousands of these lines:
$GPRMC,131334.0 0,A,4538.6259,N ,01021.4755,E,0 .43,0.0,021105, 1.3,E,A*0D
$GPGGA,131334.0 0,4438.6259,N,0 1021.4755,E,1,0 0,7.8,29.8,M,40 .2,M,,*5C
$GPRMC,131343.0 0,A,4538.6270,N ,01021.4789,E,2 .87,0.0,021105, 1.3,E,A*0F
I must capture ONE line EVERY 10 LINES but only a block of 200 lines
with the first columns begin with $GPGGA.
I must to extrapolate the [column3] and the [column5]
I must write new file with the rows like these:
Point([column5],[column3]),
Point([column5],[column3]),
Point([column5],[column3]),
and so on
<?
$file=file('fil e.txt');
[FUNCTION]
$fp = fopen("newfile. txt", "a");
[WRITE THE CORRECT ROWS]
fclose($fp);
?>
can you help me ?
$GPRMC,131334.0 0,A,4538.6259,N ,01021.4755,E,0 .43,0.0,021105, 1.3,E,A*0D
$GPGGA,131334.0 0,4438.6259,N,0 1021.4755,E,1,0 0,7.8,29.8,M,40 .2,M,,*5C
$GPRMC,131343.0 0,A,4538.6270,N ,01021.4789,E,2 .87,0.0,021105, 1.3,E,A*0F
I must capture ONE line EVERY 10 LINES but only a block of 200 lines
with the first columns begin with $GPGGA.
I must to extrapolate the [column3] and the [column5]
I must write new file with the rows like these:
Point([column5],[column3]),
Point([column5],[column3]),
Point([column5],[column3]),
and so on
<?
$file=file('fil e.txt');
[FUNCTION]
$fp = fopen("newfile. txt", "a");
[WRITE THE CORRECT ROWS]
fclose($fp);
?>
can you help me ?
Comment