WNMEA  1.0.0
Warcomeb NMEA 0183 Parsing Library based on libohiboard
WNMEA - Warcomeb NMEA 0183 Parsing Library

This library is developed in order to parse NMEA0183 string produced by GPS sensor and it use libohiboard as low level driver framework. This library is an evolutions of https://github.com/warcomeb/gpsnmea-embedded.

ChangeLog

  • v1.0.0 of 2022/03/04 - First release

External Library

The library use the following external library:

Example

{
if (type == WNMEA_MESSAGETYPE_RMC)
{
Uart_sendStringln(OB_UART2,"RMC");
}
else if (type == WNMEA_MESSAGETYPE_GGA)
{
Uart_sendStringln(OB_UART2,"GGA");
}
}
void main (void)
{
Clock_Config clkConfig =
{
.source = CLOCK_INTERNAL_HSI | CLOCK_EXTERNAL_LSE_CRYSTAL,
.sysSource = CLOCK_SYSTEMSOURCE_HSI,
.hsiState = CLOCK_OSCILLATORSTATE_ON,
.lsiState = CLOCK_OSCILLATORSTATE_OFF,
.lseState = CLOCK_OSCILLATORSTATE_ON,
.output = CLOCK_OUTPUT_SYSCLK | CLOCK_OUTPUT_HCLK | CLOCK_OUTPUT_PCLK1 | CLOCK_OUTPUT_PCLK2,
.ahbDivider = CLOCK_AHBDIVIDER_1,
.apb1Divider = CLOCK_APBDIVIDER_1,
.apb2Divider = CLOCK_APBDIVIDER_1,
};
// Uart1 - GPS
Uart_Config uart1Config =
{
.clockSource = UART_CLOCKSOURCE_SYSCLK,
.mode = UART_MODE_BOTH,
.rxPin = UART_PINS_PA10,
.txPin = UART_PINS_PA9,
.baudrate = 9600,
.dataBits = UART_DATABITS_EIGHT,
.flowControl = UART_FLOWCONTROL_NONE,
.parity = UART_PARITY_NONE,
.stop = UART_STOPBITS_ONE,
};
// Uart2 - Output
Uart_Config uartOutConfig =
{
.clockSource = UART_CLOCKSOURCE_SYSCLK,
.mode = UART_MODE_BOTH,
.rxPin = UART_PINS_PA3,
.txPin = UART_PINS_PA2,
.baudrate = 115200,
.dataBits = UART_DATABITS_EIGHT,
.flowControl = UART_FLOWCONTROL_NONE,
.parity = UART_PARITY_NONE,
.stop = UART_STOPBITS_ONE,
};
// Initialize clock...
Clock_init(&clkConfig);
Uart_init(OB_UART1, &uart1Config);
Uart_init(OB_UART2, &uartOutConfig);
{
.rmc = cb,
.gga = cb,
};
WNMEA_init(OB_UART1,mycb);
while (1)
{
}
}

Credits

  • Marco Giammarini (warcomeb)

License

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
WNMEA_MessageType_t
enum _WNMEA_MessageType_t WNMEA_MessageType_t
WNMEA_ckeck
void WNMEA_ckeck(void)
Definition: wnmea.c:856
WNMEA_init
void WNMEA_init(Uart_DeviceHandle dev, WNMEA_MessageCallback_t cb)
Definition: wnmea.c:838
WNMEA_MESSAGETYPE_GGA
@ WNMEA_MESSAGETYPE_GGA
Definition: wnmea-types.h:119
_WNMEA_MessageCallback_t
Definition: wnmea-types.h:241
_WNMEA_MessageParsed_t
Definition: wnmea-types.h:218
_WNMEA_MessageCallback_t::rmc
WNMEA_pFunctionCallback rmc
Definition: wnmea-types.h:242
WNMEA_MESSAGETYPE_RMC
@ WNMEA_MESSAGETYPE_RMC
Definition: wnmea-types.h:118