Skip to content

Commit 9051783

Browse files
committed
add gps add GNRMC data
1 parent 145ec35 commit 9051783

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed
246 KB
Binary file not shown.

infinite_sense_core/include/data.h

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -33,14 +33,13 @@ inline void ProcessIMUData(const nlohmann::json &data) {
3333
};
3434

3535
inline void ProcessGPSData(const nlohmann::json &data) {
36-
if (data["f"] != "GNGGA") {
37-
return;
36+
if (data["f"] == "GNGGA"||data["f"] == "GNRMC") {
37+
GPSData gps{};
38+
gps.data = data["d"];
39+
gps.trigger_time_us = data["pps"];
40+
gps.time_stamp_us = data["t"];
41+
Messenger::GetInstance().PubStruct("gps", &gps, sizeof(gps));
3842
}
39-
GPSData gps{};
40-
gps.data = data["d"];
41-
gps.trigger_time_us = data["pps"];
42-
gps.time_stamp_us = data["t"];
43-
Messenger::GetInstance().PubStruct("gps", &gps, sizeof(gps));
4443
};
4544

4645
inline void ProcessLOGData(const nlohmann::json &data) {

0 commit comments

Comments
 (0)