cancel
Showing results for 
Search instead for 
Did you mean: 

how can i separate the lat long and altitude from gps in code ?

mCV
Associate II

i got out put data from the gps and now i have to separate the lat long and altitude values from the raw data so please someone can help me with the code

9 REPLIES 9
turboscrew
Senior III

Where do you get the raw data? That is, which format is it?

If you want to parse standard NMEA strings coming from a GPS module then you can use this library written by our fellow @Tilen MAJERLE​ - https://github.com/MaJerle/GPS_NMEA_parser

Or use any other NMEA parser library which suits your needs, there are many of them.

mCV
Associate II

I am getting the data as per the NMEA format and now my task is to get the only lat long and altitude and UTC time from that for that i need a code please share it.

i am getting the data in NMEA format and i am receiving the data from gps and now i have to separate that data and by writing the code , i have to separate the lat long and altitude

Isn't this a simple parsing task​? I've posted multiple examples here over the years.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
turboscrew
Senior III

And I wouldn't consider NMEA as "raw".

i am getting the output as per the NMEA protocol but i have to display only lat long and altitude values , and for this i have to write a code ...i need to search $GPGGA or $GPRMC in that whole string i have to vomit all other data except lat, long, UTC time and altitude.

mCV
Associate II
i am getting the output as per the NMEA protocol but i have to display only lat long and altitude values , and for this i have to write a code ...i need to search $GPGGA or $GPRMC in that whole string i have to vomit all other data except lat, long, UTC time and altitude.