I get a GPS from a data line as in the 1st example below, and I have to treat it by commas in the same way as the second example:
Example Data Originals
(027043011394BR00160422A2242.5954S04237.5592W000.40056470.000000000000L00000000)
Example how it has to be the output (VIRGLE SEPARATION)
027043011394,BR00,160422,A,2242.5954S,04237.5592W,000.4,0056,70.0000,00000000L,00000000
And now Assemble an array
[0] => 027043011394 - ID (identificação do dispositivo)
[1] => BR00 - comando
[2] => 160422 - em DATE (o formato yymmdd)
[3] => A -?
[4] => 2242.5954S - o Latitude
[5] => 04237.5592W - Longitude
[6] => 000.4 - Speed (nnn.n format)
[7] => 0056 - Time a (o formato hhmmssas a UTC)
[8] => 470.0 - Designação / rolamento (?)
[9] => 00000000L - a Elevation
[0] => 00000000 -
$ID = $parts[0];
echo $comando = $parts[1];
echo $date = $parts[2];
$A = $parts[3];
$lat = $parts[4];
$long = $parts[5];
$speed = $parts[6];
$time = $parts[7];
$eleleva = $parts[8];
$eleleva2 = $parts[9];