File tree Expand file tree Collapse file tree 2 files changed +7
-1
lines changed
Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -93,11 +93,13 @@ namespace AIS
9393 if (crc_check)
9494 return ;
9595
96- tag. error = MESSAGE_ERROR_NMEA_CHECKSUM;
96+ aivdm. message_error | = MESSAGE_ERROR_NMEA_CHECKSUM;
9797 }
9898
9999 if (aivdm.count == 1 )
100100 {
101+ tag.error = aivdm.message_error ;
102+
101103 msg.clear ();
102104 msg.Stamp (stamp ? 0 : t);
103105 msg.setOrigin (aivdm.channel , thisstation == -1 ? station : thisstation, own_mmsi);
@@ -151,6 +153,8 @@ namespace AIS
151153 (aivdm.groupId == 0 && it->channel == aivdm.channel && it->talkerID == aivdm.talkerID );
152154 if (match && it->count == aivdm.count && it->ID == aivdm.ID )
153155 {
156+ tag.error |= it->message_error ;
157+
154158 addline (*it);
155159 if (!regenerate)
156160 msg.NMEA .push_back (it->sentence );
Original file line number Diff line number Diff line change @@ -60,6 +60,7 @@ namespace AIS
6060 data.clear ();
6161 timestamp = time (nullptr );
6262 groupId = 0 ;
63+ message_error = 0 ;
6364 }
6465 char channel;
6566 int count;
@@ -68,6 +69,7 @@ namespace AIS
6869 int checksum;
6970 int fillbits;
7071 int talkerID;
72+ uint32_t message_error;
7173 } aivdm;
7274
7375 std::vector<std::string> parts;
You can’t perform that action at this time.
0 commit comments