Skip to main content
mCV
Associate II
December 26, 2018
Question

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

  • December 26, 2018
  • 6 replies
  • 3202 views

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

    This topic has been closed for replies.

    6 replies

    turboscrew
    Senior III
    December 26, 2018

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

    mCV
    mCVAuthor
    Associate II
    December 26, 2018

    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

    After Forever
    Senior III
    December 26, 2018

    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
    mCVAuthor
    Associate II
    December 26, 2018

    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.

    Tesla DeLorean
    Guru
    December 26, 2018

    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 (See Profile) Up vote any posts that you find helpful, it shows what's working..
    Tesla DeLorean
    Guru
    December 26, 2018
    turboscrew
    Senior III
    December 26, 2018

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

    mCV
    mCVAuthor
    Associate II
    December 27, 2018

    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
    mCVAuthor
    Associate II
    December 27, 2018
    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.