On 5.x kernels with the USB mmap problems fixed, the distributed librtlsdr
will use a zero-copy mapping for USB buffers. Unfortunately, there is
something about the nature of the mapping on ARM (at least on Pis) that
makes most access to the data extremely slow. The uc8_nodc converter is
about 35x slower in this case compared to working on a heap-allocated buffer.
Luckily, a plain memcpy() of the buffer is still reasonably fast, so
we can use a bounce buffer and copy the data out of the slow mapping, then
pass the copy to the converter. This mitigates most of the problem,
at the expense of always needing that extra copy (which does somewhat
defeat the purpose of zero-copy!)
Unfortunately, librtlsdr provides no reliable way to control or
detect the use of zero-copy mappings, so we have to assume the problem
is always there (at least on ARM) and pay the cost of an unnecessary
copy when zerocopy is _not_ in use, too.
Unfortunately limesuite doesn't seem to provide an API identifier, so
we can't detect whether LMS_PATH_AUTO is supported or not. Change the
fallback to LMS_PATH_LNAW, since that appears to work on both mini
and full-fat limesdrs.
Update all the SDR implementation to use it.
This was getting pretty ugly with code getting copy&pasted in all the SDR
implementations. Unify it all and give it a simpler API. Linked list works out
much simpler than the circular buffer. Also, simplify copying the overlap region
around by just using a separate buffer (it's only a few hundred bytes long, so
the double copy is not a big deal).
Add ability to set calibration bandwidth via input command line options.
By default the bandwidth is equal to 2.5 MHz.
Test: connect LimeSDR device, try to set different bandwidth and check
logs:
$ ./dump1090 --device-type limesdr --limesdr-bw 5000000
$ ./dump1090 --device-type limesdr --limesdr-bw 500000
Signed-off-by: Gluttton <gluttton@ukr.net>
Add ability to set LPF bandwidth via input command line options.
By default the bandwidth is equal to the default sample rate 2.4 MHz.
Test: connect LimeSDR device, try to set different bandwidth and check
logs:
$ ./dump1090 --device-type limesdr --limesdr-lpfbw 2500000
$ ./dump1090 --device-type limesdr --limesdr-lpfbw 500000
Signed-off-by: Gluttton <gluttton@ukr.net>
Add ability to set the combined normalized gain via command line
options. By default the gain is equal to 0.75.
Test: connect LimeSDR device, try to set different gain and check logs:
$ ./dump1090 --device-type limesdr --limesdr-gain 0.01
$ ./dump1090 --device-type limesdr --limesdr-gain 0.5
$ ./dump1090 --device-type limesdr --limesdr-gain 0.99
Signed-off-by: Gluttton <gluttton@ukr.net>
Add ability to set RF oversampling ratio via command line options. By
default the default value is used.
Test: none.
Signed-off-by: Gluttton <gluttton@ukr.net>
Add ability to select a desired LimeSDR device by serial number. It is
not necessary to pass a whole serial number, but its key part is enough.
The first device which serial contains the passed key is selected.
Test: connect LimeSDR device and try to select it by serial number,
below an example for a device with serial 0009081C05C00000:
OK: $ ./dump1090 --device-type limesdr --limesdr-serial 9
OK: $ ./dump1090 --device-type limesdr --limesdr-serial 90
OK: $ ./dump1090 --device-type limesdr --limesdr-serial 908
NG: $ ./dump1090 --device-type limesdr --limesdr-serial 999
It hasn't been tested with several devices!
Signed-off-by: Gluttton <gluttton@ukr.net>
Add ability to set verbosity level for LimeSDR messages via command line
options. The range of available levels is from 0 to 4 and defined by the
constants from the `LimeSuite.h` file:
- LMS_LOG_CRITICAL 0;
- LMS_LOG_ERROR 1;
- LMS_LOG_WARNING 2;
- LMS_LOG_INFO 3;
- LMS_LOG_DEBUG 4.
By default the verbosity level is 3 (INFO).
Test: launch the program with different verbosity level and ensure that
number of messages is changed, for example:
$ ./dump1090 --device-type limesdr --limesdr-verbosity 4
$ ./dump1090 --device-type limesdr --limesdr-verbosity 3
$ ./dump1090 --device-type limesdr
Signed-off-by: Gluttton <gluttton@ukr.net>
The commit provides a basic implementation of support for LimeSDR USB
receivers based on LMS7002 chip. The solution has several limitations:
- passing parameters for tune LimeSDR receiver via command-line
options is not implemented;
- only hardcoded configuration is used (channel 0 of lower band LNA,
LMS_FMT_I16 format, gain, bandwidth and timeout);
- only one device is supported and it is not possible to select a
desired one in case if several devices are connected to the host.
Test: compare the output of the program for RTL and LimeSDR receivers.
Environment:
- RTL2832SDR dongle;
- LMS7002M based USB LimeSDR board;
- 800MHz-2200MHz omnidirectional antenna with SMA connector.
Procedure:
- connect RTL dongle to the host and start the program with the
following parameters:
$ ./dump1090 --device-type rtlsdr --interactive
- wait until several planes will be detected;
- stop the program, connect the LimeSDR board to the host and restart
the program with the following parameters:
$ ./dump1090 --device-type limesdr --interactive
- ensure that the same planes are detected.
Acceptance criteria: the same planes are detected using both receivers
and track information matches with information from the
FlightRadar24 application.
Signed-off-by: Gluttton <gluttton@ukr.net>
When accessing Dump 1090 JSON from another web server, I found that the "Access-Control-Allow-Origin" parameter was set twice ("*, *") which Chrome objected to. By changing "add-response-header" to "set-response-header" we ensure that the correct header is sent, but never duplicated.
* Update openlayers to v6.3.1 and get existing source working with new version
* Organize ol source files a bit
Co-authored-by: erictran <eric.tran@flightaware.com>
* Front-end/styling of window with checkbox options to customize plane table columns
* Toggle checkbox functionality with persistence
* Toggle correct columns for each checkbox
* Add several more column options and fix up logic to show/hide columns
* Functional select/deselect all checkboxes; Needs optimization
* Set overflow-x to scroll on aircraft table
* Select Columns button styling
* Refactor toggleAllColumns()
* Separate legend from table scrolling
* Move aircraft table styling into css file
* Spacing
Co-authored-by: erictran <eric.tran@flightaware.com>