|
Posted by cuba1 on 11/03/05 12:00
I have a file with thousands of these lines:
$GPRMC,131334.00,A,4538.6259,N,01021.4755,E,0.43,0.0,021105,1.3,E,A*0D
$GPGGA,131334.00,4438.6259,N,01021.4755,E,1,00,7.8,29.8,M,40.2,M,,*5C
$GPRMC,131343.00,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('file.txt');
[FUNCTION]
$fp = fopen("newfile.txt", "a");
[WRITE THE CORRECT ROWS]
fclose($fp);
?>
can you help me ?
Navigation:
[Reply to this message]
|