str = str(1:ptx_crc-2);
- if crc_ok
- str = sprintf("%s CRC OK", str);
- else
- str = sprintf("%s CRC BAD", str);
- end
endfunction
if crc_ok || crc_flipped_ok
states.prev_pkt = rx_bits_log(uw_loc+length(states.rtty.uw):uw_loc+states.rtty.max_packet_len);
end
+ if crc_ok
+ str = sprintf("%s CRC OK", str);
+ else
+ str = sprintf("%s CRC BAD", str);
+ end
printf("%s\n", str);
end
end
end
- printf("\n %s \n", str);
+ if crc_ok
+ strok = sprintf("%s CRC OK", str);
+ else
+ strok = sprintf("%s CRC BAD", str);
+ end
+ printf("\n %s \n", strok);
% throw out used bits in buffer. We're not sure where the next packet starts
% so lets remove everything up to just after the UW we just used to force
h.Latitude, h.Longitude, h.Altitude, h.Speed, h.Sats, h.Temp,
h.BattVoltage, h.Checksum);
+ /* Hex ASCII file output */
+
+ #define WRITE_HEX_FILE /* overwrite tx[] above, that's OK */
+ #ifdef WRITE_HEX_FILE
+ FILE *fh = fopen("../octave/horus_rx_bits_hex.txt","wt");
+ assert(fh != NULL);
+ for(i=0; i<nbytes; i++) {
+ fprintf(fh, "%02X", (unsigned int)output_payload[i]);
+ }
+ fclose(fh);
+ #endif
+
return 0;
}
#endif