Cosmetics
This commit is contained in:
parent
f8966f0d10
commit
00bcc041b2
@ -125,10 +125,10 @@ int air_modes_preamble::work(int noutput_items,
|
||||
bool early, late;
|
||||
do {
|
||||
early = late = false;
|
||||
gate_sum_early= bit_energy(&inraw[i+pulse_offsets[0]-1], d_samples_per_chip)
|
||||
+ bit_energy(&inraw[i+pulse_offsets[1]-1], d_samples_per_chip)
|
||||
+ bit_energy(&inraw[i+pulse_offsets[2]-1], d_samples_per_chip)
|
||||
+ bit_energy(&inraw[i+pulse_offsets[3]-1], d_samples_per_chip);
|
||||
//gate_sum_early= bit_energy(&inraw[i+pulse_offsets[0]-1], d_samples_per_chip)
|
||||
// + bit_energy(&inraw[i+pulse_offsets[1]-1], d_samples_per_chip)
|
||||
// + bit_energy(&inraw[i+pulse_offsets[2]-1], d_samples_per_chip)
|
||||
// + bit_energy(&inraw[i+pulse_offsets[3]-1], d_samples_per_chip);
|
||||
|
||||
gate_sum_now = bit_energy(&inraw[i+pulse_offsets[0]], d_samples_per_chip)
|
||||
+ bit_energy(&inraw[i+pulse_offsets[1]], d_samples_per_chip)
|
||||
@ -146,7 +146,7 @@ int air_modes_preamble::work(int noutput_items,
|
||||
//else if(early) i--;
|
||||
//if(early && late) early = late = false;
|
||||
} while(late);
|
||||
|
||||
|
||||
//finally after all this, let's post the preamble!
|
||||
add_item_tag(0, //stream ID
|
||||
nitems_written(0)+i, //sample
|
||||
|
@ -230,38 +230,25 @@ int air_modes_slicer::work(int noutput_items,
|
||||
rx_packet.parity = modes_check_parity(rx_packet.data, packet_length);
|
||||
|
||||
if(rx_packet.parity && rx_packet.type == Long_Packet) {
|
||||
// long before = rx_packet.parity;
|
||||
bruteResultTypeDef bruteResult = modes_ec_brute(rx_packet);
|
||||
|
||||
if(bruteResult == No_Solution) {
|
||||
//printf("No solution!\n");
|
||||
continue;
|
||||
} else if(bruteResult == Multiple_Solutions) {
|
||||
// printf("Multiple solutions!\n");
|
||||
continue;
|
||||
} else if(bruteResult == Too_Many_LCBs) {
|
||||
//printf("Too many LCBs (%i)!\n", rx_packet.numlowconf);
|
||||
continue;
|
||||
} else if(bruteResult == No_Error) {
|
||||
// printf("No error!\n");
|
||||
} else if(bruteResult == Solution_Found) {
|
||||
// printf("Solution found for %i LCBs!\n", rx_packet.numlowconf);
|
||||
}
|
||||
// rx_packet.parity = modes_check_parity(rx_packet.data, packet_length);
|
||||
// if(rx_packet.parity) printf("Error: packet fails parity check after correction, was %x, now %x\n", before, rx_packet.parity);
|
||||
}
|
||||
|
||||
// if(rx_packet.parity && rx_packet.type == Long_Packet) printf("Error! Bad packet forwarded to the queue.\n");
|
||||
//now we have a complete packet with confidence data, let's print it to the message queue
|
||||
//here, rather than send the entire packet, since we've already done parity checking and ECC in C++, we'll
|
||||
//send just the data (no confidence bits), separated into fields for easier parsing.
|
||||
//we'll replicate some data by sending the message type as the first field, followed by the first 8+24=32 bits of the packet, followed by
|
||||
//56 long packet data bits if applicable (zero-padded if not), followed by parity
|
||||
|
||||
d_payload.str("");
|
||||
|
||||
d_payload << std::dec << std::setw(2) << std::setfill('0') << rx_packet.message_type << std::hex << " ";
|
||||
|
||||
for(int m = 0; m < 4; m++) {
|
||||
d_payload << std::setw(2) << std::setfill('0') << unsigned(rx_packet.data[m]);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user