john- / ham2mon

GNU Radio based SDR scanner for narrow band FM demodulation
GNU General Public License v3.0
2 stars 0 forks source link

Priority demod assignment #12

Open lordmorgul opened 7 months ago

lordmorgul commented 7 months ago

Requires manually working merge into a new branch

john- commented 6 months ago

I spot checked this pull and a lot of the changes are already in my my master branch. Do you know how we can have a pull request that is just the priority demod assignment? I guess my concern is that if I just merge this than it will revert code that needs to stay the same.

I will also try to figure out how to make this work a little smoother because when I originally merged your master branch it was a lot of manual work I would like to avoid doing again.

Update: I seems like the priority handling has been in your master branch since before I did the merge of your code into my master branch. If this is true than I must have skipped over it when I did my merge. Although I find it surprising I did this I have done stranger things :)

john- commented 6 months ago

Based on the priority demod assignment code being in your master branch for quite a while I don't see how to make this merge be any easier. I will take a look at merging it over the next few days.

lordmorgul commented 6 months ago

I am obviously struggling with priorities myself hah. I did this pull to test the water, I suspected it would be hard to isolate, and if I had been more deliberate with commits could cherry pick. But as is I think it is a manual merge. I planned to do it since familiar with what is meant to be there but may not be able to this week.

john- commented 6 months ago

I will make an attempt at the merge and report back later this week.

john- commented 6 months ago

In the pull request and my try to create a new one there is something odd: It looks like the code being compared to is not my github master. For example, in the README.md changes it has this: image

However, the master version already has these lines correct. It looks like it is comparing to the upstream madengr.

Any idea why?

john- commented 6 months ago

I think I have the merge of this pull request complete (currently in a separate branch). It seems like the priority option is working but not fully sure of the expected results.

The screen shot seems to show a priority channel in the channel list that is not being actively tuned. However, when I run the merge and your master it does not operate this way.

I may need some assistance confirming things work or something explaining how it is supposed to work.

john- commented 6 months ago

I see an issue with the priority demodulation assignment code as it exists in your repository. The code as I merged it was not doing what I expected so looked at your repo before and after the addition of this enhancement.

With a test file your master branch generates thousands of audio files when it should only generated 30 or so. Your master branch before the enhancement works as expected (mostly).

Here is the approach I used to generate a test IQ file and to replay it in ham2mon:

https://github.com/john-/ham2mon/tree/priority_demod_assignment?tab=readme-ov-file#ham2mon-development

I can provide more details if needed.

lordmorgul commented 6 months ago

Thanks for pointing this out, I just verified it doing the same and had not seen that in what I had in the separate branch. Sorry that I missed that. I will have to get into it and see why but it seems to be snipping the audio short into separate files. The files seem like sequential bits of the same signal so it is either by reassigning the demodulator after a very short time or by the file size limit code tripping to reset the demo to no freq. I will figure it out and get back to you.

john- commented 6 months ago

Thanks for confirming and offering to assist. Before you do anything I think I may have a different approach to handle this enhancement.

This is the correct use case, right:

Case 3 - miweber67:
Priority scanner with active channel audio monitoring

If so I have something that seems to work but is much different than your branch. After I do some more testing maybe you can look at this to see if it addresses it?

If this is not a good path we can look at the small file problem.

lordmorgul commented 6 months ago

Note that for Use Case 3 having priority assigned from file is one reason to assign demod, next reason would be select the strongest signal in instantaneous bandwidth. The reason for one of the many frequency lists getting added was to add a prioritized list by power using the amplitude in spectrum to set power associated with each channel during scanner loop. So not demod could be set by 1) in priority list, 2) highest power.

john- commented 6 months ago

Note that for Use Case 3 having priority assigned from file is one reason to assign demod, next reason would be select the strongest signal in instantaneous bandwidth.

Correct me if I am wrong but these are two separate things:

Priority from file is in the branch listed in this issue:

https://github.com/john-/ham2mon/issues/11

If you can check how this approach works and put comments there that would be great. Note: I do have a branch that builds off this which puts the letter "P" after those CHANNELS that were priority scanned. This helps visualize what it is doing. This branch is documented here: https://github.com/john-/ham2mon/issues/16

For priority based on channel strength we can create a separate enhancement. If you agree create the ticket otherwise let me know and I will do it.