27 #ifndef _COMM_DECODER_H
28 #define _COMM_DECODER_H
33 #include "rapidjson/fwd.h"
34 #include <wx/string.h>
36 #include "model/comm_appmsg.h"
37 #include "model/config_vars.h"
38 #include "model/nmea_ctx_factory.h"
41 #include "N2KParser.h"
63 bool DecodeRMC(std::string s,
NavData& temp_data);
64 bool DecodeHDM(std::string s,
NavData& temp_data);
65 bool DecodeHDT(std::string s,
NavData& temp_data);
66 bool DecodeHDG(std::string s,
NavData& temp_data);
67 bool DecodeVTG(std::string s,
NavData& temp_data);
68 bool DecodeGSV(std::string s,
NavData& temp_data);
69 bool DecodeGGA(std::string s,
NavData& temp_data);
70 bool DecodeGLL(std::string s,
NavData& temp_data);
72 bool ParsePosition(
const LATLONG&
Position,
double& lat,
double& lon);
77 bool DecodePGN129025(std::vector<unsigned char> v,
NavData& temp_data);
78 bool DecodePGN129026(std::vector<unsigned char> v,
NavData& temp_data);
79 bool DecodePGN129029(std::vector<unsigned char> v,
NavData& temp_data);
80 bool DecodePGN127250(std::vector<unsigned char> v,
NavData& temp_data);
81 bool DecodePGN129540(std::vector<unsigned char> v,
NavData& temp_data);
84 bool DecodeSignalK(std::string s,
NavData& temp_data);
85 void handleUpdate(
const rapidjson::Value &update,
NavData& temp_data);
86 void updateItem(
const rapidjson::Value &item, wxString &sfixtime,
NavData& temp_data);
87 bool updateNavigationPosition(
const rapidjson::Value &value,
88 const wxString &sfixtime,
NavData& temp_data);
89 void updateNavigationSpeedOverGround(
const rapidjson::Value &value,
90 const wxString &sfixtime,
NavData& temp_data);
91 void updateNavigationCourseOverGround(
const rapidjson::Value &value,
92 const wxString &sfixtime,
NavData& temp_data);
93 void updateGnssSatellites(
const rapidjson::Value &value,
const wxString &sfixtime,
NavData& temp_data);
94 void updateHeadingTrue(
const rapidjson::Value &value,
const wxString &sfixtime,
NavData& temp_data);
95 void updateHeadingMagnetic(
const rapidjson::Value &value,
96 const wxString &sfixtime,
NavData& temp_data);
97 void updateMagneticVariance(
const rapidjson::Value &value,
98 const wxString &sfixtime,
NavData& temp_data);
100 std::string src_string;
101 std::unordered_map<std::string, int> GNSS_quality_map;