Closed lxsxl closed 11 months ago
What if I change it to activate it when the currentfreq is detected more than 2 times? It's difficult to find workarounds when transmitters are not correctly configured.
This could be an easy solution. It would always work except that a method-B AF-list contains only one single AF. But I think this case will be extremely unlikely.
Some further thoughts to this issue:
Current flow:
So there are two trigger points to enable method B.
Three questions:
Seems that it depends on the order the AFs are received because in a different run, the 91,5 get's the "R"-indicator.
R/S indicators are gathered, even when method B is not active (yet). But only when the number of AF's is paired with currentfreq. They will only be shown when AF-B is detected.
But in my example AF-B is detected and number of AFs is paired with current freq. But in some attempts there will be no "R", in other attempts it will be shown.
I waited really long each time
Can you send me a stream and the frequency?
I think method B is false detected by RDS Spy because of double 102.7 in the listing.
Let me check in redsea
The AF sequence is like I wrote above. And due to the double 102,7 it is quite logical that AF-B is detected (though it is AF-A). But why is the 91,5 mostly without “R” and rarely with this indication? Could the moment of hitting the RDS stream be the reason?
Is it false detected as method B by the TEF?
I've downloaded the wave file and checked on my TEF, it's method A, which is what redsea
also says.
$ redsea -r 192k -f ./D210\ Dlf\ 102\,7.wav | sort | uniq
{"pi":"0xD210"}
{"pi":"0xD210","group":"0A","di":{"artificial_head":false},"is_music":true,"prog_type":"Serious classical","ta":false,"tp":false}
{"pi":"0xD210","group":"0A","di":{"compressed":false},"is_music":true,"prog_type":"Serious classical","ta":false,"tp":false}
{"pi":"0xD210","group":"0A","di":{"dynamic_pty":true},"is_music":true,"prog_type":"Serious classical","ta":false,"tp":false}
{"pi":"0xD210","group":"0A","di":{"stereo":true},"is_music":true,"prog_type":"Serious classical","ta":false,"tp":false}
{"pi":"0xD210","group":"0A","ps":"Dlf ","alt_frequencies_a":[89100,91000,91500,92800,94200,94500,95500,98700,102700,102700,102800,104400,104500,107200],"di":{"stereo":true},"is_music":true,"prog_type":"Serious classical","ta":false,"tp":false}
{"pi":"0xD210","group":"0A","ps":"Dlf ","di":{"stereo":true},"is_music":true,"prog_type":"Serious classical","ta":false,"tp":false}
{"pi":"0xD210","group":"14A","other_network":{"pi":"0xD220","alt_frequencies":[98900,100200,106000,90500,89000,96500,98900],"tp":false},"prog_type":"Serious classical","tp":false}
{"pi":"0xD210","group":"14A","other_network":{"pi":"0xD220","has_linkage":false,"tp":false},"prog_type":"Serious classical","tp":false}
{"pi":"0xD210","group":"14A","other_network":{"pi":"0xD220","prog_type":"No PTY","ta":false,"tp":false},"prog_type":"Serious classical","tp":false}
{"pi":"0xD210","group":"14A","other_network":{"pi":"0xD220","ps":"DKULTUR ","tp":false},"prog_type":"Serious classical","tp":false}
{"pi":"0xD210","group":"14A","other_network":{"pi":"0xD220","tp":false},"prog_type":"Serious classical","tp":false}
{"pi":"0xD210","group":"2A","prog_type":"Serious classical","tp":false}
{"pi":"0xD210","group":"2A","radiotext":"Das macht die Welt so tiefschön.Ästhetik des Todes in Liedern d","prog_type":"Serious classical","tp":false}
{"pi":"0xD210","group":"2A","radiotext":"Deutschlandfunk - Alles von Relevanz","prog_type":"Serious classical","tp":false}
{"pi":"0xD210","group":"2A","radiotext":"Musikszene","prog_type":"Serious classical","tp":false}
{"pi":"0xD210","group":"4A","clock_time":"2023-11-21T22:44:00+01:00","prog_type":"Serious classical","tp":false}
So now ok?
So now ok?
Is it false detected as method B by the TEF?
No, I have tested the file in my lab, TEF says method A.
So this one can be closed?
It is still detected as method B. But 91,5 is now always indicated as „R“. So far the algorithms are now working properly as you described them above.
Method is wrong anyway in this case (as andimik reports by redsea diagnosis).
The algorithm still should be adjusted, but as this is a really special issue it can be planned for a future patch if it is too much actually.
The needed adjustment would be the following (regarding step 3): Actually it is When trigger is set and 'number of following AF's' and the current frequency is detected, Method B is enabled... OR when the current frequency is detected more than once in a AF cycle (from number of following AF's to number of following AF's), Method B is enabled.
and it should be: When trigger is set and 'number of following AF's' and the current frequency is detected, Method B is enabled... OR when the current frequency is detected >= 50 % in a AF cycle (from number of following AF's to number of following AF's), Method B is enabled.
It is still detected as method B
On Dlf?
See above, the same file you were sharing lets TEF display Method A, not B.
That‘s really strange: If I tune to Dlf/102,7 and switch to advanced RDS screen, it only shows „AF“. Then switch to AF screen, the list is without any „R“ indicator. Back to advanced RDS, it is still only „AF“. Again to AF screen, after another AF-cycle there appears the „R“ for 91,5, then back to advanced RDS mode and you have „AF-B“. 😮
Another attempt: I restarted the TEF and now it shows always „AF-B“ without any „in and out“. I‘m totally confused…
And again: There is no guarantee to reproduce it safely. Sometimes it detects AF-B directly, sometimes you need one, two or three tries of “in and out” until AF-B is detected.
When trigger is set and 'number of following AF's' and the current frequency is detected, Method B is enabled... OR when the current frequency is detected >= 50 % in a AF cycle (from number of following AF's to number of following AF's), Method B is enabled.
I've changed this. But I was not able to reproduce your problem with the DLF recording I received.
I again compared the algorithm with the AF sequence: Step 2 of the algorithm is NOT true in this case (“When a 'number of following AF's' and a frequency which is not the current frequency is detected, method B trigger is set.”) The ‘number of following AFs’ is paired with the current frequency (and not a different AF). Maybe there is a problem? Or may the not current frequency be anywhere in the list?
Oh sorry, this was overlapping. I will try with the new code. Will let you know
Oh sorry, this was overlapping. I will try with the new code. Will let you know
It doesn't matter, because if it's not paired with currentfreq, the currentfreq will not be mentioned that much in that list.
For Dlf 102,7 it works now. The detection remains on "AF".
But we still have a (hopely very last) small incorrectness with the 50 % (sorry, my fault): It is the frequency in pair with 'number of AFs' that must be >= 50 % in the same list (and not any frequency). For this I've got another example (D220 Dlf_Kult on 106,1): The sequence is as follows: '#3 / 106,1 -- 98,9 / 105,3. Actually this is detected as method B (but of course is method A). I will record an MPX stream and send it in a few minutes.
OK. try again
I'm sorry, just broke my device. 5 V-wire is disconnected from the board, so no connection to arduino IDE. I will ask on discord if someone can help ...
Fixed it to do at least the flashing. AF method detection is perfect now. Thanks for your patience! Now I need to get a micro soldering iron to fix the wiring durable. There is not much capacity left ...
I will close this issue as completed.
We should improve AF-method B detection a bit. Actually method B is indicated if the tuned frequency is transmitted more than once in a list. This may lead to a wrong indication. For example: "Dlf" on 102,7 transmits 14 AFs in one single list, where the tuned frequency is included twice. So actually the TEF indicates this as AF-method B.
Though this of course a small error by the broadcaster (as each frequency should be only once in method A), I suggest to modify the detection a bit: