Conversation
|
I see the problem with the first match (on lowest frequency), but why would be 'nearest frequency' better? The problem seems not that we find the first of many VKs on the list, but that we accept ANY station with an VK inside. So what if we would not just look for a match anywhere in the callsign but prefer spots which has the searchstring as start of call - first look for match with start of call and if nothing found search also inside the calls? |
|
I made PR #506 for easy comparison of both suggested changes for the spot lookup. (Man page still has to be adapted if choosen.) |
|
I think there is no right logic for grab selection as it depends how one uses it. Here is what I do:
This PR just addresses case 4 above by moving the focus from the beginning of band to the current frequency, thus implicitly to the visible part of the bandmap. The example given in the previous comment was just one possible scenario. Another one is wanting to grab say HB9ABC by entering HB9 (as it is the only HB9 station on my bandmap) and then selecting HB9XYZ at the beginning on the band (so case 4 again). Here #506 would also not improve the match. The point is not the substring versus prefix search, but fixing the artificial bias towards the beginning of the band. This is no way perfect (as it simply can't be), but at least reduces unexpected results (the case 4). |
|
Now I see your point. I had overlooked scenario 4. PR#506 can't help here. The failure in the original implementation is that we search the whole filtered spot list and not only the displayed ones. PR #507 fixes that. It can surely combined with further filtering - by distance, country precedence or other schemes. |
|
Closing as it is covered by #507 |
This fix addresses the issue that grab can lead to unexpected result, especially when the bandmap is full during a contest.
An example situation is as follows:
By looking for a match closest to the current frequency such issues can be at least reduced.