def calcSTDOA(signalA, signalB, micPosList, indA, indB): std1 = tdoa_gcc_phat(signalA, signalB, fs=meta["sampling_rate"])[0] * 343.3 rstd1 = getRealDeltaS(source_pos, micPosList[indA], micPosList[indB]) print("STDOA Estimated / Real: ", std1, rstd1)
# Starte Simulation loaded = simulate(config, config["source_position"], signal_function) signals = loaded.get_measurements() meta = loaded.get_meta_data() signalA = signals[0] signalB = signals[1] signalAF = signalA #butterWorthFilter(wienerFilter(signalA), meta["sampling_rate"], 1500) signalBF = signalB #butterWorthFilter(wienerFilter(signalB), meta["sampling_rate"], 1500) TDOA_CSOM, t, csom = tdoa_csom(signalAF, signalBF, fs=meta["sampling_rate"], window=500) TDOA_GCCP, cc = tdoa_gcc_phat(signalAF, signalBF, fs=meta["sampling_rate"]) TDOA_real = getRealTDOA(source_pos, micA, micB) a, b, c, SNR = getSNR(signalAF) SNRls.append(SNR) TDOA_realls.append(TDOA_real) TDOA_csomls.append(TDOA_CSOM) TDOA_GCCPls.append(TDOA_GCCP) print(dis, ";", ang, ";", source_pos, ";", np.average(SNRls), ";", np.std(SNRls), ";", np.average(TDOA_realls), ";", np.std(TDOA_realls), ";", np.average(TDOA_csomls), ";", np.std(TDOA_csomls), ";", np.average(TDOA_GCCPls), ";", np.std(TDOA_GCCPls)) print(dis,