first commit
This commit is contained in:
18
cm_nmea_decoder.c
Normal file
18
cm_nmea_decoder.c
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
/*
|
||||||
|
* cm_nmea_decoder.c
|
||||||
|
*
|
||||||
|
* Created on: 26 Jun 2025
|
||||||
|
* Author: Christian Lind Vie Madsen
|
||||||
|
*/
|
||||||
|
|
||||||
|
int cm_nmea_characterDecode(char in){
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
int cm_nmea_stringDecode(char *str){
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
45
cm_nmea_decoder.h
Normal file
45
cm_nmea_decoder.h
Normal file
@@ -0,0 +1,45 @@
|
|||||||
|
/*
|
||||||
|
* cm_nmea_decoder.h
|
||||||
|
*
|
||||||
|
* Created on: 26 Jun 2025
|
||||||
|
* Author: Christian Lind Vie Madsen
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef MAIN_CM_NMEA_DECODER_CM_NMEA_DECODER_H_
|
||||||
|
#define MAIN_CM_NMEA_DECODER_CM_NMEA_DECODER_H_
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <stdint.h>
|
||||||
|
|
||||||
|
|
||||||
|
typedef struct{
|
||||||
|
uint8_t deg; // Degrees: 0–90 (latitude) or 0–180 (longitude)
|
||||||
|
uint32_t min_x10000; // Minutes × 10,000 (e.g., 16.4512 → 164512)
|
||||||
|
char dir; // 'N', 'S', 'E', or 'W'
|
||||||
|
}cm_nmea_coord;
|
||||||
|
|
||||||
|
typedef struct{
|
||||||
|
uint8_t hr;
|
||||||
|
uint8_t min;
|
||||||
|
uint8_t sec;
|
||||||
|
}cm_nmea_time;
|
||||||
|
|
||||||
|
typedef struct {
|
||||||
|
|
||||||
|
cm_nmea_coord coordinates;
|
||||||
|
cm_nmea_time time_utc;
|
||||||
|
char data_valid;
|
||||||
|
|
||||||
|
}cm_nmea_gpgll_msg;
|
||||||
|
|
||||||
|
typedef struct {
|
||||||
|
|
||||||
|
union{
|
||||||
|
|
||||||
|
cm_nmea_gpgll_msg gpgll_msg;
|
||||||
|
};
|
||||||
|
|
||||||
|
}cm_nmea_msg;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#endif /* MAIN_CM_NMEA_DECODER_CM_NMEA_DECODER_H_ */
|
||||||
Reference in New Issue
Block a user