remove dc offset is optional

master
Xael South 2024-05-12 20:23:45 +02:00
rodzic 0b9d4459d9
commit 497c70121b
3 zmienionych plików z 46 dodań i 3 usunięć

Wyświetl plik

@ -133,6 +133,10 @@ Optimization on frequencies translation by rearranging compute steps implemented
Alalons (have I thanked you already?!) proposed a speed optimized arctan function. Performance gain is notable (factor ~2) but could reduce sensitivity slightly. I have seen that on receiving C1 mode datagrams - that's why the speed optimized version is not in use by default. A speed optimized arctan version can be activated by "-a" in the program options.
A new options "-o", which means "remove dc offset", was introduced. The overall sensitivity is better _without_ removing dc offset, so the user must start rtl_wmbus with this option:
* cat samples/rtlsdr_868.950M_1M6_issue47.cu8 | build/rtl_wmbus -o
* cat samples/rtlsdr_868.950M_1M6_issue49.cu8 | build/rtl_wmbus -o
* cat samples/rtlsdr_868.625M_2M4_issue48.cu8 | build/rtl_wmbus -d 3 -s -o
License
-------

Wyświetl plik

@ -854,6 +854,7 @@ static int opts_time2_algorithm_enabled = TIME2_ALGORITHM_ENABLED;
static unsigned opts_decimation_rate = 2u;
static int opts_s1_t1_c1_simultaneously = 0;
static int opts_accurate_atan = 1;
static int opts_remove_dc_offset = 0;
int opts_show_used_algorithm = 0;
static int opts_t1_c1_processing_enabled = 1;
static int opts_s1_processing_enabled = 1;
@ -888,10 +889,13 @@ static void process_options(int argc, char *argv[])
{
int option;
while ((option = getopt(argc, argv, "fad:p:r:vVst:")) != -1)
while ((option = getopt(argc, argv, "ofad:p:r:vVst:")) != -1)
{
switch (option)
{
case 'o':
opts_remove_dc_offset = 1;
break;
case 'f':
opts_check_flow = 1;
#if CHECK_FLOW == 0
@ -1043,7 +1047,7 @@ void t1_c1_signal_chain(float i_t1_c1, float q_t1_c1,
// Post-filtering to prevent bit errors because of signal jitter.
float delta_phi_t1_c1 = lp_fir_butter_800kHz_100kHz_160kHz(_delta_phi_t1_c1);
//float delta_phi_t1_c1 = equalizer_t1_c1(_delta_phi_t1_c1, _delta_phi_t1_c1 >= 0.f ? 1.f : -1.f);
delta_phi_t1_c1 = t1_c1_remove_dc_offset_demod(delta_phi_t1_c1, T1_C1_DC_OFFSET_ALPHA);
if (opts_remove_dc_offset) delta_phi_t1_c1 = t1_c1_remove_dc_offset_demod(delta_phi_t1_c1, T1_C1_DC_OFFSET_ALPHA);
//int16_t demodulated_signal = (INT16_MAX-1)*delta_phi_t1_c1;
//fwrite(&demodulated_signal, sizeof(demodulated_signal), 1, demod_out2_t1_c1);
@ -1135,7 +1139,7 @@ void s1_signal_chain(float i_s1, float q_s1,
// Post-filtering to prevent bit errors because of signal jitter.
float delta_phi_s1 = lp_fir_butter_800kHz_32kHz_36kHz(_delta_phi_s1);
//float delta_phi_s1 = equalizer_s1(_delta_phi_s1, _delta_phi_s1 >= 0.f ? 1.f : -1.f);
delta_phi_s1 = s1_remove_dc_offset_demod(delta_phi_s1, S1_DC_OFFSET_ALPHA);
if (opts_remove_dc_offset) delta_phi_s1 = s1_remove_dc_offset_demod(delta_phi_s1, S1_DC_OFFSET_ALPHA);
//int16_t demodulated_signal = (INT16_MAX-1)*delta_phi_s1;
//fwrite(&demodulated_signal, sizeof(demodulated_signal), 1, demod_out2_s1);

Wyświetl plik

@ -282,24 +282,59 @@
<Folder Name="build">
<F N="build/version.h"/>
</Folder>
<Folder Name="debian">
<Folder Name="patches">
<F N="debian/patches/1000-build-install-deb.patch"/>
<F N="debian/patches/README"/>
<F N="debian/patches/series"/>
</Folder>
<Folder Name="source">
<F N="debian/source/format"/>
</Folder>
<F N="debian/changelog"/>
<F N="debian/control"/>
<F N="debian/copyright"/>
<F
N="debian/rules"
Type="Makefile"/>
<F N="debian/watch"/>
</Folder>
<Folder Name="filter">
<F N="filter/bp_iir_cheb1_1600kHz_90kHz_98kHz_102kHz_110kHz.m"/>
<F N="filter/bp_iir_cheb1_800kHz_22kHz_30kHz_34kHz_42kHz.m"/>
<F N="filter/bp_iir_cheb1_800kHz_90kHz_98Hz_102kHz_110kHz.m"/>
<F N="filter/lp_fir_butter_1600kHz_160kHz_200kHz.m"/>
<F N="filter/lp_fir_butter_800kHz_100kHz_160kHz.m"/>
<F N="filter/lp_fir_butter_800kHz_32kHz_36kHz.m"/>
<F N="filter/lp_ppf_butter_1600kHz_160kHz_200kHz.m"/>
<F N="filter/print_fir_filter_coef.m"/>
<F N="filter/print_iir_filter_coef.m"/>
<F N="filter/print_ppf_filter_coef.m"/>
<F N="filter/rtl_wmbus.m"/>
</Folder>
<Folder Name="include">
<Folder Name="fixedptc">
<F N="include/fixedptc/fixedptc.h"/>
<F N="include/fixedptc/Makefile"/>
<F N="include/fixedptc/README.txt"/>
<F N="include/fixedptc/test.c"/>
<F N="include/fixedptc/verify.c"/>
</Folder>
<F N="include/mode_s_util.h"/>
<F N="include/mode_t_util.h"/>
</Folder>
<F N="androidbuild.bat"/>
<F N="atan2.h"/>
<F N="build-deb.sh"/>
<F N="fir.h"/>
<F N="iir.h"/>
<F N="Makefile"/>
<F N="moving_average_filter.h"/>
<F N="net_support.h"/>
<F N="ppf.h"/>
<F N="README.md"/>
<F N="rtl_wmbus.c"/>
<F N="rtl_wmbus.py"/>
<F N="s1_packet_decoder.h"/>
<F N="t1_c1_packet_decoder.h"/>
</Files>