完成仿真器实现,可以脱离USRP运行

上级 b6707208
......@@ -19,6 +19,7 @@ bld/
[Oo]bj/
.kde*
kde*.*
*.kdev*
*.del*
build*/
# Roslyn cache directories
......
......@@ -11,8 +11,8 @@
"instance": {
"additional_args": "IND=1;OUTD=-1;nice=2;",
"batchtime": 20,
"exec": "../modules/pcap_hub/pcapHub.exe",
"instance_value": 2
"exec": "../../../build-pcaphub-dskqt6-Release/pcapHub",
"instance_value": 1
},
"name": {
"name": "pcap_hub"
......@@ -57,8 +57,8 @@
"instance": {
"additional_args": "nice=2;",
"batchtime": 20,
"exec": "../modules/transform_fft.exe",
"instance_value": 4
"exec": "modules/transform_fft",
"instance_value": 2
},
"name": {
"name": "libfftw"
......@@ -160,8 +160,8 @@
"instance": {
"additional_args": "nice=2;",
"batchtime": 20,
"exec": "../modules/sink_plots.exe",
"instance_value": 5
"exec": "modules/sink_plots",
"instance_value": 3
},
"name": {
"name": "plots"
......@@ -208,8 +208,8 @@
"instance": {
"additional_args": "IND=4,3;OUTD=1;nice=0;",
"batchtime": 20,
"exec": "../course/a2psk/a2psk_encap.exe",
"instance_value": 6
"exec": "../../../build-taskbus_course-dskqt5-Release/modules/a2psk_encap",
"instance_value": 4
},
"name": {
"name": "a2psk_encap"
......@@ -249,8 +249,8 @@
"instance": {
"additional_args": "nice=0;",
"batchtime": 20,
"exec": "../course/a2psk/a2psk_mod.exe",
"instance_value": 7
"exec": "../../../build-taskbus_course-dskqt5-Release/modules/a2psk_mod",
"instance_value": 5
},
"name": {
"name": "a2psk_mod"
......@@ -290,8 +290,8 @@
"instance": {
"additional_args": "nice=0;",
"batchtime": 20,
"exec": "../course/a2psk/a2psk_dem.exe",
"instance_value": 8
"exec": "../../../build-taskbus_course-dskqt5-Release/modules/a2psk_dem",
"instance_value": 6
},
"name": {
"name": "a2psk_dem"
......@@ -330,8 +330,8 @@
"instance": {
"additional_args": "OUTD=-1;nice=0;",
"batchtime": 20,
"exec": "../course/a2psk/a2psk_decap.exe",
"instance_value": 9
"exec": "../../../build-taskbus_course-dskqt5-Release/modules/a2psk_decap",
"instance_value": 7
},
"name": {
"name": "a2psk_decap"
......@@ -365,8 +365,8 @@
"instance": {
"additional_args": "OUTD=1,-2;nice=2;",
"batchtime": 20,
"exec": "C:/projects/taskbus_win64.20240304/course/a0common/a0simplechannel.exe",
"instance_value": 3
"exec": "../../../build-taskbus_course-dskqt5-Release/modules/a0simplechannel",
"instance_value": 8
},
"name": {
"name": "a0_simplechannel"
......@@ -398,7 +398,7 @@
},
"ppm": {
"default": 0,
"instance_value": "0",
"instance_value": "-21",
"tooltip": "clock err in ppm",
"type": "int"
},
......@@ -423,8 +423,8 @@
"instance": {
"additional_args": "IND=1;OUTD=-1;nice=2;",
"batchtime": 20,
"exec": "../modules/pcap_hub/pcapHub.exe",
"instance_value": 1
"exec": "../../../build-pcaphub-dskqt6-Release/pcapHub",
"instance_value": 9
},
"name": {
"name": "pcap_hub"
......
{
"mod0": {
"network_pcaphub": {
"input_subjects": {
"packin": {
"instance_value": 9,
"tooltip": "packin",
"type": "bytes"
}
},
"instance": {
"additional_args": "IND=1;OUTD=-1;nice=2;",
"batchtime": 20,
"exec": "../../../build-pcaphub-dskqt6-Release/pcapHub",
"instance_value": 10
},
"name": {
"name": "pcap_hub"
},
"output_subjects": {
"packout": {
"instance_value": 1,
"tooltip": "packout",
"type": "bytes"
}
},
"parameters": {
"autostart": {
"default": 0,
"instance_value": 0,
"tooltip": "auto start",
"type": "int"
},
"hide": {
"default": 0,
"instance_value": 0,
"tooltip": "hide window when start",
"type": "int"
}
}
}
},
"mod1": {
"transform_fft": {
"input_subjects": {
"signal": {
"instance_value": 2,
"tooltip": "signal",
"type": "byte"
},
"tmstamp_in": {
"instance_value": "",
"tooltip": "tmstamp_in",
"type": "uint64"
}
},
"instance": {
"additional_args": "nice=2;",
"batchtime": 20,
"exec": "modules/transform_fft",
"instance_value": 11
},
"name": {
"name": "libfftw"
},
"output_subjects": {
"FFT": {
"instance_value": 3,
"tooltip": "FFT in dB",
"type": "vector"
},
"Spec": {
"instance_value": "",
"tooltip": "Spec in Complex",
"type": "vector"
},
"tmstamp_out": {
"instance_value": "",
"tooltip": "tmstamp_out",
"type": "uint64"
}
},
"parameters": {
"channels": {
"default": 1,
"instance_value": 1,
"tooltip": "Channels",
"type": "int"
},
"fftsize": {
"default": 1024,
"instance_value": 1024,
"tooltip": "fft size",
"type": "int"
},
"frame_span": {
"default": 16,
"instance_value": 16,
"range": ">=1",
"tooltip": "Frame Span (count) between each fft calc. Slower CPU need larger spans.",
"type": "int"
},
"input_type": {
"default": 0,
"instance_value": "1",
"tooltip": "0=Real,1=Complex",
"type": "int"
},
"mod": {
"default": 0,
"instance_value": 0,
"range": "0=Frame,1=Continous",
"tooltip": "WorkingMod",
"type": "int"
},
"sptype": {
"default": 0,
"instance_value": 0,
"range": {
"0": "16 bit Intel",
"1": "16 bit Moto",
"2": "int8",
"3": "uint8"
},
"tooltip": "sample point format",
"type": "enum"
}
}
}
},
"mod2": {
"sink_plots": {
"input_subjects": {
"plot0": {
"instance_value": 3,
"tooltip": "input0",
"type": "byte"
},
"plot1": {
"instance_value": 5,
"tooltip": "input1",
"type": "byte"
},
"plot2": {
"instance_value": "",
"tooltip": "input2",
"type": "byte"
},
"plot3": {
"instance_value": "",
"tooltip": "input3",
"type": "byte"
},
"plot4": {
"instance_value": "",
"tooltip": "input4",
"type": "byte"
}
},
"instance": {
"additional_args": "nice=2;",
"batchtime": 20,
"exec": "modules/sink_plots",
"instance_value": 12
},
"name": {
"name": "plots"
},
"parameters": {
"channels": {
"default": "1,1,1,1,1,1",
"instance_value": "0,2,1,1,1,1",
"range": {
"tip": "0:1d spectrogram 1: 1d wav or 2:2d xy"
},
"tooltip": "各路通道数",
"type": "string"
},
"datatypes": {
"default": "9,9,9,9,9",
"instance_value": "9,9,9,9,9",
"range": {
"value": "0:uint8 1:int8 2:uint16 3:int16 4:uint32 5:int32 6:uint64 7:int64 8:float 9:double"
},
"tooltip": "各路数据类型",
"type": "string"
}
},
"version": {
"version": "1,1,0"
}
}
},
"mod3": {
"a2psk_encap": {
"input_subjects": {
"input": {
"instance_value": 1,
"tooltip": "package",
"type": "byte"
},
"water_mark": {
"instance_value": 7,
"tooltip": "water mark for uhd",
"type": "int"
}
},
"instance": {
"additional_args": "IND=4,3;OUTD=1;nice=0;",
"batchtime": 20,
"exec": "../../../build-taskbus_course-dskqt5-Release/modules/a2psk_encap",
"instance_value": 13
},
"name": {
"name": "a2psk_encap"
},
"output_subjects": {
"output": {
"instance_value": 10,
"tooltip": "encap signal",
"type": "vector"
}
},
"parameters": {
"min_watermark": {
"default": 10000,
"instance_value": "30000",
"tooltip": "Min Watermark",
"type": "long long"
},
"mod_type": {
"default": 1,
"instance_value": "1",
"tooltip": "1:BPSK,2:QPSK,3:8PSK",
"type": "int"
}
}
}
},
"mod4": {
"a2psk_mod": {
"input_subjects": {
"input": {
"instance_value": 10,
"tooltip": "encap msg",
"type": "byte"
}
},
"instance": {
"additional_args": "nice=0;",
"batchtime": 20,
"exec": "../../../build-taskbus_course-dskqt5-Release/modules/a2psk_mod",
"instance_value": 14
},
"name": {
"name": "a2psk_mod"
},
"output_subjects": {
"output": {
"instance_value": 11,
"tooltip": "iq16bits",
"type": "vector"
}
},
"parameters": {
"mod_type": {
"default": 1,
"instance_value": "1",
"tooltip": "1:BPSK,2:QPSK,3:8PSK",
"type": "int"
},
"shaping_filter": {
"default": 1,
"instance_value": 1,
"tooltip": "enable 1:4 pre-shaping",
"type": "bool"
}
}
}
},
"mod5": {
"a2psk_dem": {
"input_subjects": {
"input": {
"instance_value": 2,
"tooltip": "iq16bits",
"type": "vector"
}
},
"instance": {
"additional_args": "nice=0;",
"batchtime": 20,
"exec": "../../../build-taskbus_course-dskqt5-Release/modules/a2psk_dem",
"instance_value": 15
},
"name": {
"name": "a2psk_dem"
},
"output_subjects": {
"iqcoord": {
"instance_value": 5,
"tooltip": "iq coords",
"type": "double coords"
},
"output": {
"instance_value": 4,
"tooltip": "dembits",
"type": "byte"
}
},
"parameters": {
"mod_type": {
"default": 1,
"instance_value": "1",
"tooltip": "1=BPSK,2=QPSK,3=8PSK",
"type": "int"
}
}
}
},
"mod6": {
"a2psk_decap": {
"input_subjects": {
"input": {
"instance_value": 4,
"tooltip": "encap msg",
"type": "vector"
}
},
"instance": {
"additional_args": "OUTD=-1;nice=0;",
"batchtime": 20,
"exec": "../../../build-taskbus_course-dskqt5-Release/modules/a2psk_decap",
"instance_value": 16
},
"name": {
"name": "a2psk_decap"
},
"output_subjects": {
"output": {
"instance_value": 8,
"tooltip": "package",
"type": "byte"
}
},
"parameters": {
"mod_type": {
"default": 1,
"instance_value": "1",
"tooltip": "1=BPSK,2=QPSK,3=8PSK",
"type": "int"
}
}
}
},
"mod7": {
"a0_simplechannel": {
"input_subjects": {
"input": {
"instance_value": 11,
"tooltip": "baseband_in",
"type": "iqshort"
}
},
"instance": {
"additional_args": "OUTD=1,-2;nice=2;",
"batchtime": 20,
"exec": "../../../build-taskbus_course-dskqt5-Release/modules/a0simplechannel",
"instance_value": 17
},
"name": {
"name": "a0_simplechannel"
},
"output_subjects": {
"output": {
"instance_value": 2,
"tooltip": "baseband_out",
"type": "iqshort"
},
"tx_mark": {
"instance_value": 7,
"tooltip": "TXWaterMark",
"type": "int64"
}
},
"parameters": {
"df": {
"default": 0,
"instance_value": "100000",
"tooltip": "1/freq err in points",
"type": "int"
},
"noise": {
"default": 0,
"instance_value": "10",
"tooltip": "noise",
"type": "short"
},
"ppm": {
"default": 0,
"instance_value": "-21",
"tooltip": "clock err in ppm",
"type": "int"
},
"sample_rate": {
"default": 1000000,
"instance_value": 1000000,
"tooltip": "Simu sample rate (Hz)",
"type": "int"
}
}
}
},
"mod8": {
"network_pcaphub": {
"input_subjects": {
"packin": {
"instance_value": 8,
"tooltip": "packin",
"type": "bytes"
}
},
"instance": {
"additional_args": "IND=1;OUTD=-1;nice=2;",
"batchtime": 20,
"exec": "../../../build-pcaphub-dskqt6-Release/pcapHub",
"instance_value": 18
},
"name": {
"name": "pcap_hub"
},
"output_subjects": {
"packout": {
"instance_value": 9,
"tooltip": "packout",
"type": "bytes"
}
},
"parameters": {
"autostart": {
"default": 0,
"instance_value": 0,
"tooltip": "auto start",
"type": "int"
},
"hide": {
"default": 0,
"instance_value": 0,
"tooltip": "hide window when start",
"type": "int"
}
}
}
},
"pos0": {
"x": 2044,
"y": 1129
},
"pos1": {
"x": 2691,
"y": 1582
},
"pos2": {
"x": 3021,
"y": 1554
},
"pos3": {
"x": 1721,
"y": 1314
},
"pos4": {
"x": 2013,
"y": 1544
},
"pos5": {
"x": 2695,
"y": 1374
},
"pos6": {
"x": 3007,
"y": 1176
},
"pos7": {
"x": 2324,
"y": 1471
},
"pos8": {
"x": 2533,
"y": 1130
},
"total_mods": 9
}
{
"mod0": {
"network_pcaphub": {
"input_subjects": {
"packin": {
"instance_value": 9,
"tooltip": "packin",
"type": "bytes"
}
},
"instance": {
"additional_args": "IND=1;OUTD=-1;nice=2;",
"batchtime": 20,
"exec": "../../../build-pcaphub-dskqt6-Release/pcapHub",
"instance_value": 1
},
"name": {
"name": "pcap_hub"
},
"output_subjects": {
"packout": {
"instance_value": 1,
"tooltip": "packout",
"type": "bytes"
}
},
"parameters": {
"autostart": {
"default": 0,
"instance_value": 0,
"tooltip": "auto start",
"type": "int"
},
"hide": {
"default": 0,
"instance_value": 0,
"tooltip": "hide window when start",
"type": "int"
}
}
}
},
"mod1": {
"transform_fft": {
"input_subjects": {
"signal": {
"instance_value": 2,
"tooltip": "signal",
"type": "byte"
},
"tmstamp_in": {
"instance_value": "",
"tooltip": "tmstamp_in",
"type": "uint64"
}
},
"instance": {
"additional_args": "nice=2;",
"batchtime": 20,
"exec": "modules/transform_fft",
"instance_value": 2
},
"name": {
"name": "libfftw"
},
"output_subjects": {
"FFT": {
"instance_value": 3,
"tooltip": "FFT in dB",
"type": "vector"
},
"Spec": {
"instance_value": "",
"tooltip": "Spec in Complex",
"type": "vector"
},
"tmstamp_out": {
"instance_value": "",
"tooltip": "tmstamp_out",
"type": "uint64"
}
},
"parameters": {
"channels": {
"default": 1,
"instance_value": 1,
"tooltip": "Channels",
"type": "int"
},
"fftsize": {
"default": 1024,
"instance_value": 1024,
"tooltip": "fft size",
"type": "int"
},
"frame_span": {
"default": 16,
"instance_value": 16,
"range": ">=1",
"tooltip": "Frame Span (count) between each fft calc. Slower CPU need larger spans.",
"type": "int"
},
"input_type": {
"default": 0,
"instance_value": "1",
"tooltip": "0=Real,1=Complex",
"type": "int"
},
"mod": {
"default": 0,
"instance_value": 0,
"range": "0=Frame,1=Continous",
"tooltip": "WorkingMod",
"type": "int"
},
"sptype": {
"default": 0,
"instance_value": 0,
"range": {
"0": "16 bit Intel",
"1": "16 bit Moto",
"2": "int8",
"3": "uint8"
},
"tooltip": "sample point format",
"type": "enum"
}
}
}
},
"mod2": {
"sink_plots": {
"input_subjects": {
"plot0": {
"instance_value": 3,
"tooltip": "input0",
"type": "byte"
},
"plot1": {
"instance_value": 5,
"tooltip": "input1",
"type": "byte"
},
"plot2": {
"instance_value": "",
"tooltip": "input2",
"type": "byte"
},
"plot3": {
"instance_value": "",
"tooltip": "input3",
"type": "byte"
},
"plot4": {
"instance_value": "",
"tooltip": "input4",
"type": "byte"
}
},
"instance": {
"additional_args": "nice=2;",
"batchtime": 20,
"exec": "modules/sink_plots",
"instance_value": 3
},
"name": {
"name": "plots"
},
"parameters": {
"channels": {
"default": "1,1,1,1,1,1",
"instance_value": "0,2,1,1,1,1",
"range": {
"tip": "0:1d spectrogram 1: 1d wav or 2:2d xy"
},
"tooltip": "各路通道数",
"type": "string"
},
"datatypes": {
"default": "9,9,9,9,9",
"instance_value": "9,9,9,9,9",
"range": {
"value": "0:uint8 1:int8 2:uint16 3:int16 4:uint32 5:int32 6:uint64 7:int64 8:float 9:double"
},
"tooltip": "各路数据类型",
"type": "string"
}
},
"version": {
"version": "1,1,0"
}
}
},
"mod3": {
"a2psk_encap": {
"input_subjects": {
"input": {
"instance_value": 1,
"tooltip": "package",
"type": "byte"
},
"water_mark": {
"instance_value": 7,
"tooltip": "water mark for uhd",
"type": "int"
}
},
"instance": {
"additional_args": "IND=4,3;OUTD=1;nice=0;",
"batchtime": 20,
"exec": "../../../build-taskbus_course-dskqt5-Release/modules/a2psk_encap",
"instance_value": 4
},
"name": {
"name": "a2psk_encap"
},
"output_subjects": {
"output": {
"instance_value": 10,
"tooltip": "encap signal",
"type": "vector"
}
},
"parameters": {
"min_watermark": {
"default": 10000,
"instance_value": "30000",
"tooltip": "Min Watermark",
"type": "long long"
},
"mod_type": {
"default": 1,
"instance_value": "2",
"tooltip": "1:BPSK,2:QPSK,3:8PSK",
"type": "int"
}
}
}
},
"mod4": {
"a2psk_mod": {
"input_subjects": {
"input": {
"instance_value": 10,
"tooltip": "encap msg",
"type": "byte"
}
},
"instance": {
"additional_args": "nice=0;",
"batchtime": 20,
"exec": "../../../build-taskbus_course-dskqt5-Release/modules/a2psk_mod",
"instance_value": 5
},
"name": {
"name": "a2psk_mod"
},
"output_subjects": {
"output": {
"instance_value": 11,
"tooltip": "iq16bits",
"type": "vector"
}
},
"parameters": {
"mod_type": {
"default": 1,
"instance_value": "2",
"tooltip": "1:BPSK,2:QPSK,3:8PSK",
"type": "int"
},
"shaping_filter": {
"default": 1,
"instance_value": 1,
"tooltip": "enable 1:4 pre-shaping",
"type": "bool"
}
}
}
},
"mod5": {
"a2psk_dem": {
"input_subjects": {
"input": {
"instance_value": 2,
"tooltip": "iq16bits",
"type": "vector"
}
},
"instance": {
"additional_args": "nice=0;",
"batchtime": 20,
"exec": "../../../build-taskbus_course-dskqt5-Release/modules/a2psk_dem",
"instance_value": 6
},
"name": {
"name": "a2psk_dem"
},
"output_subjects": {
"iqcoord": {
"instance_value": 5,
"tooltip": "iq coords",
"type": "double coords"
},
"output": {
"instance_value": 4,
"tooltip": "dembits",
"type": "byte"
}
},
"parameters": {
"mod_type": {
"default": 1,
"instance_value": "2",
"tooltip": "1=BPSK,2=QPSK,3=8PSK",
"type": "int"
}
}
}
},
"mod6": {
"a2psk_decap": {
"input_subjects": {
"input": {
"instance_value": 4,
"tooltip": "encap msg",
"type": "vector"
}
},
"instance": {
"additional_args": "OUTD=-1;nice=0;",
"batchtime": 20,
"exec": "../../../build-taskbus_course-dskqt5-Release/modules/a2psk_decap",
"instance_value": 7
},
"name": {
"name": "a2psk_decap"
},
"output_subjects": {
"output": {
"instance_value": 8,
"tooltip": "package",
"type": "byte"
}
},
"parameters": {
"mod_type": {
"default": 1,
"instance_value": "2",
"tooltip": "1=BPSK,2=QPSK,3=8PSK",
"type": "int"
}
}
}
},
"mod7": {
"a0_simplechannel": {
"input_subjects": {
"input": {
"instance_value": 11,
"tooltip": "baseband_in",
"type": "iqshort"
}
},
"instance": {
"additional_args": "OUTD=1,-2;nice=2;",
"batchtime": 20,
"exec": "../../../build-taskbus_course-dskqt5-Release/modules/a0simplechannel",
"instance_value": 8
},
"name": {
"name": "a0_simplechannel"
},
"output_subjects": {
"output": {
"instance_value": 2,
"tooltip": "baseband_out",
"type": "iqshort"
},
"tx_mark": {
"instance_value": 7,
"tooltip": "TXWaterMark",
"type": "int64"
}
},
"parameters": {
"df": {
"default": 0,
"instance_value": "100000",
"tooltip": "1/freq err in points",
"type": "int"
},
"noise": {
"default": 0,
"instance_value": "10",
"tooltip": "noise",
"type": "short"
},
"ppm": {
"default": 0,
"instance_value": "-21",
"tooltip": "clock err in ppm",
"type": "int"
},
"sample_rate": {
"default": 1000000,
"instance_value": 1000000,
"tooltip": "Simu sample rate (Hz)",
"type": "int"
}
}
}
},
"mod8": {
"network_pcaphub": {
"input_subjects": {
"packin": {
"instance_value": 8,
"tooltip": "packin",
"type": "bytes"
}
},
"instance": {
"additional_args": "IND=1;OUTD=-1;nice=2;",
"batchtime": 20,
"exec": "../../../build-pcaphub-dskqt6-Release/pcapHub",
"instance_value": 9
},
"name": {
"name": "pcap_hub"
},
"output_subjects": {
"packout": {
"instance_value": 9,
"tooltip": "packout",
"type": "bytes"
}
},
"parameters": {
"autostart": {
"default": 0,
"instance_value": 0,
"tooltip": "auto start",
"type": "int"
},
"hide": {
"default": 0,
"instance_value": 0,
"tooltip": "hide window when start",
"type": "int"
}
}
}
},
"pos0": {
"x": 2044,
"y": 1129
},
"pos1": {
"x": 2691,
"y": 1582
},
"pos2": {
"x": 3021,
"y": 1554
},
"pos3": {
"x": 1721,
"y": 1314
},
"pos4": {
"x": 2013,
"y": 1544
},
"pos5": {
"x": 2695,
"y": 1374
},
"pos6": {
"x": 3007,
"y": 1176
},
"pos7": {
"x": 2324,
"y": 1471
},
"pos8": {
"x": 2533,
"y": 1130
},
"total_mods": 9
}
......@@ -3,9 +3,9 @@
#include <QVector>
#include <cstdio>
#include <cstdlib>
#include <ctime>
#include <QDateTime>
#include <thread>
#include <chrono>
#include <QThread>
#include <atomic>
#include <mutex>
#include <cmath>
......@@ -74,13 +74,13 @@ int main(int argc , char * argv[])
}
else if (args.contains("function"/*,"do_function"*/))//正常运行模式
{
static clock_t last_clk = clock();
std::thread wm_thread([&]()->void{
std::this_thread::sleep_for(std::chrono::milliseconds(2000));
QDateTime dtmLast = QDateTime::currentDateTime();
while (false==bfinished)
{
unsigned long long wmi = (watM<0)?(long long)0:(unsigned long long)watM;
std::this_thread::sleep_for(std::chrono::milliseconds(10));
if (sub_wm)
TASKBUS::push_subject(
sub_wm,
......@@ -88,13 +88,14 @@ int main(int argc , char * argv[])
sizeof(qint64),
(unsigned char *) &wmi,&outmtx);
//流速控制
clock_t curr_clk = clock();
long long ms_us = (curr_clk - last_clk) * 1000000 / CLOCKS_PER_SEC;
watM -= (ms_us/1000000.0) * para_sr;
QDateTime dtmCurr = QDateTime::currentDateTime();
double mt= (dtmLast.msecsTo(dtmCurr))/1000.0;
dtmLast = dtmCurr;
watM -= mt * para_sr;
if (watM<0)
watM = 0;
last_clk = curr_clk;
QThread::msleep(10);
}
});
......@@ -213,14 +214,7 @@ std::vector<short> simplechannel(const vector<unsigned char> &packagedta)
//clock err
dx16rclk += (1.0-para_ppm/1e6);
if(dx16rclk > 32)
{
dx16rclk -= 32;
}
long long nx16rclk = dx16rclk;
if (nx16rclk % 16 ==0) //钟差带入后
if (dx16rclk>=16) //钟差带入后
{
double x16val[2] {0,0};
for (int f=0;f<25;++f)
......@@ -241,13 +235,15 @@ std::vector<short> simplechannel(const vector<unsigned char> &packagedta)
signal.push_back(noisesig[0]);
signal.push_back(noisesig[1]);
dx16rclk-=16;
}
++x16clk;
if (x16clk % (16000000)==0)
if (x16clk % (3626339)==0)
{
fprintf(stderr,"Channel simu clk = %lf, raw = %lld\n",dx16rclk,x16clk);
fprintf(stderr,"Channel simu clk = %lf, raw = %lld, wm=%lld\n",dx16rclk,x16clk % 16,(long long)watM);
fflush(stderr);
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册