HAL Library 35- GPS parser for STM32Fxxx

GPS library is a generic NMEA GPS parser for STM32Fxxx devices.

Library

Read more about HAL libraries

Features

  • Parse GPS data
  • Supported NMEA 0183 standard
  • Works with GPGGA, GPRMC, GPGSA, GPGSV NMEA statements
  • Calculate distance between 2 coordinates
  • Calculate bearing between 2 coordinates
  • Allows you to select custom NMEA statements

Dependencies

  • HAL
  • TM
    • STM32Fxxx HAL
    • defines.h configuration file
    • TM GPIO
    • TM USART

Pinout, functions and enumerations

List of pinout, functions and its enumerations can be found on GPS library API

Example

FILTER example with FIR and IIR is available on my Github account.

Icon
TM STM32 Libraries

STM32 libraries based on STM32Fxxx HAL drivers.

tilz0R

Owner of this site. Also electronic enthusiasts, web developer, 3D printer fan, handball player and more. Big fan of STM32F4 devices. In anticipation of the new Discovery board for STM32F7 lines.

You may also like...

Read before commenting!

Before you make a new comment, make sure you agree with things listed below:

  • - Read post to make sure if it is already posted what you are asking for,
  • - Make sure you have the latest version of libraries used in your project,
  • - Make a clean and grammatically correct written message,
  • - Report as many details as possible, including what have you done so far,
  • - Do NOT post any code here. Use Pastebin,
  • - Do NOT post any error codes here. Use Pastebin,
  • - Specify STM32Fxxx family and used Discovery/EVAL/Nucleo or custom made board,
  • - Make sure your clock is set correct for PLL,
  • - If you are using my HAL drivers, please check this post how to start.
Comment will be deleted on breaking these rules without notification!
  • Pingback: All STM32 HAL libraries - STM32F4 Discovery()

  • Pingback: Library 27- Read GPS data on STM32F4 devices - STM32F4 Discovery()

  • Faisal Haque

    hi I am getting wrong value….. actual value is 23.818041,90.425323. but I am getting https://uploads.disquscdn.com/images/d458a8f76993d7b1e0f6fba9e202d1ff02c62afb6494b9267b56a0af0b163682.jpg

    • How you know it is wrong. Where you receive your coordinates? My gps libs parses what gps receiver sends. If I wrongly parse incoming data is lib problem, otherwise it is your.

      • Faisal Haque

        using arduino library I am getting the correct coordinates. But using your’s library I’m getting the wrong coordinates. please help he to solve the problem.

        • Send me plain gps output. Send me all possible gps outpit statements you receive. Will test that.

          • Faisal Haque

            please give me your email id. I’ll send everything including GPS output.

          • Faisal Haque

            Here is the GPS output from module…..
            $GPGGA,173753.000,2349.08043,N,09025.50919,E,1,07,1.2,6.7,M,,M,,0000*4A
            $GPRMC,173753.000,A,2349.08043,N,09025.50919,E,0.00,0.00,170217,,,A*61
            $GPVTG,0.00,T,,M,0.00,N,0.00,K,A*3D
            $GPGGA,173754.000,2349.08045,N,09025.50919,E,1,07,1.2,6.7,M,,M,,0000*4B
            $GPRMC,173754.000,A,2349.08045,N,09025.50919,E,0.00,0.00,170217,,,A*60
            $GPVTG,0.00,T,,M,0.00,N,0.00,K,A*3D
            $GPGGA,173755.000,2349.08046,N,09025.50918,E,1,07,1.2,6.7,M,,M,,0000*48
            $GPRMC,173755.000,A,2349.08046,N,09025.50918,E,0.00,0.00,170217,,,A*63
            $GPVTG,0.00,T,,M,0.00,N,0.00,K,A*3D
            $GPGGA,173756.000,2349.08048,N,09025.50917,E,1,07,1.2,6.8,M,,M,,0000*45
            $GPGSA,A,3,12,02,24,06,28,19,17,,,,,,2.3,1.2,1.9*3D
            $GPGSV,3,1,10,12,13,322,40,02,49,254,34,24,22,287,38,06,71,338,30*7C
            $GPGSV,3,2,10,30,01,165,,28,38,130,20,19,47,016,28,17,41,042,20*79
            $GPGSV,3,3,10,05,09,193,,03,05,039,*73
            $GPRMC,173756.000,A,2349.08048,N,09025.50917,E,0.00,0.00,170217,,,A*61
            $GPVTG,0.00,T,,M,0.00,N,0.00,K,A*3D
            $GPGGA,173757.000,2349.08049,N,09025.50915,E,1,07,1.2,6.9,M,,M,,0000*46
            $GPRMC,173757.000,A,2349.08049,N,09025.50915,E,0.00,0.00,170217,,,A*63
            $GPVTG,0.00,T,,M,0.00,N,0.00,K,A*3D
            $GPGGA,173758.000,2349.08050,N,09025.50912,E,1,07,1.2,6.9,M,,M,,0000*46
            $GPRMC,173758.000,A,2349.08050,N,09025.50912,E,0.00,0.00,170217,,,A*63
            $GPVTG,0.00,T,,M,0.00,N,0.00,K,A*3D
            $GPGGA,173759.000,2349.08052,N,09025.50911,E,1,07,1.2,7.0,M,,M,,0000*4E
            $GPRMC,173759.000,A,2349.08052,N,09025.50911,E,0.00,0.00,170217,,,A*63
            $GPVTG,0.00,T,,M,0.00,N,0.00,K,A*3D
            $GPGGA,173800.000,2349.08053,N,09025.50909,E,1,07,1.2,7.0,M,,M,,0000*45
            $GPRMC,173800.000,A,2349.08053,N,09025.50909,E,0.00,0.00,170217,,,A*68
            $GPVTG,0.00,T,,M,0.00,N,0.00,K,A*3D
            $GPGGA,173801.000,2349.08053,N,09025.50905,E,1,07,1.2,7.1,M,,M,,0000*49
            $GPGSA,A,3,12,02,24,06,28,19,17,,,,,,2.3,1.2,1.9*3D
            $GPGSV,3,1,10,12,13,322,41,02,49,254,36,24,22,287,37,06,71,338,30*70
            $GPGSV,3,2,10,30,01,165,,28,38,130,21,19,47,016,28,17,41,042,23*7B