@@ -1,44 +1,44 | |||
|
1 | 1 | /* |
|
2 | 2 | * gpgga_parse.cpp |
|
3 | 3 | * |
|
4 | 4 | * Created on: Oct 29, 2014 |
|
5 | 5 | * Author: Alan Aguilar Sologuren |
|
6 | 6 | */ |
|
7 | 7 | |
|
8 | #include "nmea_defs.h" | |
|
9 |
#include < |
|
|
10 |
#include < |
|
|
8 | #include "../nmea_defs.h" | |
|
9 | #include <string.h> | |
|
10 | #include <stdlib.h> | |
|
11 | 11 | |
|
12 | 12 | int gpgga_parse(nmea_code* gga, gnss_info* info){ |
|
13 | 13 | gnss_time utc; |
|
14 | 14 | gnss_satinfo sati; |
|
15 | 15 | memset((void*)&sati,0,sizeof(gnss_satinfo)); |
|
16 | 16 | char *str = gga->get_parameter(1); |
|
17 | 17 | char h[3]{'\0'}; strncpy(h,str,2); |
|
18 | 18 | char m[3]{'\0'}; strncpy(m,str+2,2); |
|
19 | 19 | char s[3]{'\0'}; strncpy(s,str+4,2); |
|
20 | 20 | char hs[4]{'\0'};strncpy(hs,str+7,3); |
|
21 | 21 | char dir; |
|
22 | 22 | gnss_pos coords; |
|
23 | 23 | |
|
24 | 24 | utc.hour = atoi(h); |
|
25 | 25 | utc.min = atoi(m); |
|
26 | 26 | utc.sec = atoi(s); |
|
27 | 27 | utc.hsec = atoi(hs); |
|
28 | 28 | |
|
29 | 29 | info->set_utc(&utc,NMEA_TIME); |
|
30 | 30 | |
|
31 | 31 | dir = gga->get_parameter(3)[0]; |
|
32 | 32 | str = gga->get_parameter(2); coords.lat = (dir == 'N')?atof(str):-1*atof(str); |
|
33 | 33 | dir = gga->get_parameter(5)[0]; |
|
34 | 34 | str = gga->get_parameter(4); coords.lon = (dir == 'E')?atof(str):-1*atof(str); |
|
35 | 35 | info->set_pos(&coords); |
|
36 | 36 | |
|
37 | 37 | str = gga->get_parameter(6); info->set_sig(atoi(str)); |
|
38 | 38 | str = gga->get_parameter(7); sati.inview = atoi(str); |
|
39 | 39 | str = gga->get_parameter(8); info->set_hdop(atof(str)); |
|
40 | 40 | str = gga->get_parameter(9); info->set_elv(atof(str)); |
|
41 | 41 | |
|
42 | 42 | info->set_smask(GPGGA); |
|
43 | 43 | return 1; |
|
44 | 44 | } |
@@ -1,12 +1,12 | |||
|
1 | 1 | /* |
|
2 | 2 | * gpgsa_parse.cpp |
|
3 | 3 | * |
|
4 | 4 | * Created on: Oct 29, 2014 |
|
5 | 5 | * Author: Alan Aguilar Sologuren |
|
6 | 6 | */ |
|
7 | 7 | |
|
8 | #include "nmea_defs.h" | |
|
8 | #include "../nmea_defs.h" | |
|
9 | 9 | |
|
10 | 10 | int gpgsa_parse(nmea_code*, gnss_info*){ |
|
11 | 11 | return 0; |
|
12 | 12 | } |
@@ -1,12 +1,12 | |||
|
1 | 1 | /* |
|
2 | 2 | * gpgsv_parse.cpp |
|
3 | 3 | * |
|
4 | 4 | * Created on: Oct 29, 2014 |
|
5 | 5 | * Author: Alan Aguilar Sologuren |
|
6 | 6 | */ |
|
7 | 7 | |
|
8 | #include "nmea_defs.h" | |
|
8 | #include "../nmea_defs.h" | |
|
9 | 9 | |
|
10 | 10 | int gpgsv_parse(nmea_code*, gnss_info*){ |
|
11 | 11 | return 0; |
|
12 | 12 | } |
@@ -1,12 +1,12 | |||
|
1 | 1 | /* |
|
2 | 2 | * gprmc_parse.cpp |
|
3 | 3 | * |
|
4 | 4 | * Created on: Oct 29, 2014 |
|
5 | 5 | * Author: Alan Aguilar Sologuren |
|
6 | 6 | */ |
|
7 | 7 | |
|
8 | #include "nmea_defs.h" | |
|
8 | #include "../nmea_defs.h" | |
|
9 | 9 | |
|
10 | 10 | int gprmc_parse(nmea_code*, gnss_info*){ |
|
11 | 11 | return 0; |
|
12 | 12 | } |
@@ -1,12 +1,12 | |||
|
1 | 1 | /* |
|
2 | 2 | * gpvtg_parse.cpp |
|
3 | 3 | * |
|
4 | 4 | * Created on: Oct 29, 2014 |
|
5 | 5 | * Author: Alan Aguilar Sologuren |
|
6 | 6 | */ |
|
7 | 7 | |
|
8 | #include "nmea_defs.h" | |
|
8 | #include "../nmea_defs.h" | |
|
9 | 9 | |
|
10 | 10 | int gpvtg_parse(nmea_code*, gnss_info*){ |
|
11 | 11 | return 0; |
|
12 | 12 | } |
@@ -1,12 +1,12 | |||
|
1 | 1 | /* |
|
2 | 2 | * pgrmb_parse.cpp |
|
3 | 3 | * |
|
4 | 4 | * Created on: Oct 29, 2014 |
|
5 | 5 | * Author: Alan Aguilar Sologuren |
|
6 | 6 | */ |
|
7 | 7 | |
|
8 | #include "nmea_defs.h" | |
|
8 | #include "../nmea_defs.h" | |
|
9 | 9 | |
|
10 | 10 | int pgrmb_parse(nmea_code*, gnss_info*){ |
|
11 | 11 | return 0; |
|
12 | 12 | } |
@@ -1,12 +1,12 | |||
|
1 | 1 | /* |
|
2 | 2 | * pgrme_parse.cpp |
|
3 | 3 | * |
|
4 | 4 | * Created on: Oct 29, 2014 |
|
5 | 5 | * Author: Alan Aguilar Sologuren |
|
6 | 6 | */ |
|
7 | 7 | |
|
8 | #include "nmea_defs.h" | |
|
8 | #include "../nmea_defs.h" | |
|
9 | 9 | |
|
10 | 10 | int pgrme_parse(nmea_code*, gnss_info*){ |
|
11 | 11 | return 0; |
|
12 | 12 | } |
@@ -1,12 +1,12 | |||
|
1 | 1 | /* |
|
2 | 2 | * pgrmf_parse.cpp |
|
3 | 3 | * |
|
4 | 4 | * Created on: Oct 29, 2014 |
|
5 | 5 | * Author: Alan Aguilar Sologuren |
|
6 | 6 | */ |
|
7 | 7 | |
|
8 | #include "nmea_defs.h" | |
|
8 | #include "../nmea_defs.h" | |
|
9 | 9 | |
|
10 | 10 | int pgrmf_parse(nmea_code*, gnss_info*){ |
|
11 | 11 | return 0; |
|
12 | 12 | } |
@@ -1,12 +1,12 | |||
|
1 | 1 | /* |
|
2 | 2 | * pgrmm_parse.cpp |
|
3 | 3 | * |
|
4 | 4 | * Created on: Oct 29, 2014 |
|
5 | 5 | * Author: Alan Aguilar Sologuren |
|
6 | 6 | */ |
|
7 | 7 | |
|
8 | #include "nmea_defs.h" | |
|
8 | #include "../nmea_defs.h" | |
|
9 | 9 | |
|
10 | 10 | int pgrmm_parse(nmea_code*, gnss_info*){ |
|
11 | 11 | return 0; |
|
12 | 12 | } |
@@ -1,12 +1,12 | |||
|
1 | 1 | /* |
|
2 | 2 | * pgrmt_parse.cpp |
|
3 | 3 | * |
|
4 | 4 | * Created on: Oct 29, 2014 |
|
5 | 5 | * Author: Alan Aguilar Sologuren |
|
6 | 6 | */ |
|
7 | 7 | |
|
8 | #include "nmea_defs.h" | |
|
8 | #include "../nmea_defs.h" | |
|
9 | 9 | |
|
10 | 10 | int pgrmt_parse(nmea_code*, gnss_info*){ |
|
11 | 11 | return 0; |
|
12 | 12 | } |
@@ -1,12 +1,12 | |||
|
1 | 1 | /* |
|
2 | 2 | * pgrmv_parse.cpp |
|
3 | 3 | * |
|
4 | 4 | * Created on: Oct 29, 2014 |
|
5 | 5 | * Author: Alan Aguilar Sologuren |
|
6 | 6 | */ |
|
7 | 7 | |
|
8 | #include "nmea_defs.h" | |
|
8 | #include "../nmea_defs.h" | |
|
9 | 9 | |
|
10 | 10 | int pgrmv_parse(nmea_code*, gnss_info*){ |
|
11 | 11 | return 0; |
|
12 | 12 | } |
|
1 | NO CONTENT: file was removed |
|
1 | NO CONTENT: file was removed |
|
1 | NO CONTENT: file was removed |
|
1 | NO CONTENT: file was removed |
|
1 | NO CONTENT: file was removed |
|
1 | NO CONTENT: file was removed |
|
1 | NO CONTENT: file was removed |
|
1 | NO CONTENT: file was removed |
|
1 | NO CONTENT: file was removed |
General Comments 0
You need to be logged in to leave comments.
Login now