Improve AX.25 filtering to reduce false positives
The CRC16 of the AX.25 seems that is too weak for the new decoding approach and we get many false positives. Now the AX.25 decoder, makes waits for at least two occurances of the AX.25 SYNC flag.
This commit is contained in:
parent
157e1c163b
commit
d48e066a66
|
@ -31,7 +31,7 @@ namespace gr {
|
|||
|
||||
namespace satnogs {
|
||||
const size_t AX25_MIN_ADDR_LEN = 14;
|
||||
const size_t AX25_MAX_ADDR_LEN = 28;
|
||||
const size_t AX25_MAX_ADDR_LEN = (2 * 7 + 8 * 7);
|
||||
const size_t AX25_MIN_CTRL_LEN = 1;
|
||||
const size_t AX25_MAX_CTRL_LEN = 2;
|
||||
const size_t AX25_MAX_FRAME_LEN = 256;
|
||||
|
|
|
@ -120,13 +120,8 @@ ax25_decoder::_decode(decoder_status_t &status)
|
|||
* AX.25 flag. We believe that such transmissions are yet rare.
|
||||
*/
|
||||
bool have_sync = false;
|
||||
if (d_descramble) {
|
||||
have_sync = (d_shift_reg >> 8) == AX25_SYNC_FLAG;
|
||||
}
|
||||
else {
|
||||
have_sync = ((d_shift_reg & 0xFF) == AX25_SYNC_FLAG)
|
||||
&& (d_shift_reg >> 8) == AX25_SYNC_FLAG;
|
||||
}
|
||||
have_sync = ((d_shift_reg & 0xFF) == AX25_SYNC_FLAG)
|
||||
&& (d_shift_reg >> 8) == AX25_SYNC_FLAG;
|
||||
if (have_sync) {
|
||||
d_bitstream.erase(d_bitstream.begin(),
|
||||
d_bitstream.begin() + i + 1);
|
||||
|
|
Loading…
Reference in New Issue