mirror of
https://github.com/eried/portapack-mayhem.git
synced 2025-01-11 23:39:29 -05:00
Consolidate AIS Packet types.
This commit is contained in:
parent
3e0acc9988
commit
644d3837ff
@ -27,8 +27,6 @@
|
||||
|
||||
namespace ais {
|
||||
|
||||
using CRCFieldReader = ::FieldReader<baseband::Packet, BitRemapNone>;
|
||||
|
||||
struct PacketLengthRange {
|
||||
constexpr PacketLengthRange(
|
||||
) : min_bytes { 0 },
|
||||
@ -190,7 +188,7 @@ Longitude Packet::longitude(const size_t start_bit) const {
|
||||
}
|
||||
|
||||
bool Packet::crc_ok() const {
|
||||
CRCFieldReader field_crc { packet_ };
|
||||
CRCReader field_crc { packet_ };
|
||||
CRC<uint16_t> ais_fcs { 0x1021, 0xffff, 0xffff };
|
||||
|
||||
for(size_t i=0; i<data_length(); i+=8) {
|
||||
|
@ -82,6 +82,7 @@ public:
|
||||
|
||||
private:
|
||||
using Reader = FieldReader<baseband::Packet, BitRemapByteReverse>;
|
||||
using CRCReader = FieldReader<baseband::Packet, BitRemapNone>;
|
||||
|
||||
const baseband::Packet packet_;
|
||||
const rtc::RTC received_at_;
|
||||
|
Loading…
Reference in New Issue
Block a user