rsadsb / dump1090_rs

Multi-SDR supported Rust translation of the popular dump1090 project for ADS-B demodulation
GNU General Public License v2.0
100 stars 7 forks source link

Selecting antenna to use #23

Closed bluecmd closed 2 years ago

bluecmd commented 2 years ago

Hi,

Thanks for the project! I am using dump1090_rs with my USRP B210 which has two antennas per frontend. Right now it does not appear to be possible to select which antenna to use, which is a bit annoying for my use case.

It appears it might be settable using soapysdr::Device::set_antenna.

Would you consider adding support for setting the antenna via e.g. command line options?

wcampbell0x2a commented 2 years ago

:wave:

I always like hearing use cases, I added some code to support this via: https://github.com/rsadsb/dump1090_rs/commit/8aabe23e83d0e31ee5fb998df5e8921fc2e6d591.

I have some default setting that definitely aren't correct (gain wise). But I now let you change the channel and antenna via the config file using the --custom-config setting. I wasn't sure if you need to set the channel, but the antenna name should give you what you need.

If you find this works and have a working config, I would love to add it as a default uhd option. Let me know how this goes.

wcampbell0x2a commented 2 years ago

Added with https://github.com/rsadsb/dump1090_rs/pull/25