Rev 1 |
Blame |
Compare with Previous |
Last modification |
View Log
| Download
| RSS feed
/*
* nmea.h
*
* Created on: 6 Sep 2020
* Author: mike
*/
#ifndef INC_NMEA_H_
#define INC_NMEA_H_
#include <ctype.h>
#include <time.h>
#include "libSerial/serial.h"
#if !defined (__cplusplus)
#if !defined true
#define true 1
#define false !(true)
#endif
typedef unsigned char bool;
#endif
#ifdef __cplusplus
extern "C" {
#endif
typedef struct
{
char valid;
char time[6];
char date[8];
bool good;
char ew;
char ns;
float lat;
float lon;
float heading;
float speed;
struct tm tv;
time_t utc;
} Location;
// returns true when it gets an RMC based position
typedef uint8_t (*nmeaCallback)(uint8_t* buffer, uint16_t cnt);
extern bool
updateLocation (Location *loc , usart_ctl * uc);
// set a callback
extern void setRmcCallback(nmeaCallback callback);
#ifdef __cplusplus
}
#endif
#endif /* INC_NMEA_H_ */