TM STM32F4xx Libraries  v1.0.0
Libraries for STM32F4xx devices from Tilen Majerle

GPS NMEA standard data parser for STM32F4xx devices - http://stm32f4-discovery.com/2014/08/library-27-gps-stm32f4-devices/. More...

Modules

 TM_GPS_Macros
 Library private defines without any sense for USER.
 
 TM_GPS_Typedefs
 Library Typedefs.
 
 TM_GPS_Functions
 Library Functions.
 

Detailed Description

GPS NMEA standard data parser for STM32F4xx devices - http://stm32f4-discovery.com/2014/08/library-27-gps-stm32f4-devices/.

This library parses response from GPS module, in NMEA statements format.

For more, how GPS returns data, look at link below:

http://aprs.gids.nl/nmea/

There is a lot of possible sentences, which can be returned from GPS. This library uses only 4. But some GPS don't returns all of this 4 sentences, so I made a possibility to disable them.

By default, these statements are in use and supported:

By default, each of this data has to be detected in order to get "VALID" data. If your GPS does not return any of this statement, you can disable option. If you disable any of statements, then you will loose data, corresponding to statement.

Add lines below in your defines.h file and uncomment your settings

//Disable GPGGA statement
#define GPS_DISABLE_GPGGA
//Disable GPRMC statement
#define GPS_DISABLE_GPRMC 
//Disable GPGSA statement
#define GPS_DISABLE_GPGSA
//Disable GPGSV statement
#define GPS_DISABLE_GPGSV
Pinout

To communicate with GPS, USART is commonly used. By default, my library uses USART1, but if you want your own USARTx, add lines below in your defines.h file:

#define GPS_USART               USART1
#define GPS_USART_PINSPACK      TM_USART_PinsPack_2

With default pinout:

STM32F4xx TX = PB6
STM32F4xx RX = PB7

Note
Connect GPS's TX to STM32F4xx's RX and vice versa
Increase USART internal buffer

GPS library is based on USART library, which uses internal buffers to store data which are received but not read.

GPS receiver will send a lot of data at a time and if you are doing other stuff that time, it might happen that you will not so quickly update GPS data and buffer will overflow. Default buffer size is for my USART lib 32 bytes.

I recommend that you increase that memory. For further instructions how to do that, look at TM_USART module.

Changelog
 Version 1.3.1 
  - May 27, 2015
  - Fixed bug with getting hard-fault some times because flags were not cleared correct
  
 Version 1.3
  - April 12, 2015
  - Added support for custom statements defined by user 
  
 Version 1.2
  - April 11, 2015
  - Added support for description to all satellites in view
  
 Version 1.1
  - August 22, 2014
  - Added support for calculating distance between 2 coordinates and bearing in degrees

 Version 1.0
  - First release
Dependencies
 - STM32F4xx
 - STM32F4xx RCC
 - defines.h
 - TM USART
 - defines.h
 - math.h