Thoughts on optimizing gain

You most likely didn’t actually change the gain.

A gain of 0 is 55 less than -10 approximately.
Running a gain of 0 with your setup would give you 0% >-3dB, i would pretty much bet on it.

According to your stats page you are using the installed version, not the piaware sd-card version.
That means you need to set the gain in /etc/default/dump1090-fa, not with piaware-config.
See case 2 of this post to see how to do it:
For Beginners - How to Set / Change Gain

-10 is equal to around 55 in most cases.
Next lower gain value is 49.6
You could try a gain of 40 and then 35 probably.

The LNA is very nice but you should try and put it before the 50 m of coax.
You sure you don’t mean 50 ft?

Anyway putting the LNA in front of the coax run or wherever the cable comes into the house is probably connected to getting new cables, so at the end of the run will have to do for now.

Have you ordered a bias-t for the LNA already to supply it with power?
Something like this: Bias Tee Wideband 1mhz-3ghz for Ham Radio RTL SDR LNA Low Noise Amplifier 50vdc for sale online | eBay

Without power the LNA doesn’t work and will just block all signals.

Thanks! I cancelled the order for now, as if Im running -10 i need to find out what I can get if my signal is too strong before spending $30 on the device and another 10-15 on a power supply. I saw the 5V input (from the other page) and it looked like it was powered with USB micro - im sure theres an all in one that will do that, so if I need, ill look for that.
But back to square one.
heres the output from
sudo systemctl status dump1090-fa -l
dump1090-fa.service - dump1090 ADS-B receiver (FlightAware customization)
Loaded: loaded (/lib/systemd/system/dump1090-fa.service; enabled; vendor preset: enabled)
Active: active (running) since Thu 2019-07-04 22:59:35 EDT; 11h ago
Docs: PiAware - ADS-B and MLAT Receiver - FlightAware
Main PID: 7305 (dump1090-fa)
CGroup: /system.slice/dump1090-fa.service
└─7305 /usr/bin/dump1090-fa --device-index 0 --gain -10 --ppm 0 --net-bo-port 30005 --max-range 360 --net --ne

Jul 04 22:59:35 raspberrypi systemd[1]: Started dump1090 ADS-B receiver (FlightAware customization).
Jul 04 22:59:35 raspberrypi dump1090-fa[7305]: Thu Jul 4 22:59:35 2019 EDT dump1090-fa 3.7.1 starting up.
Jul 04 22:59:36 raspberrypi dump1090-fa[7305]: rtlsdr: using device #0: Generic RTL2832U (Realtek, RTL2832U, SN 00001000)
Jul 04 22:59:36 raspberrypi dump1090-fa[7305]: Found Rafael Micro R820T tuner
Jul 04 22:59:36 raspberrypi dump1090-fa[7305]: rtlsdr: enabling tuner AGC

Gain set to -10 and AGC enabled so…
I was editing the PiAware.conf as I saw on the FA page, as the /boot/piaware-config.txt wasnt there, so it said to edit the /etc/Piaware.conf
oh well. Ill try some more and let you all know the results.

You can feed the bias-t with the 3.3 V or 5 V from the Raspberry Pi.
(from the GPIO pins)
You’ll still need some jumper wires to connect to the pin header unless you feed comfortable soldering to the back side :stuck_out_tongue_winking_eye:

https://www.amazon.com/GenBasic-Solderless-Dupont-Compatible-Breadboard-Prototyping/dp/B01L5ULRUA
Might be cheaper in smaller quantity on ebay.

But yeah try to figure out how to change the gain first. (edit /etc/default/dump1090-fa)
I linked you a post where the different methods needed depending on the software in use are explained.

Whoa!! Finally got the gain down and Yea, i think this is much better: pi@raspberrypi:~ $ sudo systemctl restart dump1090-fapi@raspberrypi:~ $ sudo systemctl status dump1090-fa -l
● dump1090-fa.service - dump1090 ADS-B receiver (FlightAware customization)
Loaded: loaded (/lib/systemd/system/dump1090-fa.service; enabled; vendor preset: enabled)
Active: active (running) since Fri 2019-07-05 18:47:13 EDT; 2s ago
Docs: PiAware - ADS-B and MLAT Receiver - FlightAware
Main PID: 1089 (dump1090-fa)
CGroup: /system.slice/dump1090-fa.service
└─1089 /usr/bin/dump1090-fa --device-index 0 --gain 40 --ppm 0 --net-bo-port 30005 --max-range 360 --net --net

Jul 05 18:47:13 raspberrypi systemd[1]: Started dump1090 ADS-B receiver (FlightAware customization).
Jul 05 18:47:13 raspberrypi dump1090-fa[1089]: Fri Jul 5 18:47:13 2019 EDT dump1090-fa 3.7.1 starting up.
Jul 05 18:47:13 raspberrypi dump1090-fa[1089]: rtlsdr: using device #0: Generic RTL2832U (Realtek, RTL2832U, SN 00001000)
Jul 05 18:47:14 raspberrypi dump1090-fa[1089]: Found Rafael Micro R820T tuner
Jul 05 18:47:14 raspberrypi dump1090-fa[1089]: rtlsdr: tuner gain set to 40.2 dB

pi@raspberrypi:~ $ awk “$(cat /run/dump1090*/stats.json| grep total | sed ‘s/.accepted":[([0-9]).strong_signals":([0-9]).*/BEGIN {printf “\nPercentage of strong messages: %.3f \n” , \2 * 100 / \1}/’)”

Percentage of strong messages: 1.444

I can probably even raise my gain a little… but from what i can see, im getting a lot more planes within the 10nm range around the house now.

1 Like

I have updated the script to generate a performance graph - it now includes colouring points by range, and some box plots to show data distribution. The data displayed is over the previous week.

Wiedehopf has updated the github file, so the command to generate it remains unchanged:

sudo bash -c "$(wget -q -O - https://raw.githubusercontent.com/wiedehopf/adsb-wiki/master/caius_scatter_plot.sh)"
5 Likes

Pretty. I have no interpretation but it’s pretty.

.

Tried on my Pi, but got this error

pi@raspberrypi:~ $ sudo bash -c "$(wget -q -O - https://raw.githubusercontent.com/wiedehopf/adsb-wiki/master/caius_scatter_plot.sh)"
Processing RRD data
Generating plot
bash: line 39: gnuplot: command not found
Moving plot
cp: cannot stat '/tmp/range.png': No such file or directory

EDIT:
Installing gnuplot
Taking long time

Do this first

sudo apt install gnuplot-nox --no-install-recommends

Sorry, too late, already done sudo apt install gnuplot

Ran bash script, and got following output. Where is the plot (image) located?

sudo apt install gnuplot 

sudo bash -c "$(wget -q -O - https://raw.githubusercontent.com/wiedehopf/adsb-wiki/master/caius_scatter_plot.sh)".... .... ....
1230 1.3447854189e+04  -1.20e+07  1.23e-03   -3.606918e-01   8.626150e+01  -6.107151e+03   6.141043e+03
1231 1.3447854189e+04  -1.49e+00  1.23e-04   -3.606918e-01   8.626150e+01  -6.107151e+03   6.141043e+03
1232 1.3447854189e+04  -2.71e-01  1.23e-05   -3.606918e-01   8.626150e+01  -6.107151e+03   6.141043e+03
iter      chisq       delta/lim  lambda   a             b             c             d

After 1232 iterations the fit converged.
final sum of squares of residuals : 13447.9
rel. change during last iteration : -2.70525e-15

degrees of freedom    (FIT_NDF)                        : 72
rms of residuals      (FIT_STDFIT) = sqrt(WSSR/ndf)    : 13.6666
variance of residuals (reduced chisquare) = WSSR/ndf   : 186.776

Final set of parameters            Asymptotic Standard Error
=======================            ==========================
a               = -0.360692        +/- 0.2496       (69.2%)
b               = 86.2615          +/- 53.44        (61.95%)
c               = -6107.15         +/- 3707         (60.7%)
d               = 6141.04          +/- 807.7        (13.15%)

correlation matrix of the fit parameters:
                a      b      c      d
a               1.000
b              -0.996  1.000
c               0.983 -0.995  1.000
d               0.515 -0.437  0.347  1.000
Moving plot

http://yourlocapiipaddress/dump1090-fa/data/graph.png

1 Like

Plot 1/2 - With PCB Antenna (Indoor, near window) + FA Filter (sky blue) + ProStick (orange)

After 1232 iterations the fit converged.

Plot 2/2 - With Flightaware Antenna (Indoor, near window) + FA Filter (sky blue) + ProStickPlus (navy blue)

After 9 iterations the fit converged.

Ah, you appear to have uncovered a problem with the label positioning. I’ll have to have a look and see if I can get gnuplot to use relative positions rather than absolute.

Edit - this should be possible - I just have to figure out the correct format and update it.

Looks like either you are running an old graphs version or it didn’t have time to accumulate data for a week.

The microSD card for PCB Antenna was written with Raspbian Buster at about 2000 hrs last night, about 17 hrs ago.

However the gnuplot says “Receiver performance since 2019-06-30 to 2019-07-06”

It doesn’t actually check if it has data for that timeframe.
It’s just the timeframe it normally plots.

@abcd567 The labels should now show in their proper position if you run the script again.

As wiedehopf said, the script attempts to pull data from the dates shown at the top of the graph, but if those that data doesn’t exist then it won’t throw up any errors but just plot what is available.

Just to clear things up: the graphs made with GNUplot are best made against the RRD files made with @wiedehopf his script “graphs1090”, right? Not against the ones the ADS-B Receiver Project creates.

Yeah my RRD files record some more detail going back a week.
You can convert your existing RRD files if you want after installing my graphs.

Converting the old database files:
Graphs for dump1090 -- my version with install script - #271 by wiedehopf