master
Paul Walko 2017-03-02 14:45:36 +00:00
parent 611d2d5634
commit 2ccbbea514
2 changed files with 34 additions and 1 deletions

View File

@ -1,6 +1,7 @@
#!/usr/bin/octave-cli #!/usr/bin/octave-cli
## Paul Walko ## Paul Walko
## bluetooth-undergrads ## Inputs an packet by an array of 1s and 0s
## Then finds all possible data in it
### Variables ### Variables

32
physicalLayer/packetFinder.m Executable file
View File

@ -0,0 +1,32 @@
#!/usr/bin/octave-cli
## Paul Walko
## Finds packets in a binary data file
## Includes
pkg load signal;
## Global vars
#############################################
global proto_vars = -1; # struct
global raw_data = -1; # array
#############################################
function loadFile(fileName, count)
global preamble_proto;
global raw_data;
source "createPrototype.m"
proto_vars = struct("preamble_proto", preamble_proto, "freq_sep", freq_sep, "samps_per_symb", samps_per_symb, "symb_span", symb_span, "gauss_taps", gauss_taps, "samp_rate", samp_rate, "symb_rate", symb_rate, "time_bw_prod", time_bw_prod);
raw_data = read_complex_binary(fileName, count);
endfunction
function main(fileName = "channel37_3.dat")
arg_list = argv();
if length(arg_list) > 0
fileName = arg_list{1};
endif
loadFile(fileName);
endfunction
main();