Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fake multichannel #697

Open
wants to merge 2 commits into
base: next
Choose a base branch
from

Conversation

vladisslav2011
Copy link
Contributor

@vladisslav2011 vladisslav2011 commented Dec 28, 2022

Make it possible to receive multiple constellations using single channel wideband device (HackRF/LimeSDR/USRP).
Demonstration: https://www.youtube.com/watch?v=ZQs2sFchJ6w https://www.youtube.com/watch?v=HnZkKj9a-QM

@jwmelto
Copy link
Contributor

jwmelto commented Jan 8, 2023

Help me understand what this PR does, since the code change is trivial.

On line 138 the number of channels from the signal source are extracted (in your examples, this value is 3). Then the three signal conditioners are created.

Then, starting at line 933, each channel of the output is connected to a corresponding signal conditioner.

As I work through this, what I'm guessing is that the signal source doesn't actually support multiple channels; and you are emulating the multi-channel capability by connecting different processing chains to the same source output. While this is a nice use of the underlying GNU Radio infrastructure, I'm less comfortable with your (under-documented) approach for GNSS-SDR.

Personally, I've butted up against the expressive limitations of the config file, and would like for more flexibility, but I'm not convinced (yet) that this is a good change to the baseline. The whole wiring of the the flowgraph is brittle and inflexible, beyond the pre-defined flexibility in this file. I'm wondering if embracing GNU Radio more closely (maybe even a GRC file) is a better solution to this issue?

@vladisslav2011
Copy link
Contributor Author

This PR makes it possible to receive multiple constellations at different frequencies using one single channel device. This is achieved by connecting several signal conditioners to the same signal source/channel and setting different IF offsets.
It may be better to implement explicit signal conditioner connection specification by adding "SignalConditioner#.SignalSource=N" and "SignalConditioner#.SourceChannel=N" options, but this one line change does the trick and should not break anything.
The documentation may be updated to specify the order in which signal conditioners are connected to multiple single-channel devices when the specified number of channels exceeds actual number of device channels (1), but as this is done in the same order as with multiple real multichannel devices, I don't know, is it really required.

@mustafaefecetin
Copy link

mustafaefecetin commented Feb 6, 2023

What is your system configuration? Because I couldn't keep up with the 56MHz stream. My host configuration is,

OS: Ubuntu 20.04.5 LTS x86_64
Host: HP Z4 G4 Workstation
Kernel: 5.14.0-1056-oem
Shell: bash 5.0.17
CPU: Intel Xeon W-2123 (8) @ 3.900GH
GPU: NVIDIA Quadro P2000
Memory: 2919MiB / 31835MiB DDR4 @2667MHz

I followed the guidline in ->
USRP Host Performance Tips&Tricks

However, overflow is still occuring. I am not sure volk is working properly. Although, I run volk_profile and volk_gnsssdr_profile.

@vladisslav2011
Copy link
Contributor Author

vladisslav2011 commented Feb 6, 2023

What is your system configuration?

OS: Ubuntu 18.04.6 LTS x86_64
Kernel: 5.4.0-136-generic
CPU: AMD Ryzen 9 5950X 16-Core Processor
RAM: 64Gb DDR4

You may have to apply this patch: vladisslav2011/gr-osmosdr@1888972

You may try to reduce the sampling rate to 48MHz. It should be enough to get both BeiDou and Glonass.

@mustafaefecetin
Copy link

Thanks for your reply, @vladisslav2011

I will try that ->

You may have to apply this patch: vladisslav2011/gr-osmosdr@1888972

I've tried the HackRF configuration and only keep up with 20MHz bw and 2 MHz internal_fs_sps. Also, I will try to run default configuration with more powerfull host which has 20 threads.

@aniljangral
Copy link

Hi I am trying to use the multichannel gnss receiver with hack rf... when I use the code, it says segmentation fault.. Can you help?

Signed-off-by: Vladislav P <vladisslav2011@gmail.com>
@vladisslav2011
Copy link
Contributor Author

vladisslav2011 commented May 7, 2024

@aniljangral
Current "next" should segfault with config files from this PR, so maybe you just forgot to run cmake .. && make after checkout...
Could you provide some more information:

  1. Output from git show
  2. Config file (if you have modified supplied gnss-sdr_multichannel_GPS_Galileo_Beidou_L1_hackrf_realtime.conf)
  3. GNSS-SDR startup log
  4. Stack trace from crash
  5. Your machine specs - it should be powerful enough to run 30+ tracking channels

@vladisslav2011
Copy link
Contributor Author

I've rebased this PR on top of current 'next' branch (4836785) and corrected config files placement.
It still works very well at least on my machine - tracks 19 satellites and gives relatively good PVT.

@jwmelto
Copy link
Contributor

jwmelto commented May 16, 2024

@carlesfernandez what are your thoughts? This is a trivial change that doesn't seem to do harm, and has been around for a while.

@aniljangral
Copy link

aniljangral commented May 17, 2024

Thank you for your prompt reply!
I have rebuilt the gnss-sdr PR and tested it with the my-first-GNSS-SDR-receiver.conf file. it works well!
However, when I connect my USRP b205mini SDR, It again gives the segfault.
I am attaching the screenshot of the error and the configuration file that I have used(changed the device addr).
I am also attaching the screenshot of the git show.
Rest, I have built the PR on an old machine and my MacBook Air M2. I get the same result.
The config are:-
(Old machine)- intel i3, 4 GBDDR, ubuntu 22.04.3
Macbook- M2chip, 8GB, Ubuntu 23.10-live-server(VM in UTM hypervisor)
SDR :- USRP B205mini
HackRFone

I am not very good at computers.. Please bear with me!!
I need help to complete this PR. If you can, please give me the direct link to the conf files for accessing GPS, Gallelio, Beidou, and GLONAS using USRP b205mini and hackrfone.
Also, do I need to build the PR for visuals (those flashy screens) separately on my machine for system wide accessibility or I need to build it inside the GNSS-SDR PR to work?output.txt

IMG_7720
IMG_7721
IMG_7722
IMG_7721
IMG_7720
IMG_7722

@vladisslav2011
Copy link
Contributor Author

vladisslav2011 commented May 17, 2024

@aniljangral
Your screenshots are showing, that you have built the "next" branch instead of this PR...
How to build this PR (assuming, that you have cloned GNSS-SDR into "gnss-sdr" dir):

cd gnss-sdr
git fetch https://github.com/vladisslav2011/gnss-sdr fake_multichannel
git checkout FETCH_HEAD -b fake_multichannel
cd build
cmake ..
make -j9

@vladisslav2011
Copy link
Contributor Author

@aniljangral
I've updated my latest comment. I forgot to add a branch to the fetch cmd.

@aniljangral
Copy link

aniljangral commented May 18, 2024

Hi
Thanks you for the help!
I followed the steps given by you and build the PR branch successfully. I am attaching the git show result.
Post that, I I tried to search for any conf file for receiving GPS, Gallelio, Bediou and Glonass using USRP/ HackRF in the conf folder, which I did not find.
Anyways, I tried to use a "gnss-sdr_GPS_L1_USRP_realtime.conf" file, which started but could not give me result. I could observe that it would try to "Lock on to a particular channel", but could not do so!
It says "Loss of Lock in Channel 1!... Screenshot is attached.
Further in one of the time, it would also say "7 overflows occurred"... Screenshot attached.
I presume that the receiver is trying to lock onto a GPS channel which it is not able to hold on to! I would add here that I have tried using two different antennas, both are off the market type antennae purchased from amazon. Also, the setup of antennae were placed under clear sky to obviate any obstruction to gps signals. Photos of the both are attached.
I have also attached a photo of the actual SDR b205 mini that I am using.
Please help! I request you to help me understand the issue and resolve it. I also urge you to please give me a link to the conf files for accessing GPS, Gallelio, Beidou, and GLONAS using USRP b205mini and hackrfone.!

Thanks!

IMG_7733
IMG_7726
IMG_7724
IMG_7727
IMG_7730
IMG_7732

@vladisslav2011
Copy link
Contributor Author

Hmmm...
You are still running GNSS-SDR built from the "next" branch (f80c537), that does not support "fake multichannel".
This PR commit id is b5b1d14.

"7 overflows occurred" means that your machine is not powerful enough to process full bandwidth or buffers are too small.

b205 will not work with this antenna ("GPS Antenna 1575.42MHz"). It needs an external bias tee and 3.3V power supply.
The second antenna does not cover the required band and has wrong polarization (linear instead of RHCP), so it would not work too.
Sorry for mistakes. I'm being constantly disturbed while writing comments here...

@aniljangral
Copy link

Hi
By mistake I posted yesterday's screenshot! I have completed the PR build as you had told. The actual screenshot is attached now.
I'l try to increase the RAM of my machine, if it would help.
As for the antenna, its polarisation and the bias tee + power supply, I will try to find one in the lab as soon as possible.
In the mean time, what about the conf files for accessing GPS, Gallelio, Beidou, and GLONAS (in a single multichannel receiver) using USRP b205mini and hackrfone? I couldn't find them anywhere now.
Thanks!
IMG_7733

@aniljangral
Copy link

Would any of this antenna work? It says RHCP. I understand that I need bias tee + power supply for them.
IMG_7734

Signed-off-by: Vladislav P <vladisslav2011@gmail.com>
@vladisslav2011
Copy link
Contributor Author

vladisslav2011 commented May 18, 2024

Adding more RAM will not help. Try increasing num_recv_frames to 512 or more and patching gr_osmosdr.
But nothing will help if your CPU is too slow to handle ~40 tracking channels @ 8..10Msps + at least one acquisition channel.
This antenna should work.
It looks like example config files were lost during rebase.
I've updated the PR. The examples should be here again.

@aniljangral
Copy link

Okay.
The patching of gr_osmosdr means installing it system wide or do I install inside gnss-sdr directory?
I am trying to get hold of a more powerful machine.

@vladisslav2011
Copy link
Contributor Author

There is no need to install patched gr_osmosdr anywhere.
Just point ld-linux.so to it by defining the LD_PRELOAD environment variable:

LD_PRELOAD='your path to gr_osmosdr build dir'/lib/libgnuradio-osmosdr.so gnss-sdr -c 'your config file'

There is no need to install the development version of GNSS-SDR as well. It can be easily run from it's build directory too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants