SIM908 GPS: how to extract the Longitude,Latitude

Status
Not open for further replies.

embRTS

Full Member level 4
Joined
Sep 8, 2013
Messages
201
Helped
36
Reputation
72
Reaction score
33
Trophy points
28
Location
Bangalore
Activity points
1,191
Hello I am getting a string which i am storing it in a buffer
like after an AT Command

AT+CGPSINF=32
after This SIM908 GPS will give response

&
the format of the string is as follows:-
<mode>,<longitude>,<latitude>,<altitude>,<UTC>,<time>,<num>,<speed>,<course>.

like for example,I will show the format in Numeric which i am getting from an array "buffer[64]" is shown below:-
"32,000000.000,V,0.000000,N,0.000000,E,0.00,0.00,000000,,"

where,32=mode,longitude=000000.000

I want to extract the longitude value , Latitude Value , Speed and Time

Please help me out

Thanks in Advance
 

first store the complete string in a buffer ( you have done already using buffer[64])..after that stop the receiver and now detect the first three commas (,,,) you will get the longitude ,,similarly after next two commas you will get the latitude and do same to extract the date and time and don't forget to start the receiver.
 

Status
Not open for further replies.

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…